Macro swap_focus

Source
macro_rules! swap_focus {
    ($focus:expr, $( $unfocus:expr ),* $(,)? ) => { ... };
}
Expand description

Set focus on the first view passed, clear focus on all others

ยงUsage

let mut field1 = TextField::new(Coord::default(), 10, Standard6x7, (None, None), "", &[], &style.text_field);
let mut field2 = TextField::new(Coord::default(), 10, Standard6x7, (None, None), "", &[], &style.text_field);
let mut field3 = TextField::new(Coord::default(), 10, Standard6x7, (None, None), "", &[], &style.text_field);

swap_focus!(field1, field2, field3);

assert!(field1.is_focused());