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 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 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§