pub struct RovingIndex {
pub count: usize,
pub current: usize,
pub orientation: Orientation,
pub loop_around: bool,
}Expand description
Roving TabIndex manager driving arrow-key navigation in menus, toolbars, and tab lists.
Fields§
§count: usize§current: usize§orientation: Orientation§loop_around: boolImplementations§
Source§impl RovingIndex
impl RovingIndex
pub fn new(count: usize, orientation: Orientation) -> Self
Sourcepub fn handle_key(&mut self, key: &str) -> Option<usize>
pub fn handle_key(&mut self, key: &str) -> Option<usize>
Process keyboard navigation event and return new selected index if changed.
Trait Implementations§
Source§impl Clone for RovingIndex
impl Clone for RovingIndex
Source§impl Debug for RovingIndex
impl Debug for RovingIndex
impl Eq for RovingIndex
Source§impl PartialEq for RovingIndex
impl PartialEq for RovingIndex
impl StructuralPartialEq for RovingIndex
Auto Trait Implementations§
impl Forget for RovingIndex
impl Freeze for RovingIndex
impl Move for RovingIndex
impl RefUnwindSafe for RovingIndex
impl Send for RovingIndex
impl Sync for RovingIndex
impl Unpin for RovingIndex
impl UnsafeUnpin for RovingIndex
impl UnwindSafe for RovingIndex
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.