IInputElement
trait · ferroui-base · v0.5.0
trait IInputElement
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.
Members
focusableis_enabledcursoris_effectively_enabledis_effectively_visibleis_keyboard_focus_withinis_focusedis_hit_test_visibleis_pointer_overfocus
focusable
fn focusable(self: &Self) -> bool
Whether the control can receive keyboard focus.
is_enabled
fn is_enabled(self: &Self) -> bool
Whether the control is enabled for user interaction.
cursor
fn cursor(self: &Self) -> Option<Rc<Cursor>>
The associated mouse cursor.
is_effectively_enabled
fn is_effectively_enabled(self: &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.
is_effectively_visible
fn is_effectively_visible(self: &Self) -> bool
Whether this control and all its parents are visible.
is_keyboard_focus_within
fn is_keyboard_focus_within(self: &Self) -> bool
Whether keyboard focus is anywhere within the element or its visual tree child elements.
is_focused
fn is_focused(self: &Self) -> bool
Whether the control is focused.
is_hit_test_visible
fn is_hit_test_visible(self: &Self) -> bool
Whether the control is considered for hit testing.
is_pointer_over
fn is_pointer_over(self: &Self) -> bool
Whether the pointer is currently over the control.
focus
fn focus(self: &Self, method: NavigationMethod, key_modifiers: KeyModifiers) -> bool
Focuses the control. Returns whether the control was focused.
Trait implementations
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.