rat_widget

Module 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§

  • The same as FocusFlag, but distinct to mark the focus for a container.
  • Focus deals with all focus-related issues.
  • Builder for the Focus.
  • Holds the flags for the focus.
  • Extension of Rect.

Enums§

Traits§

Functions§