pub trait MultiSelectableSelectionContainerDelegate:
Sized
+ SelectionContainerDelegate
+ ChangeNotifier
+ 'static {
Show 16 methods
// Required methods
fn multi_selectable_selection_container_delegate_data(
self: Handle<Self>,
app: &App,
) -> &MultiSelectableSelectionContainerDelegateData;
fn multi_selectable_selection_container_delegate_data_mut(
self: Handle<Self>,
app: &mut App,
) -> &mut MultiSelectableSelectionContainerDelegateData;
fn ensure_child_updated(
self: Handle<Self>,
app: &mut App,
selectable: AnySelectable,
);
// Provided methods
fn layout_did_change(self: Handle<Self>, app: &mut App) { ... }
fn did_change_selectables(self: Handle<Self>, app: &mut App) { ... }
fn get_selection_geometry(
self: Handle<Self>,
app: &mut App,
) -> SelectionGeometry { ... }
fn compare_order(
self: Handle<Self>,
app: &mut App,
a: AnySelectable,
b: AnySelectable,
) -> Ordering { ... }
fn handle_select_all(
self: Handle<Self>,
app: &mut App,
event: &SelectionEvent,
) -> SelectionResult { ... }
fn handle_select_word(
self: Handle<Self>,
app: &mut App,
event: &SelectionEvent,
) -> SelectionResult { ... }
fn handle_select_paragraph(
self: Handle<Self>,
app: &mut App,
event: &SelectionEvent,
) -> SelectionResult { ... }
fn handle_clear_selection(
self: Handle<Self>,
app: &mut App,
event: &SelectionEvent,
) -> SelectionResult { ... }
fn handle_granularly_extend_selection(
self: Handle<Self>,
app: &mut App,
event: &SelectionEvent,
) -> SelectionResult { ... }
fn handle_directionally_extend_selection(
self: Handle<Self>,
app: &mut App,
event: &SelectionEvent,
) -> SelectionResult { ... }
fn handle_selection_edge_update(
self: Handle<Self>,
app: &mut App,
event: &SelectionEvent,
) -> SelectionResult { ... }
fn dispose(self: Handle<Self>, app: &mut App) { ... }
fn dispatch_selection_event_to_child(
self: Handle<Self>,
app: &mut App,
selectable: AnySelectable,
event: &SelectionEvent,
) -> SelectionResult { ... }
}Expand description
A delegate that handles events and updates for multiple AnySelectable children.
Updates are optimized by tracking which selectables reside on the edges of a selection.
A subclass implements ensure_child_updated to describe how a
selectable behaves when it is added to a selection.
Required Methods§
Sourcefn multi_selectable_selection_container_delegate_data(
self: Handle<Self>,
app: &App,
) -> &MultiSelectableSelectionContainerDelegateData
fn multi_selectable_selection_container_delegate_data( self: Handle<Self>, app: &App, ) -> &MultiSelectableSelectionContainerDelegateData
Dart’s MultiSelectableSelectionContainerDelegate fields, held under the field
multi_selectable_selection_container_delegate
(multi_selectable_selection_container_delegate_accessors!).
Sourcefn multi_selectable_selection_container_delegate_data_mut(
self: Handle<Self>,
app: &mut App,
) -> &mut MultiSelectableSelectionContainerDelegateData
fn multi_selectable_selection_container_delegate_data_mut( self: Handle<Self>, app: &mut App, ) -> &mut MultiSelectableSelectionContainerDelegateData
Sourcefn ensure_child_updated(
self: Handle<Self>,
app: &mut App,
selectable: AnySelectable,
)
fn ensure_child_updated( self: Handle<Self>, app: &mut App, selectable: AnySelectable, )
Ensures the selectable child has received an up to date selection event.
This is called when a new selectable is added to the delegate and its screen location falls into the previous selection. Subclasses describe how the newly added selectable is updated.
Provided Methods§
Sourcefn layout_did_change(self: Handle<Self>, app: &mut App)
fn layout_did_change(self: Handle<Self>, app: &mut App)
Notifies this delegate that layout of the container has changed.
Sourcefn did_change_selectables(self: Handle<Self>, app: &mut App)
fn did_change_selectables(self: Handle<Self>, app: &mut App)
Called when this delegate finishes updating the selectables.
Sourcefn get_selection_geometry(
self: Handle<Self>,
app: &mut App,
) -> SelectionGeometry
fn get_selection_geometry( self: Handle<Self>, app: &mut App, ) -> SelectionGeometry
The combined SelectionGeometry for child selectables.
Sourcefn compare_order(
self: Handle<Self>,
app: &mut App,
a: AnySelectable,
b: AnySelectable,
) -> Ordering
fn compare_order( self: Handle<Self>, app: &mut App, a: AnySelectable, b: AnySelectable, ) -> Ordering
The compare function this delegate uses for the selection order of the selectables.
Defaults to screen order.
Sourcefn handle_select_all(
self: Handle<Self>,
app: &mut App,
event: &SelectionEvent,
) -> SelectionResult
fn handle_select_all( self: Handle<Self>, app: &mut App, event: &SelectionEvent, ) -> SelectionResult
Selects all contents of all selectables.
Sourcefn handle_select_word(
self: Handle<Self>,
app: &mut App,
event: &SelectionEvent,
) -> SelectionResult
fn handle_select_word( self: Handle<Self>, app: &mut App, event: &SelectionEvent, ) -> SelectionResult
Selects a word in a selectable at the location the event names.
Sourcefn handle_select_paragraph(
self: Handle<Self>,
app: &mut App,
event: &SelectionEvent,
) -> SelectionResult
fn handle_select_paragraph( self: Handle<Self>, app: &mut App, event: &SelectionEvent, ) -> SelectionResult
Selects a paragraph in a selectable at the location the event names.
Sourcefn handle_clear_selection(
self: Handle<Self>,
app: &mut App,
event: &SelectionEvent,
) -> SelectionResult
fn handle_clear_selection( self: Handle<Self>, app: &mut App, event: &SelectionEvent, ) -> SelectionResult
Removes the selection of all selectables this delegate manages.
Sourcefn handle_granularly_extend_selection(
self: Handle<Self>,
app: &mut App,
event: &SelectionEvent,
) -> SelectionResult
fn handle_granularly_extend_selection( self: Handle<Self>, app: &mut App, event: &SelectionEvent, ) -> SelectionResult
Extends the current selection by a waft_rendering::TextGranularity.
Sourcefn handle_directionally_extend_selection(
self: Handle<Self>,
app: &mut App,
event: &SelectionEvent,
) -> SelectionResult
fn handle_directionally_extend_selection( self: Handle<Self>, app: &mut App, event: &SelectionEvent, ) -> SelectionResult
Extends the current selection in a SelectionExtendDirection.
Sourcefn handle_selection_edge_update(
self: Handle<Self>,
app: &mut App,
event: &SelectionEvent,
) -> SelectionResult
fn handle_selection_edge_update( self: Handle<Self>, app: &mut App, event: &SelectionEvent, ) -> SelectionResult
Updates the selection edges.
Sourcefn dispose(self: Handle<Self>, app: &mut App)
fn dispose(self: Handle<Self>, app: &mut App)
Discards the resources the delegate holds; Dart’s dispose, as ChangeNotifier.dispose
takes it.
Sourcefn dispatch_selection_event_to_child(
self: Handle<Self>,
app: &mut App,
selectable: AnySelectable,
event: &SelectionEvent,
) -> SelectionResult
fn dispatch_selection_event_to_child( self: Handle<Self>, app: &mut App, selectable: AnySelectable, event: &SelectionEvent, ) -> SelectionResult
Dispatches a selection event to one selectable.
Override this method when a subclass needs to generate additional events or treatments
before sending the SelectionEvent.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".