WindowPaintController class

Inheritance

Constructors

WindowPaintController({String initialMode = 'pan_zoom', Color initialColor = const Color(0xFF000000), List<DrawObject>? initialObjects})
Creates a controller for a window paint widget.
factory
WindowPaintController.fromValue(WindowPaintValue? value)
Creates a controller for a window paint widget from an initial WindowPaintValue.

Properties

color Color
The color of the paint tool.
getter/setter pair
colorBeforeSelection Color
The value of color before selecting an object.
no setter
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
isSelecting bool
Whether or not we're currently selecting a DrawObject.
no setter
mode String
The current paint mode being used.
getter/setter pair
objects List<DrawObject>
The objects to render.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectedObject DrawObject?
The selected object or null if none is selected.
no setter
selectedObjectIndex int
The index of the currently selected object, if any.
no setter
value WindowPaintValue
The current value stored in this notifier.
getter/setter pairinherited-getteroverride-setter

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
addObject(DrawObject object) → void
Calling this will notify all the listeners of this WindowPaintController that they need to update (it calls notifyListeners()). For this reason, this value should only be set between frames, e.g. in response to user actions, not during the build, layout, or paint phases.
addObjects(Iterable<DrawObject> objects) → void
Calling this will notify all the listeners of this WindowPaintController that they need to update (it calls notifyListeners()). For this reason, this value should only be set between frames, e.g. in response to user actions, not during the build, layout, or paint phases.
cancelSelectObject() → void
Restores color to the value it had before the object was selected.
dispose() → void
Discards any resources used by the object. After this is called, the object is not in a usable state and should be discarded (calls to addListener will throw after the object is disposed).
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
objectWasUpdated() → void
Calling this will notify all the listeners of this WindowPaintController that the last object is done. This is basically just a wrapper around notifyListeners().
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
removeObject(DrawObject object) → void
Calling this will notify all the listeners of this WindowPaintController that they need to update (it calls notifyListeners()). For this reason, this value should only be set between frames, e.g. in response to user actions, not during the build, layout, or paint phases.
removeObjectsWhere(bool test(DrawObject object)) → void
Calling this will notify all the listeners of this WindowPaintController that they need to update (it calls notifyListeners()). For this reason, this value should only be set between frames, e.g. in response to user actions, not during the build, layout, or paint phases.
selectObject(int index) → void
Stores the color so that it can be restored when the selection gets cancelled.
toString() String
A string representation of this object.
inherited

Operators

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