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Β§
Sourcefn 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.
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
Use contextMenuBuilder instead. This feature was deprecated after v3.3.0-0.5.pre.
Dartβs mixin buildToolbar; unused once contextMenuBuilder owns the menu.
fn can_cut(&self, app: &App, delegate: AnyTextSelectionDelegate) -> bool
Use contextMenuBuilder instead. This feature was deprecated after v3.3.0-0.5.pre.
fn can_copy(&self, app: &App, delegate: AnyTextSelectionDelegate) -> bool
Use contextMenuBuilder instead. This feature was deprecated after v3.3.0-0.5.pre.
fn can_paste(&self, app: &App, delegate: AnyTextSelectionDelegate) -> bool
Use contextMenuBuilder instead. This feature was deprecated after v3.3.0-0.5.pre.
fn can_select_all(&self, app: &App, delegate: AnyTextSelectionDelegate) -> bool
Use contextMenuBuilder instead. This feature was deprecated after v3.3.0-0.5.pre.
fn handle_cut( &self, app: &mut App, delegate: AnyTextSelectionDelegate, clipboard_status: Option<Handle<ClipboardStatusNotifier>>, )
Use contextMenuBuilder instead. This feature was deprecated after v3.3.0-0.5.pre.
fn handle_copy( &self, app: &mut App, delegate: AnyTextSelectionDelegate, clipboard_status: Option<Handle<ClipboardStatusNotifier>>, )
Use contextMenuBuilder instead. This feature was deprecated after v3.3.0-0.5.pre.
fn handle_paste( &self, app: &mut App, delegate: AnyTextSelectionDelegate, ) -> Task<()> β
Use contextMenuBuilder instead. This feature was deprecated after v3.3.0-0.5.pre.
fn handle_select_all(&self, app: &mut App, delegate: AnyTextSelectionDelegate)
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".