MultiSelectableSelectionContainerDelegate class abstract

A delegate that handles events and updates for multiple Selectable children.

Updates are optimized by tracking which Selectables reside on the edges of a selection. Subclasses should implement ensureChildUpdated to describe how a Selectable should behave when added to a selection.

Inheritance
Mixed-in types

Constructors

MultiSelectableSelectionContainerDelegate()
Creates an instance of MultiSelectableSelectionContainerDelegate.

Properties

compareOrder Comparator<Selectable>
The compare function this delegate used for determining the selection order of the selectables.
no setter
containerSize Size
Gets the size of the SelectionContainer of this delegate.
no setterinherited
currentSelectionEndIndex int
The current Selectable that contains the selection end edge.
getter/setter pair
currentSelectionStartIndex int
The current Selectable that contains the selection start edge.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
hasSize bool
Whether the SelectionContainer has undergone layout and has a size.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectables List<Selectable>
Gets the list of Selectables this delegate is managing.
getter/setter pair
value SelectionGeometry
The current value of the object. When the value changes, the callbacks registered with addListener will be invoked.
no setteroverride

Methods

add(Selectable selectable) → void
Adds the selectable into the registrar.
override
addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
didChangeSelectables() → void
Called when this delegate finishes updating the Selectables.
dispatchSelectionEvent(SelectionEvent event) SelectionResult
Handles the SelectionEvent sent to this object.
override
dispatchSelectionEventToChild(Selectable selectable, SelectionEvent event) SelectionResult
Dispatches a selection event to a specific Selectable.
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).
override
ensureChildUpdated(Selectable selectable) → void
Ensures the Selectable child has received up to date selection event.
getSelectedContent() SelectedContent?
Copies the selected contents of all Selectables.
override
getSelectionGeometry() SelectionGeometry
Gets the combined SelectionGeometry for child Selectables.
getTransformFrom(Selectable child) Matrix4
Gets the paint transform from the Selectable child to SelectionContainer of this delegate.
inherited
getTransformTo(RenderObject? ancestor) Matrix4
Gets the paint transform from the SelectionContainer of this delegate to the ancestor.
inherited
handleClearSelection(ClearSelectionEvent event) SelectionResult
Removes the selection of all Selectables this delegate manages.
handleDirectionallyExtendSelection(DirectionallyExtendSelectionEvent event) SelectionResult
Extend current selection in a certain TextGranularity.
handleGranularlyExtendSelection(GranularlyExtendSelectionEvent event) SelectionResult
Extend current selection in a certain TextGranularity.
handleSelectAll(SelectAllSelectionEvent event) SelectionResult
Selects all contents of all Selectables.
handleSelectionEdgeUpdate(SelectionEdgeUpdateEvent event) SelectionResult
Updates the selection edges.
handleSelectParagraph(SelectParagraphSelectionEvent event) SelectionResult
Selects a paragraph in a Selectable at the location SelectParagraphSelectionEvent.globalPosition.
handleSelectWord(SelectWordSelectionEvent event) SelectionResult
Selects a word in a Selectable at the location SelectWordSelectionEvent.globalPosition.
layoutDidChange() → void
Notifies this delegate that layout of the container has changed.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
pushHandleLayers(LayerLink? startHandle, LayerLink? endHandle) → void
Marks this handler to be responsible for pushing LeaderLayers for the selection handles.
override
remove(Selectable selectable) → void
Removes the selectable from the registrar.
override
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
toString() String
A string representation of this object.
inherited

Operators

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