Skip to main content

TextInputConnection

Struct TextInputConnection 

Source
pub struct TextInputConnection { /* private fields */ }
Expand description

An interface for interacting with a text input control.

See also:

Implementations§

Source§

impl TextInputConnection

Source

pub fn attached(self: Handle<Self>, app: &mut App) -> bool

Whether this connection is currently interacting with the text input control.

Source

pub fn show(self: Handle<Self>, app: &mut App)

Requests that the text input control become visible.

Source

pub fn update_config( self: Handle<Self>, app: &mut App, configuration: TextInputConfiguration, )

Requests that the text input control update itself according to the new TextInputConfiguration.

Source

pub fn set_editing_state( self: Handle<Self>, app: &mut App, value: TextEditingValue, )

Requests that the text input control change its internal state to match the given state.

Source

pub fn set_editable_size_and_transform( self: Handle<Self>, app: &mut App, editable_box_size: Size, transform: Matrix4, )

Send the size and transform of the editable text to engine.

  1. editable_box_size: size of the render editable box.

  2. transform: a matrix that maps the local paint coordinate system to the PipelineOwner.rootNode.

Source

pub fn set_composing_rect(self: Handle<Self>, app: &mut App, rect: Rect)

Send the smallest rect that covers the text in the client that’s currently being composed.

If any of the 4 coordinates of the given Rect is not finite, a Rect of size (-1, -1) will be sent instead.

Source

pub fn set_caret_rect(self: Handle<Self>, app: &mut App, rect: Rect)

Sends the coordinates of caret rect. This is used on macOS for positioning the accent selection menu.

Source

pub fn set_selection_rects( self: Handle<Self>, app: &mut App, selection_rects: Vec<SelectionRect>, )

Send the bounding boxes of the current selected glyphs in the client to the platform’s text input plugin.

Source

pub fn update_style(self: Handle<Self>, app: &mut App, style: TextInputStyle)

Send text styling information.

Source

pub fn close(self: Handle<Self>, app: &mut App)

Stop interacting with the text input control.

After calling this method, the text input control might disappear if no other client attaches to it within this animation frame.

Source

pub fn connection_closed_received(self: Handle<Self>, app: &mut App)

Platform sent a notification informing the connection is closed.

TextInputConnection should clean current client connection.

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,