neoGFX
Cross-platform C++ app/game engine
Loading...
Searching...
No Matches
neogfx::i_menu Class Referenceabstract

#include <i_menu.hpp>

Inheritance diagram for neogfx::i_menu:
neogfx::i_action_container neogfx::i_shared_menu_bar neogfx::menu neogfx::menu_bar

Classes

struct  already_closed
 
struct  bad_item_index
 
struct  cannot_select_item
 
struct  item_not_found
 
struct  no_available_items
 
struct  no_parent
 
struct  no_selected_item
 
struct  no_widget
 

Public Types

typedef uint32_t item_index
 
typedef uint32_t item_index
 

Public Member Functions

 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_itemdeclare_event (selection_cleared) declare_event(open_sub_menu
 
virtual ~i_menu ()=default
 
virtual const i_widgetas_widget () const =0
 
virtual i_widgetas_widget ()=0
 
virtual bool has_parent () const =0
 
virtual i_menuparent ()=0
 
virtual void set_parent (i_menu &aParent)=0
 
virtual menu_type type () const =0
 
virtual uuid const & group () const =0
 
virtual void set_group (uuid const &aGroup)=0
 
virtual i_string const & title () const =0
 
virtual void set_title (i_string const &aTitle)=0
 
virtual const i_textureimage () const =0
 
virtual void set_image (i_string const &aUri)=0
 
virtual void set_image (i_image const &aImage)=0
 
virtual void set_image (i_texture const &aTexture)=0
 
virtual uint32_t count () const =0
 
virtual uint32_t ideal_insert_index (uuid const &aGroup) const =0
 
virtual const i_menu_itemitem_at (item_index aItemIndex) const =0
 
virtual i_menu_itemitem_at (item_index aItemIndex)=0
 
virtual void add_sub_menu (i_menu &aSubMenu)=0
 
virtual i_menuadd_sub_menu (i_string const &aSubMenuTitle, uuid const &aGroup={})=0
 
virtual void add_separator (uuid const &aGroup={})=0
 
virtual void insert_sub_menu_at (item_index aItemIndex, i_menu &aSubMenu)=0
 
virtual i_menuinsert_sub_menu_at (item_index aItemIndex, i_string const &aSubMenuTitle, uuid const &aGroup={})=0
 
virtual void insert_action_at (item_index aItemIndex, i_action &aAction)=0
 
virtual void insert_action_at (item_index aItemIndex, i_ref_ptr< i_action > const &aAction)=0
 
virtual void insert_separator_at (item_index aItemIndex, uuid const &aGroup={})=0
 
virtual void remove_at (item_index aItemIndex)=0
 
virtual item_index find_sub_menu (uuid const &aGroup) const =0
 
virtual item_index find (i_menu_item const &aItem) const =0
 
virtual item_index find (i_menu const &aSubMenu) const =0
 
virtual bool has_selected_item () const =0
 
virtual item_index selected_item () const =0
 
virtual void select_item_at (item_index aItemIndex, bool aOpenAnySubMenu=true)=0
 
virtual void clear_selection ()=0
 
virtual bool has_available_items () const =0
 
virtual bool item_available_at (item_index aItemIndex) const =0
 
virtual item_index first_available_item () const =0
 
virtual item_index previous_available_item (item_index aCurrentIndex) const =0
 
virtual item_index next_available_item (item_index aCurrentIndex) const =0
 
virtual bool is_open () const =0
 
virtual void open ()=0
 
virtual void close ()=0
 
virtual bool is_modal () const =0
 
virtual void set_modal (bool aModal)=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_action_container
virtual i_actionadd_action (i_action &aAction)=0
 
virtual i_actionadd_action (i_ref_ptr< i_action > const &aAction)=0
 

Detailed Description

Definition at line 35 of file i_menu.hpp.

Member Typedef Documentation

◆ item_index [1/2]

typedef uint32_t neogfx::i_menu::item_index

Definition at line 40 of file i_menu.hpp.

◆ item_index [2/2]

typedef uint32_t neogfx::i_menu::item_index

Definition at line 52 of file i_menu.hpp.

Constructor & Destructor Documentation

◆ ~i_menu()

virtual neogfx::i_menu::~i_menu ( )
virtualdefault

Member Function Documentation

◆ add_separator()

virtual void neogfx::i_menu::add_separator ( uuid const &  aGroup = {})
pure virtual

Implemented in neogfx::menu.

◆ add_sub_menu() [1/2]

virtual void neogfx::i_menu::add_sub_menu ( i_menu aSubMenu)
pure virtual

Implemented in neogfx::menu.

◆ add_sub_menu() [2/2]

virtual i_menu & neogfx::i_menu::add_sub_menu ( i_string const &  aSubMenuTitle,
uuid const &  aGroup = {} 
)
pure virtual

Implemented in neogfx::menu.

◆ as_widget() [1/2]

virtual const i_widget & neogfx::i_menu::as_widget ( ) const
pure virtual

Implemented in neogfx::menu, and neogfx::menu_bar.

◆ as_widget() [2/2]

virtual i_widget & neogfx::i_menu::as_widget ( )
pure virtual

Implemented in neogfx::menu, and neogfx::menu_bar.

◆ clear_selection()

virtual void neogfx::i_menu::clear_selection ( )
pure virtual

Implemented in neogfx::menu.

◆ close()

virtual void neogfx::i_menu::close ( )
pure virtual

Implemented in neogfx::menu.

◆ count()

virtual uint32_t neogfx::i_menu::count ( ) const
pure virtual

Implemented in neogfx::menu.

◆ declare_event() [1/4]

item_index neogfx::i_menu::declare_event ( item_removed  ,
item_index   
)

◆ declare_event() [2/4]

neogfx::i_menu::declare_event ( menu_changed  )

◆ declare_event() [3/4]

item_index item_index neogfx::i_menu::declare_event ( opened  )

◆ declare_event() [4/4]

item_index item_index i_menu_item & neogfx::i_menu::declare_event ( selection_cleared  )

◆ find() [1/2]

virtual item_index neogfx::i_menu::find ( i_menu const &  aSubMenu) const
pure virtual

Implemented in neogfx::menu, and neogfx::menu_bar.

◆ find() [2/2]

virtual item_index neogfx::i_menu::find ( i_menu_item const &  aItem) const
pure virtual

Implemented in neogfx::menu, and neogfx::menu_bar.

◆ find_sub_menu()

virtual item_index neogfx::i_menu::find_sub_menu ( uuid const &  aGroup) const
pure virtual

Implemented in neogfx::menu.

◆ first_available_item()

virtual item_index neogfx::i_menu::first_available_item ( ) const
pure virtual

Implemented in neogfx::menu.

◆ group()

virtual uuid const & neogfx::i_menu::group ( ) const
pure virtual

Implemented in neogfx::menu.

◆ has_available_items()

virtual bool neogfx::i_menu::has_available_items ( ) const
pure virtual

Implemented in neogfx::menu.

◆ has_parent()

virtual bool neogfx::i_menu::has_parent ( ) const
pure virtual

Implemented in neogfx::menu.

◆ has_selected_item()

virtual bool neogfx::i_menu::has_selected_item ( ) const
pure virtual

Implemented in neogfx::menu.

◆ ideal_insert_index() [1/3]

uint32_t neogfx::i_menu::ideal_insert_index ( i_action const &  aAction) const
inline

Definition at line 109 of file i_menu.hpp.

◆ ideal_insert_index() [2/3]

uint32_t neogfx::i_menu::ideal_insert_index ( i_menu const &  aSubMenu) const
inline

Definition at line 113 of file i_menu.hpp.

◆ ideal_insert_index() [3/3]

virtual uint32_t neogfx::i_menu::ideal_insert_index ( uuid const &  aGroup) const
pure virtual

Implemented in neogfx::menu, and neogfx::menu.

◆ image()

virtual const i_texture & neogfx::i_menu::image ( ) const
pure virtual

Implemented in neogfx::menu.

◆ insert_action_at() [1/2]

virtual void neogfx::i_menu::insert_action_at ( item_index  aItemIndex,
i_action aAction 
)
pure virtual

Implemented in neogfx::menu.

◆ insert_action_at() [2/2]

virtual void neogfx::i_menu::insert_action_at ( item_index  aItemIndex,
i_ref_ptr< i_action > const &  aAction 
)
pure virtual

Implemented in neogfx::menu.

◆ insert_separator_at()

virtual void neogfx::i_menu::insert_separator_at ( item_index  aItemIndex,
uuid const &  aGroup = {} 
)
pure virtual

Implemented in neogfx::menu.

◆ insert_sub_menu_at() [1/2]

virtual void neogfx::i_menu::insert_sub_menu_at ( item_index  aItemIndex,
i_menu aSubMenu 
)
pure virtual

Implemented in neogfx::menu.

◆ insert_sub_menu_at() [2/2]

virtual i_menu & neogfx::i_menu::insert_sub_menu_at ( item_index  aItemIndex,
i_string const &  aSubMenuTitle,
uuid const &  aGroup = {} 
)
pure virtual

Implemented in neogfx::menu.

◆ is_modal()

virtual bool neogfx::i_menu::is_modal ( ) const
pure virtual

Implemented in neogfx::menu.

◆ is_open()

virtual bool neogfx::i_menu::is_open ( ) const
pure virtual

Implemented in neogfx::menu.

◆ item_at() [1/2]

virtual const i_menu_item & neogfx::i_menu::item_at ( item_index  aItemIndex) const
pure virtual

Implemented in neogfx::menu.

◆ item_at() [2/2]

virtual i_menu_item & neogfx::i_menu::item_at ( item_index  aItemIndex)
pure virtual

Implemented in neogfx::menu.

◆ item_available_at()

virtual bool neogfx::i_menu::item_available_at ( item_index  aItemIndex) const
pure virtual

Implemented in neogfx::menu.

◆ next_available_item()

virtual item_index neogfx::i_menu::next_available_item ( item_index  aCurrentIndex) const
pure virtual

Implemented in neogfx::menu.

◆ open()

virtual void neogfx::i_menu::open ( )
pure virtual

Implemented in neogfx::menu.

◆ parent()

virtual i_menu & neogfx::i_menu::parent ( )
pure virtual

Implemented in neogfx::menu.

◆ previous_available_item()

virtual item_index neogfx::i_menu::previous_available_item ( item_index  aCurrentIndex) const
pure virtual

Implemented in neogfx::menu.

◆ remove_at()

virtual void neogfx::i_menu::remove_at ( item_index  aItemIndex)
pure virtual

Implemented in neogfx::menu.

◆ select_item_at()

virtual void neogfx::i_menu::select_item_at ( item_index  aItemIndex,
bool  aOpenAnySubMenu = true 
)
pure virtual

Implemented in neogfx::menu.

◆ selected_item()

virtual item_index neogfx::i_menu::selected_item ( ) const
pure virtual

Implemented in neogfx::menu.

◆ set_group()

virtual void neogfx::i_menu::set_group ( uuid const &  aGroup)
pure virtual

Implemented in neogfx::menu.

◆ set_image() [1/3]

virtual void neogfx::i_menu::set_image ( i_image const &  aImage)
pure virtual

Implemented in neogfx::menu.

◆ set_image() [2/3]

virtual void neogfx::i_menu::set_image ( i_string const &  aUri)
pure virtual

Implemented in neogfx::menu.

◆ set_image() [3/3]

virtual void neogfx::i_menu::set_image ( i_texture const &  aTexture)
pure virtual

Implemented in neogfx::menu.

◆ set_modal()

virtual void neogfx::i_menu::set_modal ( bool  aModal)
pure virtual

Implemented in neogfx::menu.

◆ set_parent()

virtual void neogfx::i_menu::set_parent ( i_menu aParent)
pure virtual

Implemented in neogfx::menu.

◆ set_title()

virtual void neogfx::i_menu::set_title ( i_string const &  aTitle)
pure virtual

Implemented in neogfx::menu.

◆ title()

virtual i_string const & neogfx::i_menu::title ( ) const
pure virtual

Implemented in neogfx::menu.

◆ type()

virtual menu_type neogfx::i_menu::type ( ) const
pure virtual

Implemented in neogfx::menu.


The documentation for this class was generated from the following file: