Skip to main content

MultiSelectableSelectionContainerDelegateBase

Trait MultiSelectableSelectionContainerDelegateBase 

Source
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§

Source

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.

Source

fn remove(self: Handle<Self>, app: &mut App, selectable: AnySelectable)

Dart’s MultiSelectableSelectionContainerDelegate.remove.

Source

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.

Source

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.

Source

fn run_scheduled_task(self: Handle<Self>, app: &mut App)

Dart’s runScheduledTask.

Source

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.

Source

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.

Source

fn remove_selectable( self: Handle<Self>, app: &mut App, selectable: AnySelectable, )

Dart’s _removeSelectable.

Source

fn did_change_selectables(self: Handle<Self>, app: &mut App)

Dart’s didChangeSelectables.

Source

fn value(self: Handle<Self>, app: &App) -> SelectionGeometry

Dart’s value: the combined geometry of the selectables.

Source

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.

Source

fn handle_selectable_geometry_change(self: Handle<Self>, app: &mut App)

Dart’s _handleSelectableGeometryChange.

Source

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.

Source

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.

Source

fn compare_order( self: Handle<Self>, app: &mut App, a: AnySelectable, b: AnySelectable, ) -> Ordering

Dart’s compareOrder: the default is screen order.

Source

fn get_bounding_box( self: Handle<Self>, app: &mut App, selectable: AnySelectable, ) -> Rect

Dart’s _getBoundingBox: every bounding box of the selectable, unioned.

Source

fn push_handle_layers( self: Handle<Self>, app: &mut App, start_handle: Option<Ref<LayerLink>>, end_handle: Option<Ref<LayerLink>>, )

Dart’s pushHandleLayers.

Source

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.

Source

fn selected_content(self: Handle<Self>, app: &App) -> Option<SelectedContent>

Dart’s getSelectedContent: the selected contents of all selectables, concatenated.

Source

fn content_length(self: Handle<Self>, app: &App) -> usize

Dart’s contentLength: the sum of every selectable’s content length.

Source

fn selection(self: Handle<Self>, app: &App) -> Option<SelectedContentRange>

Dart’s getSelection: the selection range across the selectables, in content offsets.

Source

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.

Source

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.

Source

fn handle_select_all( self: Handle<Self>, app: &mut App, event: &SelectionEvent, ) -> SelectionResult

Dart’s handleSelectAll: select every selectable.

Source

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.

Source

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.

Source

fn handle_select_word( self: Handle<Self>, app: &mut App, event: &SelectionEvent, ) -> SelectionResult

Dart’s handleSelectWord.

Source

fn handle_select_paragraph( self: Handle<Self>, app: &mut App, event: &SelectionEvent, ) -> SelectionResult

Dart’s handleSelectParagraph.

Source

fn handle_clear_selection( self: Handle<Self>, app: &mut App, event: &SelectionEvent, ) -> SelectionResult

Dart’s handleClearSelection: clear the selection of every selectable.

Source

fn handle_granularly_extend_selection( self: Handle<Self>, app: &mut App, event: &SelectionEvent, ) -> SelectionResult

Dart’s handleGranularlyExtendSelection.

Source

fn handle_directionally_extend_selection( self: Handle<Self>, app: &mut App, event: &SelectionEvent, ) -> SelectionResult

Dart’s handleDirectionallyExtendSelection.

Source

fn assert_selection_indices_agree(self: Handle<Self>, app: &App)

Dart’s assert((currentSelectionStartIndex == -1) == (currentSelectionEndIndex == -1)), as a debug check.

Source

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.

Source

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.

Source

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.

Source

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.

Source

fn set_extend_selection_in_progress( self: Handle<Self>, app: &mut App, value: bool, )

Dart’s _extendSelectionInProgress =.

Source

fn dispose(self: Handle<Self>, app: &mut App)

Dart’s dispose: stop listening to the selectables, forget them, and dispose the ChangeNotifier.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§