EntityGestures class
Selection + manipulation surface for layer, stacked as a sibling
above DrawGestures.
- touch an entity: select it and hand the strip to the text controls.
- double tap an entity: re-open the keyboard editor on it.
- 1 finger on the selection: move it; on a side handle: scale + rotate it about the frame centre.
- 2 fingers on the selection: scale + rotate + move it.
- long press on the selection: the delete menu.
With nothing selected the surface is hittable only over an entity, so
every other pointer reaches DrawGestures. With a selection it is
hittable everywhere: a touch that starts off the entity clears the
selection and is consumed.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- EntityGestures
- Available extensions
Constructors
-
EntityGestures({Key? key, required EntityLayer layer, required ValueListenable<
Matrix4> hostCamera, required VoidCallback onSelect, required VoidCallback onDeselect, CropImageLayer? crop, ValueListenable<Matrix4> ? viewerCamera}) -
Selects and manipulates
layer's entities through the scene's transforms.const
Properties
- crop → CropImageLayer?
-
The crop the scene is shown through.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
hostCamera
→ ValueListenable<
Matrix4> -
The host's image-to-viewport transform.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- layer → EntityLayer
-
The layer whose entities are manipulated.
final
- onDeselect → VoidCallback
-
Fired when a touch off the selection clears it.
final
- onSelect → VoidCallback
-
Fired when a pointer selects an entity.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
viewerCamera
→ ValueListenable<
Matrix4> ? -
The pinch and pan applied on top of hostCamera.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< EntityGestures> -
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
-
sliver(
{Key? key}) → Widget -
Available on Widget, provided by the SliverExtension extension
Wraps this widget in a SliverToBoxAdapter. -
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