neoGFX
Cross-platform C++ app/game engine
|
#include <menu.hpp>
Public Member Functions | |
define_declared_event (MenuChanged, menu_changed) define_declared_event(ItemAdded | |
item_index | define_declared_event (ItemRemoved, item_removed, item_index) define_declared_event(ItemChanged |
item_index item_index | define_declared_event (Opened, opened) define_declared_event(Closed |
item_index item_index closed | define_declared_event (ItemSelected, item_selected, i_menu_item &) define_declared_event(SelectionCleared |
menu (i_menu &aParent, std::string const &aTitle=std::string{}, menu_type aType=menu_type::Popup) | |
menu (std::string const &aTitle=std::string{}, menu_type aType=menu_type::Popup) | |
~menu () | |
const i_widget & | as_widget () const override |
i_widget & | as_widget () override |
bool | has_parent () const override |
i_menu & | parent () override |
void | set_parent (i_menu &aParent) override |
menu_type | type () const override |
uuid const & | group () const override |
void | set_group (uuid const &aGroup) override |
i_string const & | title () const override |
void | set_title (i_string const &aTitle) override |
const i_texture & | image () const override |
void | set_image (i_string const &aUri) override |
void | set_image (const i_image &aImage) override |
void | set_image (const i_texture &aTexture) override |
uint32_t | count () const override |
uint32_t | ideal_insert_index (uuid const &aGroup) const override |
const i_menu_item & | item_at (item_index aItemIndex) const override |
i_menu_item & | item_at (item_index aItemIndex) override |
void | add_sub_menu (i_menu &aSubMenu) override |
i_menu & | add_sub_menu (i_string const &aSubMenuTitle, uuid const &aGroup={}) override |
i_action & | add_action (i_action &aAction) override |
i_action & | add_action (i_ref_ptr< i_action > const &aAction) override |
void | add_separator (uuid const &aGroup={}) override |
void | insert_sub_menu_at (item_index aItemIndex, i_menu &aSubMenu) override |
i_menu & | insert_sub_menu_at (item_index aItemIndex, i_string const &aSubMenuText, uuid const &aGroup={}) override |
void | insert_action_at (item_index aItemIndex, i_action &aAction) override |
void | insert_action_at (item_index aItemIndex, i_ref_ptr< i_action > const &aAction) override |
void | insert_separator_at (item_index aItemIndex, uuid const &aGroup={}) override |
void | remove_at (item_index aItemIndex) override |
item_index | find_sub_menu (uuid const &aGroup) const override |
item_index | find (const i_menu_item &aItem) const override |
item_index | find (const i_menu &aSubMenu) const override |
bool | has_selected_item () const override |
item_index | selected_item () const override |
void | select_item_at (item_index aItemIndex, bool aOpenAnySubMenu=true) override |
void | clear_selection () override |
bool | has_available_items () const override |
bool | item_available_at (item_index aItemIndex) const override |
item_index | first_available_item () const override |
item_index | previous_available_item (item_index aCurrentIndex) const override |
item_index | next_available_item (item_index aCurrentIndex) const override |
bool | is_open () const override |
void | open () override |
void | close () override |
bool | is_modal () const override |
void | set_modal (bool aModal) override |
virtual uint32_t | ideal_insert_index (uuid const &aGroup) const=0 |
uint32_t | ideal_insert_index (i_action const &aAction) const |
uint32_t | ideal_insert_index (i_menu const &aSubMenu) const |
Public Member Functions inherited from neogfx::i_menu | |
declare_event (menu_changed) declare_event(item_added | |
item_index | declare_event (item_removed, item_index) declare_event(item_changed |
item_index item_index | declare_event (opened) declare_event(closed) declare_event(item_selected |
item_index item_index i_menu_item & | declare_event (selection_cleared) declare_event(open_sub_menu |
virtual | ~i_menu ()=default |
uint32_t | ideal_insert_index (i_action const &aAction) const |
uint32_t | ideal_insert_index (i_menu const &aSubMenu) const |
Public Attributes | |
item_index item_index closed selection_cleared define_declared_event(OpenSubMenu, open_sub_menu, i_menu &) private typedef std::vector< item_pointer > | item_list |
item_added | |
item_index | item_changed |
Additional Inherited Members | |
Public Types inherited from neogfx::i_menu | |
typedef uint32_t | item_index |
typedef uint32_t | item_index |
neogfx::menu::menu | ( | i_menu & | aParent, |
std::string const & | aTitle = std::string{} , |
||
menu_type | aType = menu_type::Popup |
||
) |
neogfx::menu::menu | ( | std::string const & | aTitle = std::string{} , |
menu_type | aType = menu_type::Popup |
||
) |
neogfx::menu::~menu | ( | ) |
Implements neogfx::i_action_container.
Implements neogfx::i_action_container.
|
overridevirtual |
Implements neogfx::i_menu.
|
overridevirtual |
Implements neogfx::i_menu.
|
overridevirtual |
Implements neogfx::i_menu.
|
overridevirtual |
Implements neogfx::i_menu.
Reimplemented in neogfx::menu_bar.
|
overridevirtual |
Implements neogfx::i_menu.
Reimplemented in neogfx::menu_bar.
|
overridevirtual |
Implements neogfx::i_menu.
|
overridevirtual |
Implements neogfx::i_menu.
|
overridevirtual |
Implements neogfx::i_menu.
item_index neogfx::menu::define_declared_event | ( | ItemRemoved | , |
item_removed | , | ||
item_index | |||
) |
item_index item_index closed neogfx::menu::define_declared_event | ( | ItemSelected | , |
item_selected | , | ||
i_menu_item & | |||
) |
neogfx::menu::define_declared_event | ( | MenuChanged | , |
menu_changed | |||
) |
item_index item_index neogfx::menu::define_declared_event | ( | Opened | , |
opened | |||
) |
|
overridevirtual |
Implements neogfx::i_menu.
Reimplemented in neogfx::menu_bar.
|
overridevirtual |
Implements neogfx::i_menu.
Reimplemented in neogfx::menu_bar.
|
overridevirtual |
Implements neogfx::i_menu.
|
overridevirtual |
Implements neogfx::i_menu.
|
overridevirtual |
Implements neogfx::i_menu.
|
overridevirtual |
Implements neogfx::i_menu.
|
overridevirtual |
Implements neogfx::i_menu.
|
overridevirtual |
Implements neogfx::i_menu.
|
inline |
Definition at line 109 of file i_menu.hpp.
|
inline |
Definition at line 113 of file i_menu.hpp.
|
overridevirtual |
Implements neogfx::i_menu.
|
virtual |
Implements neogfx::i_menu.
|
overridevirtual |
Implements neogfx::i_menu.
|
overridevirtual |
Implements neogfx::i_menu.
|
overridevirtual |
Implements neogfx::i_menu.
|
overridevirtual |
Implements neogfx::i_menu.
|
overridevirtual |
Implements neogfx::i_menu.
|
overridevirtual |
Implements neogfx::i_menu.
|
overridevirtual |
Implements neogfx::i_menu.
|
overridevirtual |
Implements neogfx::i_menu.
|
overridevirtual |
Implements neogfx::i_menu.
|
overridevirtual |
Implements neogfx::i_menu.
|
overridevirtual |
Implements neogfx::i_menu.
|
overridevirtual |
Implements neogfx::i_menu.
|
overridevirtual |
Implements neogfx::i_menu.
|
overridevirtual |
Implements neogfx::i_menu.
|
overridevirtual |
Implements neogfx::i_menu.
|
overridevirtual |
Implements neogfx::i_menu.
|
overridevirtual |
Implements neogfx::i_menu.
|
overridevirtual |
Implements neogfx::i_menu.
|
overridevirtual |
Implements neogfx::i_menu.
|
overridevirtual |
Implements neogfx::i_menu.
|
overridevirtual |
Implements neogfx::i_menu.
|
overridevirtual |
Implements neogfx::i_menu.
|
overridevirtual |
Implements neogfx::i_menu.
|
overridevirtual |
Implements neogfx::i_menu.
|
overridevirtual |
Implements neogfx::i_menu.
|
overridevirtual |
Implements neogfx::i_menu.
|
overridevirtual |
Implements neogfx::i_menu.
item_index neogfx::menu::item_changed |
item_index item_index closed selection_cleared define_declared_event (OpenSubMenu, open_sub_menu, i_menu&) private typedef std::vector<item_pointer> neogfx::menu::item_list |