Trait rat_focus::HasFocusFlag
source · pub trait HasFocusFlag {
// Required methods
fn focus(&self) -> &FocusFlag;
fn area(&self) -> Rect;
// Provided methods
fn z_areas(&self) -> &[ZRect] { ... }
fn navigable(&self) -> bool { ... }
fn is_focused(&self) -> bool { ... }
fn lost_focus(&self) -> bool { ... }
fn gained_focus(&self) -> bool { ... }
}Expand description
Trait for a widget that has a focus flag.
Required Methods§
Provided Methods§
sourcefn z_areas(&self) -> &[ZRect]
fn z_areas(&self) -> &[ZRect]
The widget might have several disjointed areas. This is the case if it is showing a popup, but there might be other causes.
This is seen as a higher resolution image of the area given with area(). That means the result of area() is the union of all areas given here.
The widget is focusable, but doesn’t want to partake in keyboard navigation.
sourcefn is_focused(&self) -> bool
fn is_focused(&self) -> bool
Focused?
sourcefn lost_focus(&self) -> bool
fn lost_focus(&self) -> bool
Just lost focus.
sourcefn gained_focus(&self) -> bool
fn gained_focus(&self) -> bool
Just gained focus.