cwidget  0.5.17
Public Member Functions | Public Attributes | List of all members
cwidget::widgets::menu_item Class Reference

Public Member Functions

 menu_item (const std::wstring &_title, const std::string &_binding, const std::wstring &_description)
 
std::wstring get_title () const
 
std::string get_binding () const
 
std::wstring get_description () const
 
chtype get_hotkey () const
 
bool is_enabled () const
 The canonical way to test whether an item is really enabled. More...
 

Public Attributes

sigc::signal0< void > selected
 Emitted when the menu item is selected. More...
 
sigc::signal0< bool, util::accumulate_orenabled
 Emitted to test whether the menu item should be displayed as "active". More...
 

Member Function Documentation

◆ is_enabled()

bool cwidget::widgets::menu_item::is_enabled ( ) const

The canonical way to test whether an item is really enabled.

Member Data Documentation

◆ enabled

sigc::signal0<bool, util::accumulate_or> cwidget::widgets::menu_item::enabled

Emitted to test whether the menu item should be displayed as "active".

If this signal is empty, the item will be displayed as "active" iff "selected" is non-empty. Otherwise, the return value of the signal is used.

Referenced by cwidget::widgets::menu::menu().

◆ selected

sigc::signal0<void> cwidget::widgets::menu_item::selected

Emitted when the menu item is selected.

Referenced by cwidget::widgets::menu::menu().


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