DiagramToolDefinition class final
A registered tool: its id and label, the behavior that handles pointer input and optional shortcut, group and icon.
Constructors
- DiagramToolDefinition({required DiagramTool id, required String label, required DiagramToolBehavior behavior, DiagramShortcut? shortcut, String? group, DiagramIcon? icon, bool returnToDefault = false})
-
const
Properties
- behavior → DiagramToolBehavior
-
final
- group → String?
-
Optional host toolbar grouping, with no meaning to the input dispatcher.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- icon → DiagramIcon?
-
The palette icon, owned by the contributing extension. Hosts show
their own icon for core tools.
final
- id → DiagramTool
-
final
- label → String
-
final
- returnToDefault → bool
-
Returns to the registry default after an admitted dispatch or gesture
commit. A denied dispatch or commit retains the tool for retry.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shortcut → DiagramShortcut?
-
The key that activates this tool; text focus always retains ownership
of typing.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
forShapes(
Iterable< ShapeDefinition> shapes, {required String group}) → List<DiagramToolDefinition> -
One palette creation tool per shape, identified by its type, in
group. Add them to an extension's tools beside its shapes.