pub struct PlainStaticSelectionContainerDelegate { /* private fields */ }Expand description
Dart’s instantiable StaticSelectionContainerDelegate().
A delegate that handles selection events for the selectables in a SelectionContainer, which
SelectableRegion uses. A Waft app that needs another behavior writes its own struct of
StaticSelectionContainerDelegate and overrides the members it changes.
Implementations§
Source§impl PlainStaticSelectionContainerDelegate
impl PlainStaticSelectionContainerDelegate
Sourcepub fn new(app: &mut App) -> Ref<PlainStaticSelectionContainerDelegate>
pub fn new(app: &mut App) -> Ref<PlainStaticSelectionContainerDelegate>
Creates a delegate over no selectables and no selection.
Trait Implementations§
Source§impl ChangeNotifier for PlainStaticSelectionContainerDelegate
impl ChangeNotifier for PlainStaticSelectionContainerDelegate
fn change_notifier_data(&self) -> &ChangeNotifierData
fn change_notifier_data_mut(&mut self) -> &mut ChangeNotifierData
Source§fn will_add_listener(self: Handle<Self>, app: &mut App)
fn will_add_listener(self: Handle<Self>, app: &mut App)
Runs before the listener is stored. Dart overrides of
addListener that
work before super.addListener go here.Source§fn did_remove_listener(self: Handle<Self>, app: &mut App)
fn did_remove_listener(self: Handle<Self>, app: &mut App)
Runs after the listener is removed. Dart overrides of
removeListener that
work after super.removeListener go here.Source§impl MultiSelectableSelectionContainerDelegate for PlainStaticSelectionContainerDelegate
impl MultiSelectableSelectionContainerDelegate for PlainStaticSelectionContainerDelegate
Source§fn 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!).Source§fn 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
Source§fn 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.
Source§fn 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.
Source§fn 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.
Source§fn 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.
Source§fn 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.
Source§fn 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.
Source§fn 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.Source§fn 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. Read more
Source§fn 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. Read more
Source§fn 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.
Source§fn 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.Source§fn 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. Read more
Source§fn 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.Source§fn 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.Source§impl SelectionContainerDelegate for PlainStaticSelectionContainerDelegate
impl SelectionContainerDelegate for PlainStaticSelectionContainerDelegate
Source§fn selection_container_delegate_data(
self: Handle<Self>,
app: &App,
) -> &SelectionContainerDelegateData
fn selection_container_delegate_data( self: Handle<Self>, app: &App, ) -> &SelectionContainerDelegateData
The fields of this class.
Source§fn selection_container_delegate_data_mut(
self: Handle<Self>,
app: &mut App,
) -> &mut SelectionContainerDelegateData
fn selection_container_delegate_data_mut( self: Handle<Self>, app: &mut App, ) -> &mut SelectionContainerDelegateData
The fields of this class, mutably.
Source§fn as_selection_container_delegate(
self: Handle<Self>,
) -> AnySelectionContainerDelegate
fn as_selection_container_delegate( self: Handle<Self>, ) -> AnySelectionContainerDelegate
Erases this delegate for a
SelectionContainer, as Dart’s implicit upcast.Source§fn get_transform_from(
self: Handle<Self>,
app: &App,
child: AnySelectable,
) -> Matrix4
fn get_transform_from( self: Handle<Self>, app: &App, child: AnySelectable, ) -> Matrix4
Gets the paint transform from the
Selectable child to the SelectionContainer of
this delegate; the container must have been laid out.Source§fn get_transform_to(
self: Handle<Self>,
app: &App,
ancestor: Option<AnyRenderObject>,
) -> Matrix4
fn get_transform_to( self: Handle<Self>, app: &App, ancestor: Option<AnyRenderObject>, ) -> Matrix4
Gets the paint transform from the
SelectionContainer of this delegate to ancestor;
the container must have been laid out.Source§fn has_size(self: Handle<Self>, app: &App) -> bool
fn has_size(self: Handle<Self>, app: &App) -> bool
Whether the
SelectionContainer has undergone layout and has a size.Source§fn container_size(self: Handle<Self>, app: &App) -> Size
fn container_size(self: Handle<Self>, app: &App) -> Size
Gets the size of the
SelectionContainer of this delegate; it must have been laid out.Source§fn selection_container_context(self: Handle<Self>, app: &App) -> BuildContext
fn selection_container_context(self: Handle<Self>, app: &App) -> BuildContext
Dart’s
_selectionContainerContext!: the context of the container this delegate serves.Source§impl SelectionHandler for PlainStaticSelectionContainerDelegate
impl SelectionHandler for PlainStaticSelectionContainerDelegate
Source§fn value(self: Handle<Self>, app: &App) -> SelectionGeometry
fn value(self: Handle<Self>, app: &App) -> SelectionGeometry
The geometry of the current selection.
Source§fn 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>>, )
Marks this handler responsible for pushing
LeaderLayers for the
selection handles. None cleans up a layer it pushed before.Source§fn selected_content(self: Handle<Self>, app: &App) -> Option<SelectedContent>
fn selected_content(self: Handle<Self>, app: &App) -> Option<SelectedContent>
The selected content in this object, if anything is selected.
Source§fn selection(self: Handle<Self>, app: &App) -> Option<SelectedContentRange>
fn selection(self: Handle<Self>, app: &App) -> Option<SelectedContentRange>
The selected range in this object;
None when nothing is selected.Source§fn 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
Handles a selection event sent to this object.
Source§impl SelectionRegistrar for PlainStaticSelectionContainerDelegate
impl SelectionRegistrar for PlainStaticSelectionContainerDelegate
Source§fn add(self: Handle<Self>, app: &mut App, selectable: AnySelectable)
fn add(self: Handle<Self>, app: &mut App, selectable: AnySelectable)
Adds
selectable to the registrar.Source§fn remove(self: Handle<Self>, app: &mut App, selectable: AnySelectable)
fn remove(self: Handle<Self>, app: &mut App, selectable: AnySelectable)
Removes
selectable from the registrar.Source§fn as_selection_registrar(self: Handle<Self>) -> AnySelectionRegistrar
fn as_selection_registrar(self: Handle<Self>) -> AnySelectionRegistrar
Erases this registrar, as Dart’s implicit upcast.
Source§impl StaticSelectionContainerDelegate for PlainStaticSelectionContainerDelegate
impl StaticSelectionContainerDelegate for PlainStaticSelectionContainerDelegate
Source§fn static_selection_container_delegate_data(
self: Handle<Self>,
app: &App,
) -> &StaticSelectionContainerDelegateData
fn static_selection_container_delegate_data( self: Handle<Self>, app: &App, ) -> &StaticSelectionContainerDelegateData
Dart’s
StaticSelectionContainerDelegate fields, held under the field
static_selection_container_delegate
(static_selection_container_delegate_accessors!).Source§fn static_selection_container_delegate_data_mut(
self: Handle<Self>,
app: &mut App,
) -> &mut StaticSelectionContainerDelegateData
fn static_selection_container_delegate_data_mut( self: Handle<Self>, app: &mut App, ) -> &mut StaticSelectionContainerDelegateData
Source§fn did_receive_selection_event_for(
self: Handle<Self>,
app: &mut App,
selectable: AnySelectable,
for_end: Option<bool>,
)
fn did_receive_selection_event_for( self: Handle<Self>, app: &mut App, selectable: AnySelectable, for_end: Option<bool>, )
Tracks whether a selection edge update event for
selectable was received. Read moreSource§fn did_receive_selection_boundary_events(self: Handle<Self>, app: &mut App)
fn did_receive_selection_boundary_events(self: Handle<Self>, app: &mut App)
Updates the internal selection state after a
SelectionEvent that selects a boundary,
such as select-word, select-paragraph and select-all.Source§fn update_last_selection_edge_location(
self: Handle<Self>,
app: &mut App,
global_selection_edge_location: Offset,
for_end: bool,
)
fn update_last_selection_edge_location( self: Handle<Self>, app: &mut App, global_selection_edge_location: Offset, for_end: bool, )
Updates the last selection edge location of the edge
for_end names.Source§fn clear_internal_selection_state(self: Handle<Self>, app: &mut App)
fn clear_internal_selection_state(self: Handle<Self>, app: &mut App)
Clears the internal selection state: no selectable under this delegate has received a
start or end event, and no edge location is remembered.
Source§fn clear_internal_selection_state_for_selectable(
self: Handle<Self>,
app: &mut App,
selectable: AnySelectable,
)
fn clear_internal_selection_state_for_selectable( self: Handle<Self>, app: &mut App, selectable: AnySelectable, )
Clears the internal selection state of
selectable.Auto Trait Implementations§
impl !RefUnwindSafe for PlainStaticSelectionContainerDelegate
impl !Send for PlainStaticSelectionContainerDelegate
impl !Sync for PlainStaticSelectionContainerDelegate
impl !UnwindSafe for PlainStaticSelectionContainerDelegate
impl Forget for PlainStaticSelectionContainerDelegate
impl Freeze for PlainStaticSelectionContainerDelegatewhere
NonZero<u32>: Freeze,
&'static ElementVTable: Freeze,
*const u8 is !null: Freeze,
PhantomData<Option<Listener>>: Freeze,
*const RcInner<Cell<usize>> is !null: Freeze,
PhantomData<RcInner<Cell<usize>>>: Freeze,
PhantomData<AnySelectable>: Freeze,
PhantomData<fn() -> LayerLink>: Freeze,
*const RcInner<Keep> is !null: Freeze,
PhantomData<RcInner<Keep>>: Freeze,
&'static SelectableVTable: Freeze,
PhantomData<Rect>: Freeze,
impl Move for PlainStaticSelectionContainerDelegate
impl Unpin for PlainStaticSelectionContainerDelegate
impl UnsafeUnpin for PlainStaticSelectionContainerDelegatewhere
NonZeroU32Inner: UnsafeUnpin,
&'static ElementVTable: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<Option<Listener>>: UnsafeUnpin,
*const RcInner<Cell<usize>> is !null: UnsafeUnpin,
PhantomData<RcInner<Cell<usize>>>: UnsafeUnpin,
PhantomData<AnySelectable>: UnsafeUnpin,
PhantomData<fn() -> LayerLink>: UnsafeUnpin,
*const RcInner<Keep> is !null: UnsafeUnpin,
PhantomData<RcInner<Keep>>: UnsafeUnpin,
&'static SelectableVTable: UnsafeUnpin,
PhantomData<Rect>: UnsafeUnpin,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> ListenableObject for Twhere
T: ChangeNotifier,
impl<T> ListenableObject for Twhere
T: ChangeNotifier,
Source§impl<T> MultiSelectableSelectionContainerDelegateBase for T
impl<T> MultiSelectableSelectionContainerDelegateBase for T
Source§fn 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.Source§fn remove(self: Handle<Self>, app: &mut App, selectable: AnySelectable)
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
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)
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)
fn run_scheduled_task(self: Handle<Self>, app: &mut App)
Dart’s
runScheduledTask.Source§fn 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. Read moreSource§fn 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.Source§fn remove_selectable(
self: Handle<Self>,
app: &mut App,
selectable: AnySelectable,
)
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)
fn did_change_selectables(self: Handle<Self>, app: &mut App)
Dart’s
didChangeSelectables.Source§fn value(self: Handle<Self>, app: &App) -> SelectionGeometry
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)
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)
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
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
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
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
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>>,
)
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)
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>
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
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>
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>
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)
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
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>)
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
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
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
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
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
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
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)
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
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
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
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
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.impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> StaticSelectionContainerDelegateBase for Twhere
T: StaticSelectionContainerDelegate,
impl<T> StaticSelectionContainerDelegateBase for Twhere
T: StaticSelectionContainerDelegate,
Source§fn selected_content(self: Handle<Self>, app: &App) -> Option<SelectedContent>
fn selected_content(self: Handle<Self>, app: &App) -> Option<SelectedContent>
Dart’s
getSelectedContent, inherited.Source§fn 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, inherited.Source§fn selection(self: Handle<Self>, app: &App) -> Option<SelectedContentRange>
fn selection(self: Handle<Self>, app: &App) -> Option<SelectedContentRange>
Dart’s
getSelection, inherited.Source§fn 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, inherited.Source§fn remove(self: Handle<Self>, app: &mut App, selectable: AnySelectable)
fn remove(self: Handle<Self>, app: &mut App, selectable: AnySelectable)
Dart’s
StaticSelectionContainerDelegate.remove.Source§fn did_receive_selection_event_for(
self: Handle<Self>,
app: &mut App,
selectable: AnySelectable,
for_end: Option<bool>,
)
fn did_receive_selection_event_for( self: Handle<Self>, app: &mut App, selectable: AnySelectable, for_end: Option<bool>, )
Dart’s
didReceiveSelectionEventFor.Source§fn did_receive_selection_boundary_events(self: Handle<Self>, app: &mut App)
fn did_receive_selection_boundary_events(self: Handle<Self>, app: &mut App)
Dart’s
didReceiveSelectionBoundaryEvents.Source§fn update_last_selection_edge_location(
self: Handle<Self>,
app: &mut App,
global_selection_edge_location: Offset,
for_end: bool,
)
fn update_last_selection_edge_location( self: Handle<Self>, app: &mut App, global_selection_edge_location: Offset, for_end: bool, )
Dart’s
updateLastSelectionEdgeLocation.Source§fn update_last_selection_edge_locations_from_geometries(
self: Handle<Self>,
app: &mut App,
)
fn update_last_selection_edge_locations_from_geometries( self: Handle<Self>, app: &mut App, )
Dart’s
_updateLastSelectionEdgeLocationsFromGeometries.Source§fn clear_internal_selection_state(self: Handle<Self>, app: &mut App)
fn clear_internal_selection_state(self: Handle<Self>, app: &mut App)
Dart’s
clearInternalSelectionState.Source§fn clear_internal_selection_state_for_selectable(
self: Handle<Self>,
app: &mut App,
selectable: AnySelectable,
)
fn clear_internal_selection_state_for_selectable( self: Handle<Self>, app: &mut App, selectable: AnySelectable, )
Dart’s
clearInternalSelectionStateForSelectable.Source§fn 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.Source§fn 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.Source§fn 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.Source§fn 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.Source§fn 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.Source§fn 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: mark the edge the child is about to receive, and
bring it up to date, before sending the event on.Source§fn ensure_child_updated(
self: Handle<Self>,
app: &mut App,
selectable: AnySelectable,
)
fn ensure_child_updated( self: Handle<Self>, app: &mut App, selectable: AnySelectable, )
Dart’s
ensureChildUpdated: synthesize the edge event the child has not seen, from the
last edge location, so a selectable added inside the selection is selected at once.Source§fn did_change_selectables(self: Handle<Self>, app: &mut App)
fn did_change_selectables(self: Handle<Self>, app: &mut App)
Dart’s
didChangeSelectables: replay the last edge updates over the new list, then drop
the selectables that are gone from the edge bookkeeping.