#include <ax/ax_menu_choice.h>
Public Member Functions | |
AxChoiceMenuItem (const AxChoiceMenuItem &item) | |
AxChoiceMenuItem () | |
AxChoiceMenuItem (const wxString &label, const wxString &description, const wxString &id, const wxArrayString &labels, const wxArrayString &ids, const wxArrayString &descriptions, int selection=0) | |
bool | Create (const wxString &label, const wxString &description, const wxString &id, const wxArrayString &labels, const wxArrayString &ids, const wxArrayString &descriptions, int selection=0) |
void | Init () |
Member initialisation. | |
void | Copy (const AxChoiceMenuItem &item) |
virtual AxMenuItem * | Clone () const |
Override this function for derived classes. | |
wxString | GetSelectionLabel () const |
Get current selected label. | |
wxString | GetSelectionId () const |
Get current selected id. | |
int | GetSelection () const |
Get current selected index. | |
virtual void | SetSelection (int i) |
Set current selection. | |
virtual void | SetSelectionByLabel (const wxString &label) |
Set current selection. | |
virtual void | SetSelectionById (const wxString &id) |
Set current selection. | |
virtual wxString | CreateString (const wxString &spec, bool isLabel) |
Create menu label or description. | |
void | SetLabels (const wxArrayString &labels) |
const wxArrayString & | GetLabels () const |
void | SetIds (const wxArrayString &ids) |
const wxArrayString & | GetIds () const |
void | SetDescriptions (const wxArrayString &descriptions) |
const wxArrayString & | GetDescriptions () const |
void | SetLabelSpec (const wxString &spec) |
Set menu item label spec, if any. | |
wxString | GetLabelSpec () const |
Get menu item label spec, if any. | |
void | SetDescriptionSpec (const wxString &spec) |
Set menu item description spec, if any. | |
wxString | GetDescriptionSpec () const |
Get menu item description spec, if any. | |
Protected Attributes | |
wxArrayString | m_labels |
wxArrayString | m_ids |
wxArrayString | m_descriptions |
int | m_selection |
label and description can both contain the VALUE% keyword, which will be substituted with the current value.
When the value is changed, a wxEVT_COMMAND_CHOICE_SELECTED
event is generated.
AxChoiceMenuItem::AxChoiceMenuItem | ( | const AxChoiceMenuItem & | item | ) | [inline] |
AxChoiceMenuItem::AxChoiceMenuItem | ( | ) | [inline] |
AxChoiceMenuItem::AxChoiceMenuItem | ( | const wxString & | label, | |
const wxString & | description, | |||
const wxString & | id, | |||
const wxArrayString & | labels, | |||
const wxArrayString & | ids, | |||
const wxArrayString & | descriptions, | |||
int | selection = 0 | |||
) |
virtual AxMenuItem* AxChoiceMenuItem::Clone | ( | ) | const [inline, virtual] |
void AxChoiceMenuItem::Copy | ( | const AxChoiceMenuItem & | item | ) |
bool AxChoiceMenuItem::Create | ( | const wxString & | label, | |
const wxString & | description, | |||
const wxString & | id, | |||
const wxArrayString & | labels, | |||
const wxArrayString & | ids, | |||
const wxArrayString & | descriptions, | |||
int | selection = 0 | |||
) |
virtual wxString AxChoiceMenuItem::CreateString | ( | const wxString & | spec, | |
bool | isLabel | |||
) | [virtual] |
Create menu label or description.
const wxArrayString& AxChoiceMenuItem::GetDescriptions | ( | ) | const [inline] |
wxString AxChoiceMenuItem::GetDescriptionSpec | ( | ) | const |
const wxArrayString& AxChoiceMenuItem::GetIds | ( | ) | const [inline] |
const wxArrayString& AxChoiceMenuItem::GetLabels | ( | ) | const [inline] |
wxString AxChoiceMenuItem::GetLabelSpec | ( | ) | const |
int AxChoiceMenuItem::GetSelection | ( | ) | const [inline] |
Get current selected index.
wxString AxChoiceMenuItem::GetSelectionId | ( | ) | const |
Get current selected id.
wxString AxChoiceMenuItem::GetSelectionLabel | ( | ) | const |
Get current selected label.
void AxChoiceMenuItem::Init | ( | ) |
void AxChoiceMenuItem::SetDescriptions | ( | const wxArrayString & | descriptions | ) | [inline] |
void AxChoiceMenuItem::SetDescriptionSpec | ( | const wxString & | spec | ) |
void AxChoiceMenuItem::SetIds | ( | const wxArrayString & | ids | ) | [inline] |
void AxChoiceMenuItem::SetLabels | ( | const wxArrayString & | labels | ) | [inline] |
void AxChoiceMenuItem::SetLabelSpec | ( | const wxString & | spec | ) |
void AxChoiceMenuItem::SetSelection | ( | int | i | ) | [virtual] |
void AxChoiceMenuItem::SetSelectionById | ( | const wxString & | id | ) | [virtual] |
Set current selection.
void AxChoiceMenuItem::SetSelectionByLabel | ( | const wxString & | label | ) | [virtual] |
Set current selection.
wxArrayString AxChoiceMenuItem::m_descriptions [protected] |
wxArrayString AxChoiceMenuItem::m_ids [protected] |
wxArrayString AxChoiceMenuItem::m_labels [protected] |
int AxChoiceMenuItem::m_selection [protected] |