|
ZenitUI
Retained-mode C++20 UI framework
|
Declarative C++ descriptor for populating a Menu or structured ContextMenu. More...
#include <MenuBar.hpp>
Public Types | |
| enum class | Kind { Action , Checkbox , Separator , Submenu } |
Static Public Member Functions | |
| static MenuEntry | action (std::string label, std::function< void()> onTrigger=nullptr, std::string shortcut="", bool enabled=true, std::string value="") |
| static MenuEntry | checkbox (std::string label, bool checked, std::function< void(bool)> onToggle=nullptr, std::string shortcut="", bool enabled=true, std::string value="") |
| static MenuEntry | separator () |
| static MenuEntry | submenu (std::string label, std::vector< MenuEntry > items, bool enabled=true, std::string value="") |
Public Attributes | |
| Kind | kind {Kind::Action} |
| std::string | label |
| std::string | shortcut |
| std::string | value |
| bool | enabled {true} |
| bool | checked {false} |
| std::function< void()> | onTrigger |
| std::function< void(bool)> | onToggle |
| std::vector< MenuEntry > | children |
Declarative C++ descriptor for populating a Menu or structured ContextMenu.