pub struct MaterialTextSelectionControls;Expand description
Android Material styled text selection controls.
material_text_selection_controls has a suitable instance of this class.
Implementations§
Source§impl MaterialTextSelectionControls
impl MaterialTextSelectionControls
Sourcepub const fn new() -> MaterialTextSelectionControls
pub const fn new() -> MaterialTextSelectionControls
Creates Android Material styled text selection controls.
Trait Implementations§
Source§impl TextSelectionControls for MaterialTextSelectionControls
impl TextSelectionControls for MaterialTextSelectionControls
Source§fn get_handle_size(&self, _text_line_height: f64) -> Size
fn get_handle_size(&self, _text_line_height: f64) -> Size
Returns the size of the Material handle.
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.
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.
Builder for material-style copy/paste text selection toolbar.
Source§fn build_handle(
&self,
app: &mut App,
context: BuildContext,
handle_type: TextSelectionHandleType,
_text_line_height: f64,
on_tap: Option<Listener>,
) -> WidgetRef
fn build_handle( &self, app: &mut App, context: BuildContext, handle_type: TextSelectionHandleType, _text_line_height: f64, on_tap: Option<Listener>, ) -> WidgetRef
Builder for material-style text selection handles.
Source§fn get_handle_anchor(
&self,
handle_type: TextSelectionHandleType,
_text_line_height: f64,
) -> Offset
fn get_handle_anchor( &self, handle_type: TextSelectionHandleType, _text_line_height: f64, ) -> Offset
Gets anchor for material-style text selection handles.
See TextSelectionControls::get_handle_anchor.
Source§fn can_select_all(&self, app: &App, delegate: AnyTextSelectionDelegate) -> bool
fn can_select_all(&self, app: &App, delegate: AnyTextSelectionDelegate) -> bool
Use contextMenuBuilder instead. This feature was deprecated after v3.3.0-0.5.pre.
delegate can be extended to include the entire content of the text
field. Read moreSource§fn as_text_selection_handle_controls(
&self,
) -> Option<&dyn TextSelectionHandleControls>
fn as_text_selection_handle_controls( &self, ) -> Option<&dyn TextSelectionHandleControls>
TextSelectionHandleControls when they mix it in: Dart’s
selectionControls is TextSelectionHandleControls. Read moreSource§fn can_cut(&self, app: &App, delegate: AnyTextSelectionDelegate) -> bool
fn can_cut(&self, app: &App, delegate: AnyTextSelectionDelegate) -> bool
Use contextMenuBuilder instead. This feature was deprecated after v3.3.0-0.5.pre.
Source§fn can_copy(&self, app: &App, delegate: AnyTextSelectionDelegate) -> bool
fn can_copy(&self, app: &App, delegate: AnyTextSelectionDelegate) -> bool
Use contextMenuBuilder instead. This feature was deprecated after v3.3.0-0.5.pre.
Source§fn can_paste(&self, app: &App, delegate: AnyTextSelectionDelegate) -> bool
fn can_paste(&self, app: &App, delegate: AnyTextSelectionDelegate) -> bool
Use contextMenuBuilder instead. This feature was deprecated after v3.3.0-0.5.pre.
delegate supports pasting
from the clipboard. Read moreSource§fn handle_cut(&self, app: &mut App, delegate: AnyTextSelectionDelegate)
fn handle_cut(&self, app: &mut App, delegate: AnyTextSelectionDelegate)
Use contextMenuBuilder instead. This feature was deprecated after v3.3.0-0.5.pre.
AnyTextSelectionDelegate::cut_selection to cut current selection. Read moreSource§fn handle_copy(&self, app: &mut App, delegate: AnyTextSelectionDelegate)
fn handle_copy(&self, app: &mut App, delegate: AnyTextSelectionDelegate)
Use contextMenuBuilder instead. This feature was deprecated after v3.3.0-0.5.pre.
AnyTextSelectionDelegate::copy_selection to copy current selection. Read moreSource§fn handle_paste(
&self,
app: &mut App,
delegate: AnyTextSelectionDelegate,
) -> Task<()> ⓘ
fn handle_paste( &self, app: &mut App, delegate: AnyTextSelectionDelegate, ) -> Task<()> ⓘ
Use contextMenuBuilder instead. This feature was deprecated after v3.3.0-0.5.pre.
AnyTextSelectionDelegate::paste_text to paste text. Read moreSource§fn handle_select_all(&self, app: &mut App, delegate: AnyTextSelectionDelegate)
fn handle_select_all(&self, app: &mut App, delegate: AnyTextSelectionDelegate)
Use contextMenuBuilder instead. This feature was deprecated after v3.3.0-0.5.pre.
AnyTextSelectionDelegate::select_all to set the current selection to
contain the entire text value. Read more