Struct gpui2::ElementInputHandler
source · pub struct ElementInputHandler<V> { /* private fields */ }
Expand description
The canonical implementation of PlatformInputHandler
. Call WindowContext::handle_input
with an instance during your element’s paint.
Implementations§
source§impl<V: 'static> ElementInputHandler<V>
impl<V: 'static> ElementInputHandler<V>
Trait Implementations§
source§impl<V: InputHandler> PlatformInputHandler for ElementInputHandler<V>
impl<V: InputHandler> PlatformInputHandler for ElementInputHandler<V>
fn selected_text_range(&mut self) -> Option<Range<usize>>
fn marked_text_range(&mut self) -> Option<Range<usize>>
fn text_for_range(&mut self, range_utf16: Range<usize>) -> Option<String>
fn replace_text_in_range( &mut self, replacement_range: Option<Range<usize>>, text: &str )
fn replace_and_mark_text_in_range( &mut self, range_utf16: Option<Range<usize>>, new_text: &str, new_selected_range: Option<Range<usize>> )
fn unmark_text(&mut self)
fn bounds_for_range( &mut self, range_utf16: Range<usize> ) -> Option<Bounds<Pixels>>
Auto Trait Implementations§
impl<V> !RefUnwindSafe for ElementInputHandler<V>
impl<V> !Send for ElementInputHandler<V>
impl<V> !Sync for ElementInputHandler<V>
impl<V> Unpin for ElementInputHandler<V>where V: Unpin,
impl<V> !UnwindSafe for ElementInputHandler<V>
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