Struct ksni::menu::SubMenu [−][src]
pub struct SubMenu<T> { pub label: String, pub enabled: bool, pub visible: bool, pub icon_name: String, pub icon_data: Vec<u8>, pub shortcut: Vec<Vec<String>>, pub disposition: Disposition, pub submenu: Vec<MenuItem<T>>, }
Fields
label: String
Text of the item, except that: -# two consecutive underscore characters “__” are displayed as a single underscore, -# any remaining underscore characters are not displayed at all, -# the first of those remaining underscore characters (unless it is the last character in the string) indicates that the following character is the access key.
enabled: bool
Whether the item can be activated or not.
visible: bool
True if the item is visible in the menu.
icon_name: String
Icon name of the item, following the freedesktop.org icon spec.
icon_data: Vec<u8>
PNG data of the icon.
shortcut: Vec<Vec<String>>
The shortcut of the item. Each array represents the key press in the list of keypresses. Each list of strings contains a list of modifiers and then the key that is used. The modifier strings allowed are: “Control”, “Alt”, “Shift” and “Super”.
- A simple shortcut like Ctrl+S is represented as: [[“Control”, “S”]]
- A complex shortcut like Ctrl+Q, Alt+X is represented as: [[“Control”, “Q”], [“Alt”, “X”]]
disposition: Disposition
How the menuitem feels the information it’s displaying to the user should be presented.
Trait Implementations
Auto Trait Implementations
impl<T> !RefUnwindSafe for SubMenu<T>
impl<T> !UnwindSafe for SubMenu<T>