winctx/modify_menu_item.rs
1/// Parameters to modify a menu item.
2#[derive(Default, Debug)]
3pub(super) struct ModifyMenuItem {
4 pub(super) checked: Option<bool>,
5 pub(super) highlight: Option<bool>,
6}
7
8impl ModifyMenuItem {
9 /// Set the checked state of the menu item.
10 pub(super) fn checked(&mut self, checked: bool) {
11 self.checked = Some(checked);
12 }
13
14 /// Set that the menu item should be highlighted.
15 pub(super) fn highlight(&mut self, highlight: bool) {
16 self.highlight = Some(highlight);
17 }
18}