pub fn ov_set_state<L: OutlineViewer + ?Sized>(
this: &mut L,
flag: StateFlag,
enable: bool,
ctx: &mut Context<'_>,
)Expand description
Apply a view-state flag change to an outline viewer.
Delegates to the concrete widget’s View method. In addition to flipping
the flag, this function:
- On
StateFlag::Focused: broadcastsCommand::RECEIVED_FOCUSorCommand::RELEASED_FOCUSso the rest of the application can track which outline has keyboard focus. - On
StateFlag::ActiveorStateFlag::Selected: shows or hides both scrollbars to match the visibility convention (bars appear when the viewer is active or selected, hide otherwise).
Concrete widgets that delegate View::set_state to this function
(as Outline does) get the scroller-compatible show/hide behavior for
free without duplicating it.