[−][src]Struct kas::draw::InputState
Input and highlighting state of a widget
This struct is used to adjust the appearance of DrawHandle
's primitives.
Multiple instances can be combined via std::ops::BitOr
: lhs | rhs
.
Fields
disabled: bool
Disabled widgets are not responsive to input and usually drawn in grey.
All other states should be ignored when disabled.
error: bool
Some widgets, such as EditBox
, use a red background on error
hover: bool
"Hover" is true if the mouse is over this element
depress: bool
Elements such as buttons, handles and menu entries may be depressed
(visually pushed) by a click or touch event or an accelerator key.
This is often visualised by a darker colour and/or by offsetting
graphics. The hover
state should be ignored when depressed.
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).
sel_focus: bool
"Selection focus" allows things such as text to be selected. Selection focus implies that the widget also has character focus.
Trait Implementations
impl BitOr<InputState> for InputState
[src]
type Output = Self
The resulting type after applying the |
operator.
pub fn bitor(self, rhs: Self) -> Self
[src]
impl Clone for InputState
[src]
pub fn clone(&self) -> InputState
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for InputState
[src]
impl Debug for InputState
[src]
impl Default for InputState
[src]
pub fn default() -> InputState
[src]
impl Eq for InputState
[src]
impl Hash for InputState
[src]
pub fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<InputState> for InputState
[src]
pub fn eq(&self, other: &InputState) -> bool
[src]
pub fn ne(&self, other: &InputState) -> bool
[src]
impl StructuralEq for InputState
[src]
impl StructuralPartialEq for InputState
[src]
Auto Trait Implementations
impl RefUnwindSafe for InputState
impl Send for InputState
impl Sync for InputState
impl Unpin for InputState
impl UnwindSafe for InputState
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,