Skip to main content

MaterialTextSelectionControls

Struct MaterialTextSelectionControls 

Source
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

Source

pub const fn new() -> MaterialTextSelectionControls

Creates Android Material styled text selection controls.

Trait Implementations§

Source§

impl Debug for MaterialTextSelectionControls

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for MaterialTextSelectionControls

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl TextSelectionControls for MaterialTextSelectionControls

Source§

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.

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

Builder for material-style text selection handles.

Source§

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

👎Deprecated:

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

Whether the current selection of the text field managed by the given delegate can be extended to include the entire content of the text field. Read more
Source§

fn as_text_selection_handle_controls( &self, ) -> Option<&dyn TextSelectionHandleControls>

These controls as TextSelectionHandleControls when they mix it in: Dart’s selectionControls is TextSelectionHandleControls. Read more
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.

Whether the current selection of the text field managed by the given delegate can be removed from the text field and placed into the Clipboard. Read more
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.

Whether the current selection of the text field managed by the given delegate can be copied to the Clipboard. Read more
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.

Whether the text field managed by the given delegate supports pasting from the clipboard. Read more
Source§

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

👎Deprecated:

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

Call AnyTextSelectionDelegate::cut_selection to cut current selection. Read more
Source§

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

👎Deprecated:

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

Call AnyTextSelectionDelegate::copy_selection to copy current selection. Read more
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.

Call AnyTextSelectionDelegate::select_all to set the current selection to contain the entire text value. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>

Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,