ferroui-base 0.3.0

The base library of FerroUI: the property system, layout, input, styling, media, text, animation, data binding and the compositor
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use super::{InputElement, NavigationDirection};
use crate::Ref;

/// Defines a container in which the child controls can be navigated by
/// keyboard.
pub trait INavigableContainer {
    /// Gets the next control in the specified direction.
    ///
    /// `from` is the control from which movement begins and `wrap` tells
    /// whether to wrap around when the first or last item is reached.
    fn get_control(
        &self,
        direction: NavigationDirection,
        from: Option<&Ref<InputElement>>,
        wrap: bool,
    ) -> Option<Ref<InputElement>>;
}