Trait druid::text::ImeHandlerRef [−][src]
pub trait ImeHandlerRef {
fn is_alive(&self) -> bool;
fn acquire(&self, mutable: bool) -> Option<Box<dyn InputHandler + 'static>>;
fn release(&self) -> bool;
}Expand description
A trait for input handlers registered by widgets.
A widget registers itself as accepting text input by calling
LifeCycleCtx::register_text_input while handling the
LifeCycle::WidgetAdded event.
The widget does not explicitly deregister afterwards; rather anytime
the widget tree changes, druid will call is_alive on each registered
ImeHandlerRef, and deregister those that return false.
Required methods
Mark the session as locked, and return a handle.
The lock can be read-write or read-only, indicated by the mutable flag.
if is_alive is true, this should always return Some(_).