Skip to main content

TextBoxTextInputMethodClient

Struct TextBoxTextInputMethodClient 

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

The text input method client of a TextBox: what the text box gives the input method of the platform to work with.

The text box owns its client, so the client only holds weak handles to the text box and to its presenter.

Trait Implementations§

Source§

impl TextInputMethodClient for TextBoxTextInputMethodClient

Source§

fn events(&self) -> &TextInputMethodClientEvents

The events of the client.
Source§

fn text_view_visual(&self) -> Option<Ref<Visual>>

The visual that’s showing the text, or None when the client has none (a text box without a template).
Source§

fn surrounding_text(&self) -> String

Returns the text around the cursor, usually the current paragraph.
Source§

fn cursor_rectangle(&self) -> Rect

Gets the cursor rectangle relative to the text view visual.
Source§

fn selection(&self) -> TextSelection

Gets the selection that is currently active.
Source§

fn set_selection(&self, value: TextSelection)

Sets the selection that is currently active.
Source§

fn supports_preedit(&self) -> bool

Indicates if the text input method client is capable of displaying non-committed input on the cursor position.
Source§

fn supports_surrounding_text(&self) -> bool

Indicates if the text input method client supports sending surrounding text.
Source§

fn set_preedit_text(&self, preedit_text: Option<&str>)

Sets the non-committed input string.
Source§

fn set_preedit_text_with_cursor( &self, preedit_text: Option<&str>, cursor_pos: Option<i32>, )

Sets the non-committed input string and the cursor offset in that string.
Source§

fn execute_context_menu_action(&self, action: ContextMenuAction)

Executes a context menu action.
Source§

fn text_view_visual_changed(&self, handler: Rc<dyn Fn()>) -> Rc<dyn IDisposable>

Fires when the text view visual has changed. Disposing the returned handle unsubscribes.
Source§

fn cursor_rectangle_changed(&self, handler: Rc<dyn Fn()>) -> Rc<dyn IDisposable>

Fires when the cursor rectangle has changed. Disposing the returned handle unsubscribes.
Source§

fn surrounding_text_changed(&self, handler: Rc<dyn Fn()>) -> Rc<dyn IDisposable>

Fires when the surrounding text has changed. Disposing the returned handle unsubscribes.
Source§

fn selection_changed(&self, handler: Rc<dyn Fn()>) -> Rc<dyn IDisposable>

Fires when the selection has changed. Disposing the returned handle unsubscribes.
Source§

fn reset_requested(&self, handler: Rc<dyn Fn()>) -> Rc<dyn IDisposable>

Fires when client wants to reset the input state. Disposing the returned handle unsubscribes.
Source§

fn input_pane_activation_requested( &self, handler: Rc<dyn Fn()>, ) -> Rc<dyn IDisposable>

Fires when the client requires the input pane (on-screen keyboard) to be shown. Disposing the returned handle unsubscribes.
Source§

fn raise_text_view_visual_changed(&self)

Raises the event telling that the text view visual has changed.
Source§

fn raise_cursor_rectangle_changed(&self)

Raises the event telling that the cursor rectangle has changed.
Source§

fn raise_surrounding_text_changed(&self)

Raises the event telling that the surrounding text has changed.
Source§

fn raise_selection_changed(&self)

Raises the event telling that the selection has changed.
Source§

fn raise_input_pane_activation_requested(&self)

Raises the event asking for the input pane to be shown.
Source§

fn request_reset(&self)

Asks for the input state to be reset.

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<T> ClassDefaults for T
where T: ?Sized,

Source§

fn static_constructor()

The static constructor of a type: work done once per thread, after the properties of the type are registered and before its first instance exists (class handlers, affects_render, metadata overrides). Read more
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, 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.