pub trait IInputElement {
// Required methods
fn focusable(&self) -> bool;
fn is_enabled(&self) -> bool;
fn cursor(&self) -> Option<Rc<Cursor>>;
fn is_effectively_enabled(&self) -> bool;
fn is_effectively_visible(&self) -> bool;
fn is_keyboard_focus_within(&self) -> bool;
fn is_focused(&self) -> bool;
fn is_hit_test_visible(&self) -> bool;
fn is_pointer_over(&self) -> bool;
fn focus(
&self,
method: NavigationMethod,
key_modifiers: KeyModifiers,
) -> bool;
}Expand description
Defines input-related functionality for a control.
The only implementor is InputElement: object references to input
elements are Ref<InputElement>. The trait documents the contract; the
routed event members of the contract (add_handler, remove_handler,
raise_event) are inherited by every input element from Interactive.
Required Methods§
Sourcefn is_enabled(&self) -> bool
fn is_enabled(&self) -> bool
Whether the control is enabled for user interaction.
Sourcefn is_effectively_enabled(&self) -> bool
fn is_effectively_enabled(&self) -> bool
Whether this control and all its parents are enabled.
is_enabled is used to toggle the enabled state for individual
controls. This property takes into account the enabled state of this
control and its parent controls.
Sourcefn is_effectively_visible(&self) -> bool
fn is_effectively_visible(&self) -> bool
Whether this control and all its parents are visible.
Sourcefn is_keyboard_focus_within(&self) -> bool
fn is_keyboard_focus_within(&self) -> bool
Whether keyboard focus is anywhere within the element or its visual tree child elements.
Sourcefn is_focused(&self) -> bool
fn is_focused(&self) -> bool
Whether the control is focused.
Sourcefn is_hit_test_visible(&self) -> bool
fn is_hit_test_visible(&self) -> bool
Whether the control is considered for hit testing.
Sourcefn is_pointer_over(&self) -> bool
fn is_pointer_over(&self) -> bool
Whether the pointer is currently over the control.
Sourcefn focus(&self, method: NavigationMethod, key_modifiers: KeyModifiers) -> bool
fn focus(&self, method: NavigationMethod, key_modifiers: KeyModifiers) -> bool
Focuses the control. Returns whether the control was focused.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".