pub struct State(/* private fields */);Expand description
The states a part can be in, combined (a selected tab under the
pointer is SELECTED | HOVER). No flag is the resting state.
Implementations§
Source§impl State
impl State
pub const REST: State
pub const HOVER: State
pub const ACTIVE: State
pub const FOCUS: State
pub const SELECTED: State
pub const DISABLED: State
Sourcepub const ORDER: [(State, &'static str); 5]
pub const ORDER: [(State, &'static str); 5]
The flags, in the order their boxes apply (a later one wins): selected, hover, focus, active, disabled. The names are the tokens’ state names.
pub fn contains(self, other: State) -> bool
Sourcepub fn from_response(r: &Response) -> State
pub fn from_response(r: &Response) -> State
The state egui sees on a response: HOVER under the pointer,
ACTIVE while pressed, FOCUS with the keyboard focus, DISABLED
when not enabled. What only the widget knows (SELECTED) it adds
with State::with.
A focused widget whose state comes from here shows its focus by the
kit, so the focus plugin paints no ring of its own around it
(focus::own_ring). FOCUS is set only
while the focus is visible (focus::ring_shown,
the web’s :focus-visible): a click focuses without the focus look,
except in a text field, which shows its focus however it came.
Trait Implementations§
impl Copy for State
impl Eq for State
impl StructuralPartialEq for State
Auto Trait Implementations§
impl Freeze for State
impl RefUnwindSafe for State
impl Send for State
impl Sync for State
impl Unpin for State
impl UnsafeUnpin for State
impl UnwindSafe for State
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more