pub trait Focusable: 'static {
// Required method
fn focus_handle(&self, cx: &App) -> FocusHandle;
}Expand description
Focusable allows users of your view to easily focus it (using window.focus_view(cx, view))
Required Methods§
Sourcefn focus_handle(&self, cx: &App) -> FocusHandle
fn focus_handle(&self, cx: &App) -> FocusHandle
Returns the focus handle associated with this view.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl Focusable for CarouselState
impl Focusable for CarouselState
Source§fn focus_handle(&self, cx: &App) -> FocusHandle
fn focus_handle(&self, cx: &App) -> FocusHandle
The keyboard focus shared by every part: the root tracks it, and a clicked control moves focus here so the arrow keys keep working.