#[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,
pub clip_rect: Option<LogicalRect>,
}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: SharedStringThe text surrounding the cursor.
This field does not include pre-edit text or composition.
cursor_position: usizeThe 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: SharedStringThe 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: usizeWhen the preedit_text is not empty, this is the offset of the pre-edit within the text.
cursor_rect_origin: LogicalPositionThe top-left corner of the cursor rectangle in window coordinates.
cursor_rect_size: LogicalSizeThe size of the cursor rectangle.
anchor_point: LogicalPositionThe position of the anchor (bottom). Only meaningful if anchor_position is Some
input_type: InputTypeThe type of input for the text edit.
clip_rect: Option<LogicalRect>The clip rect in window coordinates
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 more