Struct i_slint_core::window::InputMethodProperties
source · #[non_exhaustive]pub struct InputMethodProperties {
pub text: SharedString,
pub cursor_position: usize,
pub anchor_position: Option<usize>,
pub preedit_text: SharedString,
pub preedit_offset: usize,
pub cursor_rect_origin: LogicalPosition,
pub cursor_rect_size: LogicalSize,
pub anchor_point: LogicalPosition,
pub input_type: InputType,
}
Expand description
This struct holds properties related to an input method.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.text: SharedString
The text surrounding the cursor.
This field does not include pre-edit text or composition.
cursor_position: usize
The position of the cursor in bytes within the text
.
anchor_position: Option<usize>
When there is a selection, this is the position of the second anchor for the beginning (or the end) of the selection.
preedit_text: SharedString
The current value of the pre-edit text as known by the input method. This is the text currently being edited but not yet committed. When empty, there is no pre-edit text.
preedit_offset: usize
When the preedit_text
is not empty, this is the offset of the pre-edit within the text
.
cursor_rect_origin: LogicalPosition
The top-left corner of the cursor rectangle in window coordinates.
cursor_rect_size: LogicalSize
The size of the cursor rectangle.
anchor_point: LogicalPosition
The position of the anchor (bottom). Only meaningful if anchor_position is Some
input_type: InputType
The type of input for the text edit.
Trait Implementations§
source§impl Clone for InputMethodProperties
impl Clone for InputMethodProperties
source§fn clone(&self) -> InputMethodProperties
fn clone(&self) -> InputMethodProperties
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for InputMethodProperties
impl Debug for InputMethodProperties
source§impl Default for InputMethodProperties
impl Default for InputMethodProperties
source§fn default() -> InputMethodProperties
fn default() -> InputMethodProperties
Auto Trait Implementations§
impl Freeze for InputMethodProperties
impl RefUnwindSafe for InputMethodProperties
impl Send for InputMethodProperties
impl !Sync for InputMethodProperties
impl Unpin for InputMethodProperties
impl UnwindSafe for InputMethodProperties
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)