[][src]Struct kas::event::HighlightState

pub struct HighlightState {
    pub hover: bool,
    pub depress: bool,
    pub key_focus: bool,
    pub char_focus: bool,
}

Highlighting state of a widget

Fields

hover: bool

"Hover" is true if the mouse is over this element or if an active touch event is over the element.

depress: bool

Elements such as buttons may be depressed (visually pushed) by a click or touch event, but in this state the action can still be cancelled. Elements can also be depressed by keyboard activation.

If true, this likely implies hover is also true.

key_focus: bool

Keyboard navigation of UIs moves a "focus" from widget to widget.

char_focus: bool

"Character focus" implies this widget is ready to receive text input (e.g. typing into an input field).

If true, this likely implies key_focus is also true.

Methods

impl HighlightState[src]

pub fn any(self) -> bool[src]

True if any part of the state is true

Trait Implementations

impl Clone for HighlightState[src]

impl Copy for HighlightState[src]

impl Debug for HighlightState[src]

impl Default for HighlightState[src]

impl Eq for HighlightState[src]

impl Hash for HighlightState[src]

impl PartialEq<HighlightState> for HighlightState[src]

impl StructuralEq for HighlightState[src]

impl StructuralPartialEq for HighlightState[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.