Skip to main content

TextSelectionHandleControls

Trait TextSelectionHandleControls 

Source
pub trait TextSelectionHandleControls: TextSelectionControls {
    // Provided methods
    fn build_toolbar(
        &self,
        app: &mut App,
        context: BuildContext,
        global_editable_region: Rect,
        text_line_height: f64,
        selection_midpoint: Offset,
        endpoints: &[TextSelectionPoint],
        delegate: AnyTextSelectionDelegate,
        clipboard_status: Option<Ref<ClipboardStatusNotifier>>,
        last_secondary_tap_down_position: Option<Offset>,
    ) -> WidgetRef { ... }
    fn can_cut(&self, app: &App, delegate: AnyTextSelectionDelegate) -> bool { ... }
    fn can_copy(&self, app: &App, delegate: AnyTextSelectionDelegate) -> bool { ... }
    fn can_paste(&self, app: &App, delegate: AnyTextSelectionDelegate) -> bool { ... }
    fn can_select_all(
        &self,
        app: &App,
        delegate: AnyTextSelectionDelegate,
    ) -> bool { ... }
    fn handle_cut(
        &self,
        app: &mut App,
        delegate: AnyTextSelectionDelegate,
        clipboard_status: Option<Handle<ClipboardStatusNotifier>>,
    ) { ... }
    fn handle_copy(
        &self,
        app: &mut App,
        delegate: AnyTextSelectionDelegate,
        clipboard_status: Option<Handle<ClipboardStatusNotifier>>,
    ) { ... }
    fn handle_paste(
        &self,
        app: &mut App,
        delegate: AnyTextSelectionDelegate,
    ) -> Task<()> β“˜ { ... }
    fn handle_select_all(
        &self,
        app: &mut App,
        delegate: AnyTextSelectionDelegate,
    ) { ... }
}
Expand description

TextSelectionControls that specifically do not manage the toolbar in order to leave that to EditableText.contextMenuBuilder.

A leaf that mixes this in forwards build_toolbar / can_* / handle_* to these defaults from its TextSelectionControls impl: a subtrait default does not override the supertrait method.

Marker that contextMenuBuilder is used.

Provided MethodsΒ§

Source

fn build_toolbar( &self, app: &mut App, context: BuildContext, global_editable_region: Rect, text_line_height: f64, selection_midpoint: Offset, endpoints: &[TextSelectionPoint], delegate: AnyTextSelectionDelegate, clipboard_status: Option<Ref<ClipboardStatusNotifier>>, last_secondary_tap_down_position: Option<Offset>, ) -> WidgetRef

πŸ‘ŽDeprecated:

Use contextMenuBuilder instead. This feature was deprecated after v3.3.0-0.5.pre.

Dart’s mixin buildToolbar; unused once contextMenuBuilder owns the menu.

Source

fn can_cut(&self, app: &App, delegate: AnyTextSelectionDelegate) -> bool

πŸ‘ŽDeprecated:

Use contextMenuBuilder instead. This feature was deprecated after v3.3.0-0.5.pre.

Source

fn can_copy(&self, app: &App, delegate: AnyTextSelectionDelegate) -> bool

πŸ‘ŽDeprecated:

Use contextMenuBuilder instead. This feature was deprecated after v3.3.0-0.5.pre.

Source

fn can_paste(&self, app: &App, delegate: AnyTextSelectionDelegate) -> bool

πŸ‘ŽDeprecated:

Use contextMenuBuilder instead. This feature was deprecated after v3.3.0-0.5.pre.

Source

fn can_select_all(&self, app: &App, delegate: AnyTextSelectionDelegate) -> bool

πŸ‘ŽDeprecated:

Use contextMenuBuilder instead. This feature was deprecated after v3.3.0-0.5.pre.

Source

fn handle_cut( &self, app: &mut App, delegate: AnyTextSelectionDelegate, clipboard_status: Option<Handle<ClipboardStatusNotifier>>, )

πŸ‘ŽDeprecated:

Use contextMenuBuilder instead. This feature was deprecated after v3.3.0-0.5.pre.

Source

fn handle_copy( &self, app: &mut App, delegate: AnyTextSelectionDelegate, clipboard_status: Option<Handle<ClipboardStatusNotifier>>, )

πŸ‘ŽDeprecated:

Use contextMenuBuilder instead. This feature was deprecated after v3.3.0-0.5.pre.

Source

fn handle_paste( &self, app: &mut App, delegate: AnyTextSelectionDelegate, ) -> Task<()> β“˜

πŸ‘ŽDeprecated:

Use contextMenuBuilder instead. This feature was deprecated after v3.3.0-0.5.pre.

Source

fn handle_select_all(&self, app: &mut App, delegate: AnyTextSelectionDelegate)

πŸ‘ŽDeprecated:

Use contextMenuBuilder instead. This feature was deprecated after v3.3.0-0.5.pre.

Dyn CompatibilityΒ§

This trait is dyn compatible.

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

ImplementorsΒ§