pub trait MultiSelectableSelectionContainerDelegateBase: MultiSelectableSelectionContainerDelegate {
Show 38 methods
// Provided methods
fn add(self: Handle<Self>, app: &mut App, selectable: AnySelectable) { ... }
fn remove(self: Handle<Self>, app: &mut App, selectable: AnySelectable) { ... }
fn dispatch_selection_event_to_child(
self: Handle<Self>,
app: &mut App,
selectable: AnySelectable,
event: &SelectionEvent,
) -> SelectionResult { ... }
fn schedule_selectable_update(self: Handle<Self>, app: &mut App) { ... }
fn run_scheduled_task(self: Handle<Self>, app: &mut App) { ... }
fn update_selectables(self: Handle<Self>, app: &mut App) { ... }
fn flush_additions(self: Handle<Self>, app: &mut App) { ... }
fn remove_selectable(
self: Handle<Self>,
app: &mut App,
selectable: AnySelectable,
) { ... }
fn did_change_selectables(self: Handle<Self>, app: &mut App) { ... }
fn value(self: Handle<Self>, app: &App) -> SelectionGeometry { ... }
fn update_selection_geometry(self: Handle<Self>, app: &mut App) { ... }
fn handle_selectable_geometry_change(self: Handle<Self>, app: &mut App) { ... }
fn get_selection_geometry(
self: Handle<Self>,
app: &mut App,
) -> SelectionGeometry { ... }
fn adjust_selection_index_based_on_selection_geometry(
self: Handle<Self>,
app: &App,
current_index: i32,
toward_index: i32,
) -> i32 { ... }
fn compare_order(
self: Handle<Self>,
app: &mut App,
a: AnySelectable,
b: AnySelectable,
) -> Ordering { ... }
fn get_bounding_box(
self: Handle<Self>,
app: &mut App,
selectable: AnySelectable,
) -> Rect { ... }
fn push_handle_layers(
self: Handle<Self>,
app: &mut App,
start_handle: Option<Ref<LayerLink>>,
end_handle: Option<Ref<LayerLink>>,
) { ... }
fn update_handle_layers_and_owners(self: Handle<Self>, app: &mut App) { ... }
fn selected_content(
self: Handle<Self>,
app: &App,
) -> Option<SelectedContent> { ... }
fn content_length(self: Handle<Self>, app: &App) -> usize { ... }
fn selection(self: Handle<Self>, app: &App) -> Option<SelectedContentRange> { ... }
fn calculate_local_range(
self: Handle<Self>,
app: &App,
selections: &[(usize, Option<SelectedContentRange>)],
) -> Option<SelectedContentRange> { ... }
fn flush_inactive_selections(self: Handle<Self>, app: &mut App) { ... }
fn handle_select_all(
self: Handle<Self>,
app: &mut App,
event: &SelectionEvent,
) -> SelectionResult { ... }
fn clear_selectables(
self: Handle<Self>,
app: &mut App,
skip_index: Option<i32>,
) { ... }
fn handle_select_boundary(
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 assert_selection_indices_agree(self: Handle<Self>, app: &App) { ... }
fn handle_selection_edge_update(
self: Handle<Self>,
app: &mut App,
event: &SelectionEvent,
) -> SelectionResult { ... }
fn init_selection(
self: Handle<Self>,
app: &mut App,
event: &SelectionEvent,
is_end: bool,
) -> SelectionResult { ... }
fn adjust_selection(
self: Handle<Self>,
app: &mut App,
event: &SelectionEvent,
is_end: bool,
) -> SelectionResult { ... }
fn dispatch_selection_event(
self: Handle<Self>,
app: &mut App,
event: &SelectionEvent,
) -> SelectionResult { ... }
fn set_extend_selection_in_progress(
self: Handle<Self>,
app: &mut App,
value: bool,
) { ... }
fn dispose(self: Handle<Self>, app: &mut App) { ... }
}Expand description
The bodies of Dart’s MultiSelectableSelectionContainerDelegate, over
MultiSelectableSelectionContainerDelegateData.
Every MultiSelectableSelectionContainerDelegate implements this, so an override that runs
the inherited body calls it trait-qualified,
MultiSelectableSelectionContainerDelegateBase::remove(self, app, selectable), where Dart
writes super.remove(selectable).
Provided Methods§
Sourcefn add(self: Handle<Self>, app: &mut App, selectable: AnySelectable)
fn add(self: Handle<Self>, app: &mut App, selectable: AnySelectable)
Dart’s MultiSelectableSelectionContainerDelegate.add: queue the selectable until after
this frame, when the container has laid it out.
Sourcefn remove(self: Handle<Self>, app: &mut App, selectable: AnySelectable)
fn remove(self: Handle<Self>, app: &mut App, selectable: AnySelectable)
Dart’s MultiSelectableSelectionContainerDelegate.remove.
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
Dart’s dispatchSelectionEventToChild: send the event to the selectable.
Sourcefn schedule_selectable_update(self: Handle<Self>, app: &mut App)
fn schedule_selectable_update(self: Handle<Self>, app: &mut App)
Dart’s _scheduleSelectableUpdate: one update per frame, on the microtask queue when the
frame’s own callbacks are running so a nested container is updated in the same frame.
Sourcefn run_scheduled_task(self: Handle<Self>, app: &mut App)
fn run_scheduled_task(self: Handle<Self>, app: &mut App)
Dart’s runScheduledTask.
Sourcefn update_selectables(self: Handle<Self>, app: &mut App)
fn update_selectables(self: Handle<Self>, app: &mut App)
Dart’s _updateSelectables: fold the selectables added since the last frame in, then let
the geometry catch up with them.
Dart’s first step, removing off-screen selectables, is the registrant’s own: a selectable with no content removes itself from its registrar.
Sourcefn flush_additions(self: Handle<Self>, app: &mut App)
fn flush_additions(self: Handle<Self>, app: &mut App)
Dart’s _flushAdditions: merge the new selectables into screen order, keeping the
selection indices on the selectables they named.
Sourcefn remove_selectable(
self: Handle<Self>,
app: &mut App,
selectable: AnySelectable,
)
fn remove_selectable( self: Handle<Self>, app: &mut App, selectable: AnySelectable, )
Dart’s _removeSelectable.
Sourcefn did_change_selectables(self: Handle<Self>, app: &mut App)
fn did_change_selectables(self: Handle<Self>, app: &mut App)
Dart’s didChangeSelectables.
Sourcefn value(self: Handle<Self>, app: &App) -> SelectionGeometry
fn value(self: Handle<Self>, app: &App) -> SelectionGeometry
Dart’s value: the combined geometry of the selectables.
Sourcefn update_selection_geometry(self: Handle<Self>, app: &mut App)
fn update_selection_geometry(self: Handle<Self>, app: &mut App)
Dart’s _updateSelectionGeometry: fold the selectables’ geometries into value, telling
listeners when it changed, and hand the handles to the selectables on the edges.
Sourcefn handle_selectable_geometry_change(self: Handle<Self>, app: &mut App)
fn handle_selectable_geometry_change(self: Handle<Self>, app: &mut App)
Dart’s _handleSelectableGeometryChange.
Sourcefn get_selection_geometry(
self: Handle<Self>,
app: &mut App,
) -> SelectionGeometry
fn get_selection_geometry( self: Handle<Self>, app: &mut App, ) -> SelectionGeometry
Dart’s getSelectionGeometry: one geometry covering the selectables from the start edge
to the end edge, in the container’s coordinates.
Sourcefn adjust_selection_index_based_on_selection_geometry(
self: Handle<Self>,
app: &App,
current_index: i32,
toward_index: i32,
) -> i32
fn adjust_selection_index_based_on_selection_geometry( self: Handle<Self>, app: &App, current_index: i32, toward_index: i32, ) -> i32
Dart’s _adjustSelectionIndexBasedOnSelectionGeometry: the current edge index may point
at a selectable whose own selection is collapsed at its edge, so move it toward the
opposite edge to one with a selection.
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
Dart’s compareOrder: the default is screen order.
Sourcefn get_bounding_box(
self: Handle<Self>,
app: &mut App,
selectable: AnySelectable,
) -> Rect
fn get_bounding_box( self: Handle<Self>, app: &mut App, selectable: AnySelectable, ) -> Rect
Dart’s _getBoundingBox: every bounding box of the selectable, unioned.
Sourcefn push_handle_layers(
self: Handle<Self>,
app: &mut App,
start_handle: Option<Ref<LayerLink>>,
end_handle: Option<Ref<LayerLink>>,
)
fn push_handle_layers( self: Handle<Self>, app: &mut App, start_handle: Option<Ref<LayerLink>>, end_handle: Option<Ref<LayerLink>>, )
Dart’s pushHandleLayers.
Sourcefn update_handle_layers_and_owners(self: Handle<Self>, app: &mut App)
fn update_handle_layers_and_owners(self: Handle<Self>, app: &mut App)
Dart’s _updateHandleLayersAndOwners: hand both handle layers to the selectables that
hold the selection edges, hiding a handle outside the container’s drawable area.
Sourcefn selected_content(self: Handle<Self>, app: &App) -> Option<SelectedContent>
fn selected_content(self: Handle<Self>, app: &App) -> Option<SelectedContent>
Dart’s getSelectedContent: the selected contents of all selectables, concatenated.
Sourcefn content_length(self: Handle<Self>, app: &App) -> usize
fn content_length(self: Handle<Self>, app: &App) -> usize
Dart’s contentLength: the sum of every selectable’s content length.
Sourcefn selection(self: Handle<Self>, app: &App) -> Option<SelectedContentRange>
fn selection(self: Handle<Self>, app: &App) -> Option<SelectedContentRange>
Dart’s getSelection: the selection range across the selectables, in content offsets.
Sourcefn calculate_local_range(
self: Handle<Self>,
app: &App,
selections: &[(usize, Option<SelectedContentRange>)],
) -> Option<SelectedContentRange>
fn calculate_local_range( self: Handle<Self>, app: &App, selections: &[(usize, Option<SelectedContentRange>)], ) -> Option<SelectedContentRange>
Dart’s _calculateLocalRange: the range the selectables’ own ranges make up, offset by
the content before them.
Sourcefn flush_inactive_selections(self: Handle<Self>, app: &mut App)
fn flush_inactive_selections(self: Handle<Self>, app: &mut App)
Dart’s _flushInactiveSelections: clear the selection of every selectable outside the
edges, or of every selectable but the one edge that exists.
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
Dart’s handleSelectAll: select every selectable.
Sourcefn clear_selectables(self: Handle<Self>, app: &mut App, skip_index: Option<i32>)
fn clear_selectables(self: Handle<Self>, app: &mut App, skip_index: Option<i32>)
Dart’s _clearSelectables: clear the selection of every selectable but skip_index.
Sourcefn handle_select_boundary(
self: Handle<Self>,
app: &mut App,
event: &SelectionEvent,
) -> SelectionResult
fn handle_select_boundary( self: Handle<Self>, app: &mut App, event: &SelectionEvent, ) -> SelectionResult
Dart’s _handleSelectBoundary: the word or paragraph at the event’s position, in the
selectable under it, or the nearest one when no bounding box contains it.
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
Dart’s handleSelectWord.
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
Dart’s handleSelectParagraph.
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
Dart’s handleClearSelection: clear the selection of every selectable.
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
Dart’s handleGranularlyExtendSelection.
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
Dart’s handleDirectionallyExtendSelection.
Sourcefn assert_selection_indices_agree(self: Handle<Self>, app: &App)
fn assert_selection_indices_agree(self: Handle<Self>, app: &App)
Dart’s assert((currentSelectionStartIndex == -1) == (currentSelectionEndIndex == -1)),
as a debug check.
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
Dart’s handleSelectionEdgeUpdate: start the selection when the edge is new, and move it
across the selectables otherwise.
Sourcefn init_selection(
self: Handle<Self>,
app: &mut App,
event: &SelectionEvent,
is_end: bool,
) -> SelectionResult
fn init_selection( self: Handle<Self>, app: &mut App, event: &SelectionEvent, is_end: bool, ) -> SelectionResult
Dart’s _initSelection: find the selectable that contains the new edge, sweeping from
the opposite edge when it exists.
Sourcefn adjust_selection(
self: Handle<Self>,
app: &mut App,
event: &SelectionEvent,
is_end: bool,
) -> SelectionResult
fn adjust_selection( self: Handle<Self>, app: &mut App, event: &SelectionEvent, is_end: bool, ) -> SelectionResult
Dart’s _adjustSelection: move an edge that already has a selectable, searching from the
opposite edge when the current one is out of the viewport.
Sourcefn dispatch_selection_event(
self: Handle<Self>,
app: &mut App,
event: &SelectionEvent,
) -> SelectionResult
fn dispatch_selection_event( self: Handle<Self>, app: &mut App, event: &SelectionEvent, ) -> SelectionResult
Dart’s dispatchSelectionEvent: hand the event to the handler its type names, keeping
the selectables in screen order while a selection is in progress.
Sourcefn set_extend_selection_in_progress(
self: Handle<Self>,
app: &mut App,
value: bool,
)
fn set_extend_selection_in_progress( self: Handle<Self>, app: &mut App, value: bool, )
Dart’s _extendSelectionInProgress =.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".