discontinuedPackage jet_cad_floor_plan has been discontinued and replaced by jet_cad_2d_plan.

WallTool class

Spec 07 D11, Ruling 07-1: a chain of walls, like AutoCAD's LINE.

  • The first click sets the chain's start; each later click commits one wall from the previous point, one undo step each.
  • A wall is a group at the identity carrying WallParams, so its stored endpoints are the snapped points themselves and a chained run meets bit for bit.
  • A click on the chain's first point, once two walls are down, commits the closing wall and ends the chain. A click on its last point, once a wall is down, ends it (so a double click is harmless). Before that, a click on the start is a zero-length wall and is refused, as the Line tool refuses one (M-05x).
  • It joins a wall wherever its band is clicked (D11): an accepted point, and the rubber band's end, that lies in a wall's band is moved onto that wall (see _joinBandInto): a T, or a node near an end. This is the only way it makes a joint; it snaps with the drawing tools' own kinds (03 D8), never nearest, which would pull a click onto any unrelated line near it and away from the grid.
  • Enter and Escape end the chain. Every other key-down is swallowed while it is pending (05 D3): undo never lands mid-chain (Ruling 07-1).

points holds the chain's first point and, once a wall is down, its last: the next wall's start.

Inheritance

Constructors

WallTool(ValueNotifier<WallSettings> settings, {WallBands? bands})
bands is the band cache the shell shares with the opening tools (spec 08 D14, Ruling 08-11); without one the tool keeps its own.

Properties

acceptingSelf ↔ bool
True only while accept runs on a self-snap's stored point (Ruling 05-4).
getter/setter pairinherited
band → Path
Spec 05 D12: reset each frame, never reallocated. bandPaint's colour and width are set by paintWorldOverlay before it calls paintRubberBand (dark theme spec D5).
finalinherited
bandPaint → Paint
finalinherited
cursor → MouseCursor
The pointer's cursor over the layer (spec 03 D5). InteractionLayer rebuilds its MouseRegion when the tool notifies.
no setterinherited
debugBandEnd → Vector2
The rubber band's far end, for tests.
no setter
debugBandScans ↔ int
How many band scans have run: a test seam for the early return.
getter/setter pair
fill → ValueListenable<bool>?
Spec 05 D13: the shell's Fill toggle. Null, or false: outlines only.
finalinherited
hashCode → int
The hash code for this object.
no setterinherited
hasListeners → bool
Whether any listeners are currently registered.
no setterinherited
hoverKind → SnapKind?
no setterinherited
hoverPoint → Vector2
no setterinherited
hoverVisible → bool
no setterinherited
isMidShape → bool
Spec 12a D6: a point placed and the shape not yet finished. The paths that change points here (onPointerDown, Enter and Escape in onKey, cancel) each notify.
no setterinherited
isPending → bool
no setterinherited
markerPoint → Vector2
Where paintOverlay draws the snap marker: the resolved hover point. A tool that places its shape somewhere derived from that point overrides it (spec 08 D15, Ruling 08-14: an opening tool marks the point projected onto its host's centreline). Read per frame: an override returns a stored point and allocates nothing.
no setterinherited
name → String
no setter
orthoBase → Vector2?
Spec 05 D4: the last placed point, or none.
no setterinherited
phase → ToolPhase
no setterinherited
points → List<Vector2>
The placed points, as exact world values (invariant 1).
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
selectionPreviewTransform → Transform2?
The world transform a live move or rotate would apply, for the overlay's preview (spec 03 D7); null otherwise.
no setterinherited
settings → ValueNotifier<WallSettings>
Owned by the shell and shared with the Selection panel, which edits it; the tool only reads it, at each commit and each paint.
final
touchPress → TouchPress
How a finger's press reaches this tool (spec 14t R-1). TouchPress.lift unless the tool's down and its cancel execute nothing.
no setterinherited

Methods

accept(Vector2 point, ToolContext ctx) → void
addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
cancel(ToolContext ctx) → void
Every cancel path (Escape, ToolController.activate, the layer's deactivate and dispose) drops the pending shape and never touches the document (invariant 3).
inherited
clearShape() → void
commit(ToolContext ctx, DraftCommand build(), {Set<Capability> needs = const {Capability.geometry}}) → bool
Ruling 05-3: the permission check runs before build, so a denied shape allocates no handle. needs is every capability the built command will need (spec 06 D13, Ruling 06-10); 05's shapes need geometry alone. Returns whether the command ran.
inherited
commitShape(ToolContext ctx, EntityKind kind, GeometryPayload payload, {bool fillable = false}) → bool
Spec 05 D13: with Fill on and a fillable shape, one region when the boundary can fill, and the plain boundary when it cannot.
inherited
dispose() → void
Discards any resources used by the object.
finish(ToolContext ctx) → void
Enter while a shape is pending.
hovered(Vector2 raw) → void
Runs after every hover's resolution (and re-resolution), so hoverPoint is already the resolved point. With no chain pending there is no rubber band, and nothing to scan.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
onKey(KeyEvent event, ToolContext ctx) → KeyEventResult
inherited
onPointerDown(ToolPointerEvent e, ToolContext ctx) → void
inherited
onPointerExit(ToolContext ctx) → void
The shape stays: placement is click by click, not a drag.
inherited
onPointerMove(ToolPointerEvent e, ToolContext ctx) → void
onPointerUp(ToolPointerEvent e, ToolContext ctx) → void
inherited
paintOverlay(Canvas canvas, ViewportTransform camera, Size viewport, PaperPalette paper) → void
Paints in screen space, after paintWorldOverlay. Every colour comes from paper, the overlay's own set for the paper under it (dark theme spec D5); none is kept in a field initialiser.
inherited
paintRubberBand(Canvas canvas, Vector2 origin, double scale) → void
The next wall's centreline and its band at the current thickness and justification, from the chain's last point to the hover point.
paintWorldOverlay(Canvas canvas, Vector2 origin, double scale, PaperPalette paper) → void
Paints under the overlay's rebased world matrix, worldToScreen ∘ translate(origin), so coordinates handed to canvas must be world − origin (Ruling 03-3). scale is the camera's, for stroke widths. Colours come from paper, as in paintOverlay.
inherited
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
selfSnap(Vector2 raw, double apertureWorld) → Vector2?
A stored placed point this raw point should land on exactly, or null.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited