pub trait AbilityModifiers: Modifiable {
// Provided methods
fn hoverable<U: Into<bool>>(self, state: impl Res<U>) -> Self { ... }
fn focusable<U: Into<bool>>(self, state: impl Res<U>) -> Self { ... }
fn checkable<U: Into<bool>>(self, state: impl Res<U>) -> Self { ... }
fn navigable<U: Into<bool>>(self, state: impl Res<U>) -> Self { ... }
}Expand description
Modifiers for changing the abilities of a view.
Provided Methods§
Sourcefn hoverable<U: Into<bool>>(self, state: impl Res<U>) -> Self
fn hoverable<U: Into<bool>>(self, state: impl Res<U>) -> Self
Sets whether the view can be hovered by the mouse and receive mouse events.
Accepts a bool value or signal of type boolean state.
Views which cannot be hovered will not receive mouse input events unless
the view has captured the mouse input, see cx.capture().
§Example
Label::new(cx, "Hello Vizia")
.hoverable(false);Sourcefn focusable<U: Into<bool>>(self, state: impl Res<U>) -> Self
fn focusable<U: Into<bool>>(self, state: impl Res<U>) -> Self
Sets whether the view can be focused to receive keyboard input events.
Accepts a bool value or signal of type boolean state.
§Example
Label::new(cx, "Hello Vizia")
.focusable(false);Sourcefn checkable<U: Into<bool>>(self, state: impl Res<U>) -> Self
fn checkable<U: Into<bool>>(self, state: impl Res<U>) -> Self
Sets whether the view can be checked.
Accepts a bool value or signal of type boolean state.
§Example
Label::new(cx, "Hello Vizia")
.checkable(false);Sets whether the view can be navigated to, i.e. focused, by the keyboard.
Accepts a bool value or signal of type boolean state.
Navigating to a view with the keyboard gives the view keyboard focus and is typically done with tab and shift + tab key combinations.
§Example
Label::new(cx, "Hello Vizia")
.checkable(false);Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.