pub struct PlatformInputHandler { /* private fields */ }Implementations§
Source§impl PlatformInputHandler
impl PlatformInputHandler
pub fn new(cx: AsyncWindowContext, handler: Box<dyn InputHandler>) -> Self
pub fn selected_text_range( &mut self, ignore_disabled_input: bool, ) -> Option<UTF16Selection>
pub fn marked_text_range(&mut self) -> Option<Range<usize>>
pub fn text_for_range( &mut self, range_utf16: Range<usize>, adjusted: &mut Option<Range<usize>>, ) -> Option<String>
pub fn replace_text_in_range( &mut self, replacement_range: Option<Range<usize>>, text: &str, )
pub fn replace_and_mark_text_in_range( &mut self, range_utf16: Option<Range<usize>>, new_text: &str, new_selected_range: Option<Range<usize>>, )
pub fn unmark_text(&mut self)
pub fn bounds_for_range( &mut self, range_utf16: Range<usize>, ) -> Option<Bounds<Pixels>>
pub fn apple_press_and_hold_enabled(&mut self) -> bool
pub fn dispatch_input(&mut self, input: &str, window: &mut Window, cx: &mut App)
pub fn selected_bounds( &mut self, window: &mut Window, cx: &mut App, ) -> Option<Bounds<Pixels>>
pub fn character_index_for_point( &mut self, point: Point<Pixels>, ) -> Option<usize>
pub fn accepts_text_input(&mut self, window: &mut Window, cx: &mut App) -> bool
pub fn query_accepts_text_input(&mut self) -> bool
pub fn query_prefers_ime_for_printable_keys(&mut self) -> bool
Auto Trait Implementations§
impl Freeze for PlatformInputHandler
impl !RefUnwindSafe for PlatformInputHandler
impl !Send for PlatformInputHandler
impl !Sync for PlatformInputHandler
impl Unpin for PlatformInputHandler
impl UnsafeUnpin for PlatformInputHandler
impl !UnwindSafe for PlatformInputHandler
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
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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