Module rat_widget::focus

source ·
Expand description

Module for focus-handling functionality. For details see rat-focus

Macros§

  • Does a match on the state struct of a widget. If widget_state.is_focused() is true the block is executed. There is a _ branch too, that is evaluated if none of the given widget-states has the focus.
  • Does a match on the state struct of a widget. If widget_state.gained_focus() is true the block is executed. This requires that widget_state implements HasFocusFlag, but that’s the basic requirement for this whole crate.
  • Does a match on the state struct of a widget. If widget_state.lost_focus() is true the block is executed. This requires that widget_state implements HasFocusFlag, but that’s the basic requirement for this whole crate.

Structs§

  • Contains flags for the focus. This struct is embedded in the widget state.
  • Extended Rectangle with a z-order added.

Traits§