pub trait SelectionHandler: ListenableObject {
// Required methods
fn value(self: Handle<Self>, app: &App) -> SelectionGeometry;
fn push_handle_layers(
self: Handle<Self>,
app: &mut App,
start_handle: Option<Ref<LayerLink>>,
end_handle: Option<Ref<LayerLink>>,
);
fn selected_content(
self: Handle<Self>,
app: &App,
) -> Option<SelectedContent>;
fn selection(self: Handle<Self>, app: &App) -> Option<SelectedContentRange>;
fn dispatch_selection_event(
self: Handle<Self>,
app: &mut App,
event: &SelectionEvent,
) -> SelectionResult;
fn content_length(self: Handle<Self>, app: &App) -> usize;
}Expand description
The abstract interface to handle SelectionEvents.
Extended by Selectable and by a widget’s selection container delegate. This class returns
a SelectionGeometry as its value and notifies its listeners when that
geometry changes, as Dart’s ValueListenable<SelectionGeometry>.
Required Methods§
Sourcefn value(self: Handle<Self>, app: &App) -> SelectionGeometry
fn value(self: Handle<Self>, app: &App) -> SelectionGeometry
The geometry of the current selection.
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>>, )
Marks this handler responsible for pushing LeaderLayers for the
selection handles. None cleans up a layer it pushed before.
Sourcefn 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.
Sourcefn 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.
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
Handles a selection event sent to this object.
Sourcefn content_length(self: Handle<Self>, app: &App) -> usize
fn content_length(self: Handle<Self>, app: &App) -> usize
The length of the content in this object.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".