wex v24.10.0
|
Offers a single menu item. More...
#include <wex/ui/menu-item.h>
Public Types | |
enum | type_t { CHECK , EDIT , EDIT_INVERT , EXIT , HISTORY , MENU , PANES , PRINT , RADIO , SEPARATOR , SUBMENU , VCS } |
The item types supported. More... | |
Public Member Functions | |
menu_item (type_t=SEPARATOR) | |
Default constructor, for a SEPARATOR. | |
menu_item (wxWindowID id, const std::string &name=std::string(), const data::menu &data=data::menu()) | |
Constructor for a normal MENU item. | |
menu_item (wxWindowID id, const std::string &name, type_t type, const data::menu &data=data::menu()) | |
Constructor for a checkable item. | |
menu_item (menu *submenu, const std::string &name, wxWindowID id=wxID_ANY, const data::menu &data=data::menu()) | |
Constructor for a SUBMENU item. | |
menu_item (const path &p, frame *frame, bool show_modal=true, const data::menu &data=data::menu()) | |
Constructor for a VCS submenu item. | |
menu_item (wxWindowID id, file_history &history, const data::menu &data=data::menu()) | |
Constructor for HISTORY menu item. | |
menu_item (const frame *frame) | |
Constructor for PANES menu items. | |
void | append (wex::menu *menu) const |
Appends this item(s) to menu. | |
auto & | data () const |
Returns data. | |
auto | id () const |
Returns menu item id. | |
bool | is_modal () const |
Returns modality. | |
auto & | name () const |
Returns menu item name. | |
const auto & | path () const |
Returns path. | |
auto | type () const |
Returns menu item type. | |
Offers a single menu item.
The item types supported.
Enumerator | |
---|---|
CHECK | a check menu item |
EDIT | edit menu items |
EDIT_INVERT | edit invert menu items |
EXIT | exit menu item |
HISTORY | file_history menu items |
MENU | a normal menu item |
PANES | toggle panes from managed frame menu items |
print menu items | |
RADIO | a radio menu item |
SEPARATOR | a separator menu item If previous item was a separator, it ignores this one. If no items have yet been appended, it ignores this one. |
SUBMENU | a submenu item |
VCS | vcs menu items |
wex::menu_item::menu_item | ( | wxWindowID | id, |
const std::string & | name = std::string(), | ||
const data::menu & | data = data::menu() ) |
Constructor for a normal MENU item.
id | menu item id |
name | menu name or text |
data | menu data |
wex::menu_item::menu_item | ( | wxWindowID | id, |
const std::string & | name, | ||
type_t | type, | ||
const data::menu & | data = data::menu() ) |
Constructor for a checkable item.
id | menu item id |
name | menu name or text |
type | Constructor for a CHECK or RADIO item. |
data | menu data |
wex::menu_item::menu_item | ( | menu * | submenu, |
const std::string & | name, | ||
wxWindowID | id = wxID_ANY, | ||
const data::menu & | data = data::menu() ) |
Constructor for a SUBMENU item.
submenu | menu submenu |
name | menu name or text |
id | menu item id |
data | menu data |
wex::menu_item::menu_item | ( | const path & | p, |
frame * | frame, | ||
bool | show_modal = true, | ||
const data::menu & | data = data::menu() ) |
Constructor for a VCS submenu item.
p | if a filename is specified the menu is built as a submenu, otherwise as menu items. |
frame | frame |
show_modal | shows modal dialog if necessary |
data | menu data |
wex::menu_item::menu_item | ( | wxWindowID | id, |
file_history & | history, | ||
const data::menu & | data = data::menu() ) |
Constructor for HISTORY menu item.
id | menu item id |
history | object for maintaining / retrieving history |
data | menu data |
wex::menu_item::menu_item | ( | const frame * | frame | ) |
Constructor for PANES menu items.
frame | frame to supply toggled panes |