Skip to main content

mode_switcher

Function mode_switcher 

Source
pub fn mode_switcher(
    ui: &mut Ui,
    id: Id,
    modes: &[ModeInfo],
    current: &str,
) -> Option<(String, Response)>
Expand description

The mode switcher: a segmented control for up to SEGMENTED_MAX modes, a menu beyond. Each mode’s label is translated (mode_label), its icon drawn from the icon registry when it resolves, its keys in its tip. Answers the mode pressed, if one was (the one shown too: a press may move the keyboard elsewhere).