rat_focus

Trait FocusContainer

Source
pub trait FocusContainer {
    // Required method
    fn build(&self, builder: &mut FocusBuilder);

    // Provided methods
    fn container(&self) -> Option<ContainerFlag> { ... }
    fn area(&self) -> Rect { ... }
    fn area_z(&self) -> u16 { ... }
    fn is_container_focused(&self) -> bool { ... }
    fn container_lost_focus(&self) -> bool { ... }
    fn container_gained_focus(&self) -> bool { ... }
}
Expand description

Is this a container widget.

Required Methods§

Source

fn build(&self, builder: &mut FocusBuilder)

Build the focus-structure for the container.

Provided Methods§

Source

fn container(&self) -> Option<ContainerFlag>

Returns the container-flag.

Will be used to collect the state of all widgets in the container.

Source

fn area(&self) -> Rect

Area of the container for mouse-events.

Source

fn area_z(&self) -> u16

Z value for the area.

When testing for mouse interactions the z-value is taken into consideration too.

Source

fn is_container_focused(&self) -> bool

Focused?

Source

fn container_lost_focus(&self) -> bool

Just lost focus.

Source

fn container_gained_focus(&self) -> bool

Just gained focus.

Implementations on Foreign Types§

Source§

impl FocusContainer for ()

Source§

fn build(&self, _: &mut FocusBuilder)

Implementors§