#include <Menu.h>
Signal Types | |
typedef boost::signal< void(int)> | SelectedIDSignalType |
typedef boost::signal< void()> | SelectedSignalType |
Slot Types | |
typedef SelectedIDSignalType::slot_type | SelectedIDSlotType |
typedef SelectedSignalType::slot_type | SelectedSlotType |
Accessors | |
boost::shared_ptr< SelectedIDSignalType > | SelectedIDSignal |
boost::shared_ptr< SelectedSignalType > | SelectedSignal |
Structors | |
MenuItem () | |
MenuItem (const std::string &str, int id, bool disable, bool check) | |
MenuItem (const std::string &str, int id, bool disable, bool check, const SelectedIDSlotType &slot) | |
MenuItem (const std::string &str, int id, bool disable, bool check, const SelectedSlotType &slot) | |
template<class T1, class T2> | |
MenuItem (const std::string &str, int id, bool disable, bool check, void(T1::*slot)(int), T2 *obj) | |
template<class T1, class T2> | |
MenuItem (const std::string &str, int id, bool disable, bool check, void(T1::*slot)(), T2 *obj) | |
virtual | ~MenuItem () |
Public Attributes | |
std::string | label |
int | item_ID |
bool | disabled |
bool | checked |
std::vector< MenuItem > | next_level |
All legal item_IDs are positive (and so non-zero); any item_ID <= 0 is considered invalid. Each MenuItem has a signal that is emmitted with its menu_ID member whenever it is selected. Such signals may be emitted even when the menu_ID is 0. These signals allow each MenuItem to be attached directly to code that should be executed when that item is selected. Note that the signal is not serialized. The user must restore it after the MenuItem is reloaded.
Definition at line 46 of file Menu.h.
typedef boost::signal<void (int)> GG::MenuItem::SelectedIDSignalType |
typedef boost::signal<void ()> GG::MenuItem::SelectedSignalType |
typedef SelectedIDSignalType::slot_type GG::MenuItem::SelectedIDSlotType |
typedef SelectedSignalType::slot_type GG::MenuItem::SelectedSlotType |
GG::MenuItem::MenuItem | ( | ) |
default ctor
GG::MenuItem::MenuItem | ( | const std::string & | str, | |
int | id, | |||
bool | disable, | |||
bool | check | |||
) |
ctor
GG::MenuItem::MenuItem | ( | const std::string & | str, | |
int | id, | |||
bool | disable, | |||
bool | check, | |||
const SelectedIDSlotType & | slot | |||
) |
ctor that allows direct attachment of this item's signal to a "slot" function or functor
GG::MenuItem::MenuItem | ( | const std::string & | str, | |
int | id, | |||
bool | disable, | |||
bool | check, | |||
const SelectedSlotType & | slot | |||
) |
ctor that allows direct attachment of this item's signal to a "slot" function or functor
GG::MenuItem::MenuItem | ( | const std::string & | str, | |
int | id, | |||
bool | disable, | |||
bool | check, | |||
void(T1::*)(int) | slot, | |||
T2 * | obj | |||
) | [inline] |
ctor that allows direct attachment of this item's signal to a "slot" member function of a specific object
Definition at line 302 of file Menu.h.
References SelectedIDSignal.
GG::MenuItem::MenuItem | ( | const std::string & | str, | |
int | id, | |||
bool | disable, | |||
bool | check, | |||
void(T1::*)() | slot, | |||
T2 * | obj | |||
) | [inline] |
ctor that allows direct attachment of this item's signal to a "slot" member function of a specific object
Definition at line 314 of file Menu.h.
References SelectedSignal.
virtual GG::MenuItem::~MenuItem | ( | ) | [virtual] |
virtual dtor
boost::shared_ptr<SelectedIDSignalType> GG::MenuItem::SelectedIDSignal [mutable] |
the selected signal object for this MenuItem that conveys the selected menu item ID
Definition at line 80 of file Menu.h.
Referenced by MenuItem().
boost::shared_ptr<SelectedSignalType> GG::MenuItem::SelectedSignal [mutable] |
the selected signal object for this MenuItem
Definition at line 81 of file Menu.h.
Referenced by MenuItem().
std::string GG::MenuItem::label |
std::vector<MenuItem> GG::MenuItem::next_level |