pub enum StateFlag {
Active,
Selected,
Focused,
Dragging,
Visible,
}Expand description
The state flags a parent group flips on a child through
View::set_state — the subset of State that the focus / activation
and visibility machinery drives, with side effects.
Visible is included here but does not propagate to children
(whole-tree redraw means there is no occlusion cache to maintain).
It is delivered per-child by Group::set_visible_descendant so
that widgets owning sibling scroll bars (e.g. ListViewer) can react. The
occlusion, shadow, and cursor flags remain excluded because their dropped
side effects are never routed through set_state at all.
§Turbo Vision heritage
The sf* flags routed through set_state: sfActive/sfSelected/
sfFocused/sfDragging/sfVisible. Excluded: sfExposed/sfShadow/sfCursor*.
Variants§
Active
sfActive — the view is in the active window/group chain.
Selected
sfSelected — the view is the current (selected) one in its owner.
Focused
sfFocused — the view is selected and its whole owner chain is active.
Dragging
sfDragging — the view is being dragged/resized.
Visible
sfVisible — the view is shown/hidden.
Unlike Active/Selected, this flag does NOT propagate to children
(whole-tree redraw means there is no occlusion cache to maintain).
Delivered by Group::set_visible_descendant so
that widgets that own sibling bars (e.g. ListViewer, Scroller) can
show/hide them in sync.
Trait Implementations§
impl Copy for StateFlag
impl Eq for StateFlag
impl StructuralPartialEq for StateFlag
Auto Trait Implementations§
impl Freeze for StateFlag
impl RefUnwindSafe for StateFlag
impl Send for StateFlag
impl Sync for StateFlag
impl Unpin for StateFlag
impl UnsafeUnpin for StateFlag
impl UnwindSafe for StateFlag
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<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§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
§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.