SelectionPanel class
Spec 06 D13, 07 D11, 08 D16 and 10 D21: the right panel's parametric sections.
- Box: one selected box's width and height.
- Wall: one selected wall's thickness and justification, or -- while the Wall tool is active -- the tool's WallSettings for the next wall.
- Opening: one selected opening's width and position, and a door's Flip hinge and Flip swing; or -- while the Door, Window or Gap tool is active, even with an opening selected -- that tool's OpeningSettings (its width only) for the next opening.
- Room: one selected room's name, a free-text field, and its area, read-only: the area label's stored string (10 R-25).
- Dimension (11 D14): one selected dimension's value, read-only (its TEXT child's stored string), its kind (Aligned | Horizontal | Vertical), the axes line of a turned linear dimension (D11, R-18) and its two end lines (R-28). No tool mode: the Dimension tool has no settings.
- Table (14a T14, T16): one selected table's number, a text field (refused when invalid or used by another table, with an error line), its seats, read-only, a duplicate-number warning, and two buttons that turn it 90° about its centre.
- Colour (plan colours spec PC-9): for a selection holding a room,
while no tool's settings show, a
ColorPickerbefore the layer picker: None and eight hues, set on every selected room in one undo step; read-only while the capabilities'recoloror the permissions refuse it. - Layer (12b D12): for any non-empty selection while no tool's settings show, a LayerPicker after the sections above (alone when none shows).
The host's capabilities (host embedding API spec C-5, S-10, S-11),
ANDed with the permissions: the number needs renumber; the Rotation
field and the ±90 buttons rotate; Mirror mirror; the Size menu and
an object's own fields (box, wall, opening, room, dimension, a door's
flips) reshape; the layer picker changeLayer. A button or a menu
they refuse is not shown (Mirror, ±90, the flips, the Size menu, the
layer picker); a value field or a segmented value is shown read-only.
A tool's settings are no edit of the document and stay editable.
Each commit to an object is one SetComponentCommand, which the
parametric system turns into one undo step with its regeneration. 12
builds the real inspector.
Every field -- the numeric ones and the Name field, the one text field
(10 D21, R-23) -- follows 06 D13's amendment (F1/F2): it owns a
FocusNode and commits on its own focus loss, whatever took the focus;
Enter commits too; an invalid value (an empty name, 10 R-24) reverts the
field instead; a reload never writes into a focused field.
The commit target is pinned at focus gain (07 D11). A field records its section's target when it gains focus, and its commit goes to that target -- if it is still a live object of the same type; otherwise the typed text is discarded. A selection change while a field has focus therefore never redirects the typed value onto another object.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- SelectionPanel
Constructors
-
SelectionPanel({Key? key, required DraftDocument document, required SelectionController selection, Listenable? selectionChanges, ToolController? tools, Tool? wallTool, ValueNotifier<
WallSettings> ? wallSettings, Map<OpeningKind, Tool> ? openingTools, Map<OpeningKind, ValueNotifier< ? openingSettings, SymbolLibraryLoader? symbols, FloorPlanEditorCapabilities capabilities = FloorPlanEditorCapabilities.full, int? darkCanvasPaper})OpeningSettings> > -
const
Properties
- capabilities → FloorPlanEditorCapabilities
-
What the host lets the user edit here (spec C-5), read at each build
and commit; the default is today's panel.
final
- darkCanvasPaper → int?
-
The dark canvas's paper, ARGB, while the canvas re-tones; null on a
light one: the Colour picker's swatches show the hues as the canvas
does (
ColorPicker.darkCanvasPaper).final - document → DraftDocument
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
-
openingSettings
→ Map<
OpeningKind, ValueNotifier< ?OpeningSettings> > -
final
-
openingTools
→ Map<
OpeningKind, Tool> ? -
The shell's Door, Window and Gap tools, and their settings (spec 08
D16, Ruling 08-17): while the tool of a kind is active, the Opening
section edits that kind's settings, which the tool reads at each hover
and click. Both, with tools, or neither.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selection → SelectionController
-
final
- selectionChanges → Listenable?
-
What the panel re-reads selection on: selection when null. The
shell passes a relay of it that holds a notification sent during a
build until after the frame (Task 4 review R-2: a hover cleared as
the canvas is re-parented).
final
- symbols → SymbolLibraryLoader?
-
The shell's symbol library (spec 09c D7, V-3), for the Symbol
section's Size menu; hidden while it is null or not ready.
final
- tools → ToolController?
-
The shell's tool controller and its Wall tool: while wallTool is
active, the Wall section edits wallSettings. All three or none.
final
-
wallSettings
→ ValueNotifier<
WallSettings> ? -
Owned by the shell and shared with the Wall tool, which reads it at
each commit (07 D11).
final
- wallTool → Tool?
-
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< SelectionPanel> -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited