MultiSelectableSelectionContainerDelegate class Null safety
An abstract base class for updating multiple selectable children.
This class provide basic SelectionEvent handling and child Selectable updating. The subclass needs to implement ensureChildUpdated to ensure child Selectable is updated properly.
This class optimize the selection update by keeping track of the Selectables that currently contain the selection edges.
- Inheritance
-
- Object
- SelectionContainerDelegate
- MultiSelectableSelectionContainerDelegate
- Mixed in types
Constructors
Properties
-
compareOrder
→ Comparator<
Selectable> -
The compare function this delegate used for determining the selection
order of the selectables.
protected">@protectedread-only
- containerSize → Size
-
Gets the size of the SelectionContainer of this delegate.
read-onlyinherited
- currentSelectionEndIndex ↔ int
-
The current selectable that contains the selection end edge.
protected">@protectedread / write
- currentSelectionStartIndex ↔ int
-
The current selectable that contains the selection start edge.
protected">@protectedread / write
- hashCode → int
-
The hash code for this object.
read-onlyinherited
- hasListeners → bool
- Whether any listeners are currently registered.
- runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
-
selectables
↔ List<
Selectable> -
Gets the list of selectables this delegate is managing.
read / write
- value → SelectionGeometry
-
The current value of the object. When the value changes, the callbacks
registered with addListener will be invoked.
read-onlyoverride
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.
mustCallSuper">@mustCallSuperprotected">@protected
-
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.
protected">@protected
-
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.
protected">@protected
-
getSelectedContent(
) → SelectedContent? -
Copies the selected contents of all selectables.
override
-
getSelectionGeometry(
) → SelectionGeometry -
Gets the combined selection geometry for child selectables.
protected">@protected
-
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.
protected">@protected
-
handleSelectAll(
SelectAllSelectionEvent event) → SelectionResult -
Selects all contents of all selectables.
protected">@protected
-
handleSelectionEdgeUpdate(
SelectionEdgeUpdateEvent event) → SelectionResult -
Updates the selection edges.
protected">@protected
-
handleSelectWord(
SelectWordSelectionEvent event) → SelectionResult -
Selects a word in a selectable at the location
SelectWordSelectionEvent.globalPosition.
protected">@protected
-
layoutDidChange(
) → void - Notifies this delegate that layout of the container has changed.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited
-
notifyListeners(
) → void - Call all the registered listeners.
-
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