pub struct TextInputConnection { /* private fields */ }Expand description
An interface for interacting with a text input control.
See also:
TextInput::attach, a method used to establish aTextInputConnectionbetween the system’s text input and aTextInputClient.
Implementations§
Source§impl TextInputConnection
impl TextInputConnection
Sourcepub fn attached(self: Handle<Self>, app: &mut App) -> bool
pub fn attached(self: Handle<Self>, app: &mut App) -> bool
Whether this connection is currently interacting with the text input control.
Sourcepub fn show(self: Handle<Self>, app: &mut App)
pub fn show(self: Handle<Self>, app: &mut App)
Requests that the text input control become visible.
Sourcepub fn update_config(
self: Handle<Self>,
app: &mut App,
configuration: TextInputConfiguration,
)
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.
Sourcepub fn set_editing_state(
self: Handle<Self>,
app: &mut App,
value: TextEditingValue,
)
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.
Sourcepub fn set_editable_size_and_transform(
self: Handle<Self>,
app: &mut App,
editable_box_size: Size,
transform: Matrix4,
)
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.
-
editable_box_size: size of the render editable box. -
transform: a matrix that maps the local paint coordinate system to thePipelineOwner.rootNode.
Sourcepub fn set_composing_rect(self: Handle<Self>, app: &mut App, rect: Rect)
pub fn set_composing_rect(self: Handle<Self>, app: &mut App, rect: Rect)
Sourcepub fn set_caret_rect(self: Handle<Self>, app: &mut App, rect: Rect)
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.
Sourcepub fn set_selection_rects(
self: Handle<Self>,
app: &mut App,
selection_rects: Vec<SelectionRect>,
)
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.
Sourcepub fn update_style(self: Handle<Self>, app: &mut App, style: TextInputStyle)
pub fn update_style(self: Handle<Self>, app: &mut App, style: TextInputStyle)
Send text styling information.
Sourcepub fn close(self: Handle<Self>, app: &mut App)
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.
Sourcepub fn connection_closed_received(self: Handle<Self>, app: &mut App)
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.