#include <ax/ax_menu.h>
Public Member Functions | |
AxMenu (const AxMenu &menu) | |
AxMenu (const wxString &label=wxEmptyString, const wxString &descr=wxEmptyString) | |
~AxMenu () | |
void | Init () |
Member initialisation. | |
AxMenuItemArray & | GetItems () |
Get items. | |
size_t | GetCount () const |
Gets the number of items in the menu. | |
AxMenuItem * | GetItem (size_t i) const |
Gets the menu item at position i (zero-based). | |
void | Copy (const AxMenu &menu) |
Copies the menu. | |
void | operator= (const AxMenu &menu) |
bool | operator== (const AxMenu &menu) const |
void | SetId (const wxString &id) |
Sets the menu identifier. Not currently used. | |
const wxString & | GetId () const |
Gets the menu identifier. | |
void | SetDescription (const wxString &description) |
Sets the menu description, which will appear below the menu control in the standard user interface. | |
const wxString & | GetDescription () const |
Gets the menu description, which will appear below the menu control in the standard user interface. | |
void | SetLabel (const wxString &label) |
Sets the menu label, which will appear above the menu control in the standard user interface. | |
const wxString & | GetLabel () const |
Gets the menu label, which will appear above the menu control in the standard user interface. | |
void | SetParent (AxMenuItem *item) |
Sets the parent menu item. | |
AxMenuItem * | GetParent () const |
Gets the parent menu item. | |
void | AddItem (AxMenuItem *item) |
Adds an item to the menu and sets the item's parent. | |
void | RemoveChild (AxMenuItem *item) |
Removes an item from the menu, without deleting the item. | |
void | DeleteChild (AxMenuItem *item) |
Removes an item from the menu and deletes it. | |
void | Unlink () |
Unlinks the menu from its associated item. | |
void | ClearChildren () |
Deletes all the children of the menu. | |
AxMenuItem * | FindItemById (const wxString &id) const |
Finds a menu item by identifier. | |
AxMenuItem * | FindItemByLabel (const wxString &label) const |
Finds a menu item by label. | |
int | GetCurrentSelection () const |
Gets the current zero-based menu selection. | |
void | SetCurrentSelection (int sel) |
Sets the current zero-based menu selection. | |
AxMenuItem * | GetCurrentItem () const |
Gets the current menu item. | |
bool | IsModal () const |
Returns true if this menu is showing modally. | |
void | SetModal (bool isModal) |
Marks the menu as showing modally. | |
virtual bool | TransferDataToMenu (bool recurse=false) |
Transfer data using validator, if any. | |
virtual bool | TransferDataFromMenu (bool recurse=false) |
Transfer data using validator, if any. | |
Static Public Member Functions | |
static void | DoDelayedMenuDeletion () |
Performs delayed menu deletion. | |
static void | ScheduleMenuForDeletion (AxMenu *menu) |
Schedules a menu for delayed deletion. | |
Protected Attributes | |
AxMenuItemArray | m_items |
wxString | m_label |
wxString | m_id |
wxString | m_description |
AxMenuItem * | m_parent |
int | m_currentSelection |
bool | m_isModal |
Static Protected Attributes | |
static AxMenuArray | sm_menusPendingDeletion |
AxMenu::AxMenu | ( | const AxMenu & | menu | ) | [inline] |
AxMenu::AxMenu | ( | const wxString & | label = wxEmptyString , |
|
const wxString & | descr = wxEmptyString | |||
) | [inline] |
AxMenu::~AxMenu | ( | ) |
void AxMenu::AddItem | ( | AxMenuItem * | item | ) |
Adds an item to the menu and sets the item's parent.
void AxMenu::ClearChildren | ( | ) |
Deletes all the children of the menu.
void AxMenu::Copy | ( | const AxMenu & | menu | ) |
Copies the menu.
void AxMenu::DeleteChild | ( | AxMenuItem * | item | ) |
Removes an item from the menu and deletes it.
void AxMenu::DoDelayedMenuDeletion | ( | ) | [static] |
Performs delayed menu deletion.
AxMenuItem * AxMenu::FindItemById | ( | const wxString & | id | ) | const |
Finds a menu item by identifier.
AxMenuItem * AxMenu::FindItemByLabel | ( | const wxString & | label | ) | const |
Finds a menu item by label.
size_t AxMenu::GetCount | ( | ) | const [inline] |
Gets the number of items in the menu.
AxMenuItem * AxMenu::GetCurrentItem | ( | ) | const |
Gets the current menu item.
int AxMenu::GetCurrentSelection | ( | ) | const [inline] |
Gets the current zero-based menu selection.
const wxString& AxMenu::GetDescription | ( | ) | const [inline] |
Gets the menu description, which will appear below the menu control in the standard user interface.
const wxString& AxMenu::GetId | ( | ) | const [inline] |
Gets the menu identifier.
AxMenuItem* AxMenu::GetItem | ( | size_t | i | ) | const [inline] |
Gets the menu item at position i (zero-based).
AxMenuItemArray& AxMenu::GetItems | ( | ) | [inline] |
Get items.
const wxString& AxMenu::GetLabel | ( | ) | const [inline] |
Gets the menu label, which will appear above the menu control in the standard user interface.
AxMenuItem* AxMenu::GetParent | ( | ) | const [inline] |
Gets the parent menu item.
void AxMenu::Init | ( | ) |
Member initialisation.
bool AxMenu::IsModal | ( | ) | const [inline] |
Returns true if this menu is showing modally.
void AxMenu::operator= | ( | const AxMenu & | menu | ) | [inline] |
bool AxMenu::operator== | ( | const AxMenu & | menu | ) | const |
void AxMenu::RemoveChild | ( | AxMenuItem * | item | ) |
Removes an item from the menu, without deleting the item.
void AxMenu::ScheduleMenuForDeletion | ( | AxMenu * | menu | ) | [static] |
Schedules a menu for delayed deletion.
void AxMenu::SetCurrentSelection | ( | int | sel | ) | [inline] |
Sets the current zero-based menu selection.
void AxMenu::SetDescription | ( | const wxString & | description | ) | [inline] |
Sets the menu description, which will appear below the menu control in the standard user interface.
void AxMenu::SetId | ( | const wxString & | id | ) | [inline] |
Sets the menu identifier. Not currently used.
void AxMenu::SetLabel | ( | const wxString & | label | ) | [inline] |
Sets the menu label, which will appear above the menu control in the standard user interface.
void AxMenu::SetModal | ( | bool | isModal | ) | [inline] |
Marks the menu as showing modally.
void AxMenu::SetParent | ( | AxMenuItem * | item | ) | [inline] |
Sets the parent menu item.
bool AxMenu::TransferDataFromMenu | ( | bool | recurse = false |
) | [virtual] |
Transfer data using validator, if any.
bool AxMenu::TransferDataToMenu | ( | bool | recurse = false |
) | [virtual] |
Transfer data using validator, if any.
void AxMenu::Unlink | ( | ) |
Unlinks the menu from its associated item.
int AxMenu::m_currentSelection [protected] |
wxString AxMenu::m_description [protected] |
wxString AxMenu::m_id [protected] |
bool AxMenu::m_isModal [protected] |
AxMenuItemArray AxMenu::m_items [protected] |
wxString AxMenu::m_label [protected] |
AxMenuItem* AxMenu::m_parent [protected] |
AxMenuArray AxMenu::sm_menusPendingDeletion [static, protected] |