[][src]Enum azul_core::dom::TabIndex

pub enum TabIndex {
    Auto,
    OverrideInParent(usize),
    NoKeyboardFocus,
}

Variants

Auto

Automatic tab index, similar to simply setting focusable = "true" or tabindex = 0 (both have the effect of making the element focusable).

Sidenote: See https://www.w3.org/TR/html5/editing.html#sequential-focus-navigation-and-the-tabindex-attribute for interesting notes on tabindex and accessibility

OverrideInParent(usize)

Set the tab index in relation to its parent element. I.e. if you have a list of elements, the focusing order is restricted to the current parent.

Ex. a div might have:

This example is not tested
div (Auto)
|- element1 (OverrideInParent 0) <- current focus
|- element2 (OverrideInParent 5)
|- element3 (OverrideInParent 2)
|- element4 (Global 5)

When pressing tab repeatedly, the focusing order will be "element3, element2, element4, div", since OverrideInParent elements take precedence among global order.

NoKeyboardFocus

Elements can be focused in callbacks, but are not accessible via keyboard / tab navigation (-1)

Implementations

impl TabIndex[src]

pub fn get_index(&self) -> isize[src]

Returns the HTML-compatible number of the tabindex element

Trait Implementations

impl Clone for TabIndex[src]

impl Copy for TabIndex[src]

impl Debug for TabIndex[src]

impl Default for TabIndex[src]

impl Eq for TabIndex[src]

impl Hash for TabIndex[src]

impl Ord for TabIndex[src]

impl PartialEq<TabIndex> for TabIndex[src]

impl PartialOrd<TabIndex> for TabIndex[src]

impl StructuralEq for TabIndex[src]

impl StructuralPartialEq for TabIndex[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.