pub enum SelectMode {
Normal,
Enter,
Leave,
}Expand description
Which select/deselect side effects Group::set_current applies when
changing the current view.
Pass this to Group::set_current to control focus transitions:
Normal— the ordinary case: deselect the old current view, then select the new one. Use this for all normal focus changes.EnterandLeave— used internally byProgram::exec_viewwhen starting and ending a modal dialog.Enteravoids deselecting the view that was selected before the modal opened;Leaveavoids re-selecting it on close. Together they ensure the view underneath a modal dialog keeps itsselectedstate visually intact across the modal session.
Widget implementors almost always pass SelectMode::Normal; the
Enter/Leave variants are the modal-loop plumbing in Program.
§Turbo Vision heritage
Ports the selectMode enum (views.h):
normalSelect/enterSelect/leaveSelect.
Variants§
Normal
Deselect the old current, select the new one — the ordinary focus change.
Enter
Entering a modal: push focus onto the modal without deselecting the underlying current view.
Leave
Leaving a modal: pop focus back without re-selecting the underlying view
(its selected flag was preserved during the modal session).
Trait Implementations§
Source§impl Clone for SelectMode
impl Clone for SelectMode
Source§fn clone(&self) -> SelectMode
fn clone(&self) -> SelectMode
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SelectMode
Source§impl Debug for SelectMode
impl Debug for SelectMode
impl Eq for SelectMode
Source§impl PartialEq for SelectMode
impl PartialEq for SelectMode
impl StructuralPartialEq for SelectMode
Auto Trait Implementations§
impl Freeze for SelectMode
impl RefUnwindSafe for SelectMode
impl Send for SelectMode
impl Sync for SelectMode
impl Unpin for SelectMode
impl UnsafeUnpin for SelectMode
impl UnwindSafe for SelectMode
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
Mutably borrows from an owned value. Read more
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>
Convert
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>
Convert
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)
Convert
&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)
Convert
&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
Checks if this value is equivalent to the given key. Read more
§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
Checks if this value is equivalent to the given key. Read more
§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
Compare self to
key and return true if they are equal.