Trait rat_focus::HasFocus

source ·
pub trait HasFocus {
    // Required method
    fn focus(&self) -> Focus;

    // Provided methods
    fn container(&self) -> Option<ContainerFlag> { ... }
    fn area(&self) -> Rect { ... }
    fn is_focused(&self) -> bool { ... }
    fn lost_focus(&self) -> bool { ... }
    fn gained_focus(&self) -> bool { ... }
}
Expand description

Is this a container widget.

Required Methods§

source

fn focus(&self) -> Focus

Returns a Focus struct.

Provided Methods§

source

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

Returns the container-flag

source

fn area(&self) -> Rect

Area of the container.

source

fn is_focused(&self) -> bool

Focused?

source

fn lost_focus(&self) -> bool

Just lost focus.

source

fn gained_focus(&self) -> bool

Just gained focus.

Implementors§