Skip to main content

ICustomKeyboardNavigation

Trait ICustomKeyboardNavigation 

Source
pub trait ICustomKeyboardNavigation {
    // Required method
    fn get_next(
        &self,
        element: &Ref<InputElement>,
        direction: NavigationDirection,
    ) -> (bool, Option<Ref<InputElement>>);
}
Expand description

Designates a control as handling its own keyboard navigation.

An input element that implements it returns itself from the as_custom_keyboard_navigation virtual member of InputElement.

Required Methods§

Source

fn get_next( &self, element: &Ref<InputElement>, direction: NavigationDirection, ) -> (bool, Option<Ref<InputElement>>)

Gets the next element in the specified navigation direction.

element is the element being navigated from. Returns a tuple consisting of:

  • a boolean indicating whether the request was handled. If false is returned then custom navigation will be bypassed for the request.
  • if handled is true: the next element in the navigation direction, or None if default navigation should continue outside the element.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§