class
UIng::MenuItem
- UIng::MenuItem
- Reference
- Object
Defined in:
uing/menu_item.crInstance Method Summary
- #checked=(checked : Bool) : Nil
- #checked? : Bool
-
#clear_on_clicked : Nil
Clears the click callback without removing or invalidating the menu item.
-
#clear_shortcut : Nil
Removes a menu shortcut before the first Window is created.
- #disable : Nil
- #enable : Nil
- #on_clicked(&block : UIng::Window | Nil -> Nil) : Nil
- #on_clicked(callback : Nil) : Nil
-
#set_shortcut(key : Char, modifiers : Modifiers = Modifiers::None) : Nil
Assigns a menu shortcut before the first Window is created.
-
#set_shortcut(key : ExtKey, modifiers : Modifiers = Modifiers::None) : Nil
Assigns a supported extended key as a menu shortcut.
- #to_unsafe
Instance Method Detail
def clear_on_clicked : Nil
#
Clears the click callback without removing or invalidating the menu item.
Equivalent to #on_clicked(nil).
Assigns a menu shortcut before the first Window is created. Letters, digits, Delete, and arrow keys require Primary, Ctrl, or Alt. F1 through F12 may be used without modifiers. ASCII lowercase letters are converted to uppercase. libui-ng rejects duplicate shortcuts.
Assigns a supported extended key as a menu shortcut.