Skip to main content

StaticSelectionContainerDelegate

Trait StaticSelectionContainerDelegate 

Source
pub trait StaticSelectionContainerDelegate: MultiSelectableSelectionContainerDelegate {
    // Required methods
    fn static_selection_container_delegate_data(
        self: Handle<Self>,
        app: &App,
    ) -> &StaticSelectionContainerDelegateData;
    fn static_selection_container_delegate_data_mut(
        self: Handle<Self>,
        app: &mut App,
    ) -> &mut StaticSelectionContainerDelegateData;

    // Provided methods
    fn did_receive_selection_event_for(
        self: Handle<Self>,
        app: &mut App,
        selectable: AnySelectable,
        for_end: Option<bool>,
    ) { ... }
    fn did_receive_selection_boundary_events(self: Handle<Self>, app: &mut App) { ... }
    fn update_last_selection_edge_location(
        self: Handle<Self>,
        app: &mut App,
        global_selection_edge_location: Offset,
        for_end: bool,
    ) { ... }
    fn clear_internal_selection_state(self: Handle<Self>, app: &mut App) { ... }
    fn clear_internal_selection_state_for_selectable(
        self: Handle<Self>,
        app: &mut App,
        selectable: AnySelectable,
    ) { ... }
}
Expand description

A delegate that handles selection events for selectables of more than one kind, remembering which edge each one has already received so a child that comes into the selection is brought up to date with a synthesized event.

Required Methods§

Source

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

Provided Methods§

Source

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.

With for_end Some(true) the selectable is registered as having received an end event, with Some(false) a start event, and with None both.

Call this when a SelectionEvent is dispatched to a child selectable managed by this delegate.

Source

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, )

Updates the last selection edge location of the edge for_end names.

Source

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, )

Clears the internal selection state of selectable.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§