iced::advanced::widget::operation

Trait Focusable

Source
pub trait Focusable {
    // Required methods
    fn is_focused(&self) -> bool;
    fn focus(&mut self);
    fn unfocus(&mut self);
}
Available on crate feature advanced only.
Expand description

The internal state of a widget that can be focused.

Required Methods§

Source

fn is_focused(&self) -> bool

Returns whether the widget is focused or not.

Source

fn focus(&mut self)

Focuses the widget.

Source

fn unfocus(&mut self)

Unfocuses the widget.

Implementors§

§

impl<Highlighter> Focusable for iced::widget::text_editor::State<Highlighter>
where Highlighter: Highlighter,

§

impl<P> Focusable for iced::widget::text_input::State<P>
where P: Paragraph,