pub struct ImeComposition {
pub active_underline_stroke: Stroke,
pub inactive_underline_stroke: Stroke,
pub legacy_visuals: bool,
}Expand description
Visual style for IME composition.
Fields§
§active_underline_stroke: StrokeStroke used to underline the actively composed segment.
inactive_underline_stroke: StrokeStroke used to underline those non-active segments.
legacy_visuals: boolIf true, IME (Input Method Editor) composition (preedit) text is rendered
the legacy way: visually indistinguishable from a text selection, with the
cursor always shown at the end of the composition.
If false, egui renders proper IME composition visuals: the cursor position
inside the composition is shown, and the active conversion segment is
highlighted (using the strokes configured above) distinctly from the rest of the
composition. This makes composing Chinese, Japanese and Korean text much
clearer.
The legacy visuals have known shortcomings, but the new visuals are not yet
fully reliable on every platform either (e.g. winit reports an incorrect
cursor position for Korean IMEs on Windows), so this remains configurable.
Defaults to true on Windows (because of the aforementioned winit bug) and
to false everywhere else.
Implementations§
Trait Implementations§
Source§impl Clone for ImeComposition
impl Clone for ImeComposition
Source§fn clone(&self) -> ImeComposition
fn clone(&self) -> ImeComposition
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ImeComposition
Source§impl Debug for ImeComposition
impl Debug for ImeComposition
Source§impl Default for ImeComposition
impl Default for ImeComposition
Source§impl<'de> Deserialize<'de> for ImeCompositionwhere
ImeComposition: Default,
impl<'de> Deserialize<'de> for ImeCompositionwhere
ImeComposition: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for ImeComposition
impl PartialEq for ImeComposition
Source§fn eq(&self, other: &ImeComposition) -> bool
fn eq(&self, other: &ImeComposition) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for ImeComposition
impl Serialize for ImeComposition
impl StructuralPartialEq for ImeComposition
Auto Trait Implementations§
impl Freeze for ImeComposition
impl RefUnwindSafe for ImeComposition
impl Send for ImeComposition
impl Sync for ImeComposition
impl Unpin for ImeComposition
impl UnsafeUnpin for ImeComposition
impl UnwindSafe for ImeComposition
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more