#include <ax/ax_activator.h>
Public Member Functions | |
AxAutoUpdateActivator () | |
AxAutoUpdateActivator (const wxString &labelSpec, const wxString &descriptionSpec) | |
AxAutoUpdateActivator (const AxAutoUpdateActivator &activator) | |
void | Init () |
void | Copy (const AxAutoUpdateActivator &activator) |
virtual wxString | CreateString (const wxString &spec, bool isLabel)=0 |
Create the menu label or description, for example by substituting keywords in spec. | |
virtual bool | BeforeDisplay (AxMenuController *controller, AxMenuItem *item) |
Called just before the menu item is displayed. | |
virtual bool | UpdateUI (AxMenuController *controller, AxMenuItem *item) |
Called during display, at intervals. | |
bool | UpdateItem (AxMenuController *controller, AxMenuItem *item) |
Update label or description. | |
const wxString & | GetLabelSpec () const |
Get the label specification. | |
void | SetLabelSpec (const wxString &spec) |
Set the label specification. | |
const wxString & | GetDescriptionSpec () const |
Get the description specification. | |
void | SetDescriptionSpec (const wxString &spec) |
Set the description specification. | |
Protected Attributes | |
wxString | m_labelSpec |
wxString | m_descriptionSpec |
Just override the CreateString function to substitute symbols into label and description.
Use this when the menu item label and description might change over time.
AxAutoUpdateActivator::AxAutoUpdateActivator | ( | ) | [inline] |
AxAutoUpdateActivator::AxAutoUpdateActivator | ( | const wxString & | labelSpec, | |
const wxString & | descriptionSpec | |||
) |
AxAutoUpdateActivator::AxAutoUpdateActivator | ( | const AxAutoUpdateActivator & | activator | ) | [inline] |
virtual bool AxAutoUpdateActivator::BeforeDisplay | ( | AxMenuController * | controller, | |
AxMenuItem * | item | |||
) | [virtual] |
void AxAutoUpdateActivator::Copy | ( | const AxAutoUpdateActivator & | activator | ) |
virtual wxString AxAutoUpdateActivator::CreateString | ( | const wxString & | spec, | |
bool | isLabel | |||
) | [pure virtual] |
Create the menu label or description, for example by substituting keywords in spec.
The result will then be used by UpdateItem to set the label or description.
Implemented in AxChoiceActivator, AxRangeActivator, and AxTextActivator.
const wxString& AxAutoUpdateActivator::GetDescriptionSpec | ( | ) | const [inline] |
Get the description specification.
const wxString& AxAutoUpdateActivator::GetLabelSpec | ( | ) | const [inline] |
Get the label specification.
void AxAutoUpdateActivator::Init | ( | ) |
Reimplemented from AxActivator.
Reimplemented in AxChoiceActivator, AxFolderActivator, AxRangeActivator, AxShortcutTextActivator, and AxTextActivator.
void AxAutoUpdateActivator::SetDescriptionSpec | ( | const wxString & | spec | ) | [inline] |
Set the description specification.
void AxAutoUpdateActivator::SetLabelSpec | ( | const wxString & | spec | ) | [inline] |
Set the label specification.
bool AxAutoUpdateActivator::UpdateItem | ( | AxMenuController * | controller, | |
AxMenuItem * | item | |||
) |
Update label or description.
bool AxAutoUpdateActivator::UpdateUI | ( | AxMenuController * | controller, | |
AxMenuItem * | item | |||
) | [virtual] |
wxString AxAutoUpdateActivator::m_descriptionSpec [protected] |
wxString AxAutoUpdateActivator::m_labelSpec [protected] |