AxAutoUpdateActivator Class Reference
[Basic AxTk UI classes]

This class stores label and description specifications which are used to automatically update the label and/or description. More...

#include <ax/ax_activator.h>

Inheritance diagram for AxAutoUpdateActivator:

AxActivator AxChoiceActivator AxFolderActivator AxRangeActivator AxTextActivator AxShortcutTextActivator

List of all members.

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


Detailed Description

This class stores label and description specifications which are used to automatically update the label and/or description.

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.


Constructor & Destructor Documentation

AxAutoUpdateActivator::AxAutoUpdateActivator (  )  [inline]

AxAutoUpdateActivator::AxAutoUpdateActivator ( const wxString &  labelSpec,
const wxString &  descriptionSpec 
)

AxAutoUpdateActivator::AxAutoUpdateActivator ( const AxAutoUpdateActivator activator  )  [inline]


Member Function Documentation

virtual bool AxAutoUpdateActivator::BeforeDisplay ( AxMenuController controller,
AxMenuItem item 
) [virtual]

Called just before the menu item is displayed.

Reimplemented from AxActivator.

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 (  ) 

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]

Called during display, at intervals.

Reimplemented from AxActivator.


Member Data Documentation

wxString AxAutoUpdateActivator::m_labelSpec [protected]


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

Generated on Wed May 6 19:22:06 2009 for AxTk by  doxygen 1.5.8