AxActivator Class Reference

This class defines how a menu item responds to user input such as activation. More...

#include <ax/ax_activator.h>

Inheritance diagram for AxActivator:

AxAlertMenuActivator AxAutoUpdateActivator AxChoiceMenuActivator AxEventActivator AxFolderMenuActivator AxResourceActivator AxResourceLibraryActivator AxResourceLibraryAddActivator AxResourceLibrarySettingsActivator AxShortcutsActivator AxSpeechSettingsActivator AxToggleActivator AxUpActivator AxVisualSettingsActivator List of all members.

Public Member Functions

 AxActivator (AxMenuItem *item=NULL)
 ~AxActivator ()
void Init ()
void Copy (const AxActivator &activator)
virtual AxActivatorClone () const=0
virtual AxMenuActivate (AxMenuController *controller, AxMenuItem *item)=0
 Called when the user activates a menu item by pressing return or double-clicking.
virtual bool Reactivate (AxMenuController *WXUNUSED(controller), AxMenuItem *WXUNUSED(item))
 Called when a menu is reactivated, for example by going up.
virtual bool Select (AxMenuController *controller, AxMenuItem *item)
 Called when the user selects an item, for example to describe the item.
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.
AxMenuItemGetMenuItem () const
 Returns the corresponding menu item.
void SetMenuItem (AxMenuItem *item)

Protected Attributes

AxMenuItemm_menuItem

Detailed Description

This class defines how a menu item responds to user input such as activation.

Derive from this class, override functions such as Activate, and associate an instance with a menu item.

The virtual function BeforeDisplay is called just before it is displayed, and UpdateUI is called periodically to allow on-idle updating.

Activate is called when the item has been activated (for example on return or double-click), and Select is called when the item has been selected (highlighted).

If Activate returns an AxMenu pointer, the menu immediately becomes managed by the menu controller (so don't delete it) and the menu is shown. Return NULL if you don't need a new menu to be shown.

If the AxMenuItem has been marked as dynamic, you can return a new AxMenu each time. If it's static, return the menu item's submenu if it exists, else create a new menu item.


Constructor & Destructor Documentation

AxActivator::AxActivator ( AxMenuItem item = NULL  )  [inline]

AxActivator::~AxActivator (  )  [inline]


Member Function Documentation

void AxActivator::Init (  )  [inline]

Reimplemented in AxEventActivator, AxUpActivator, AxAutoUpdateActivator, AxAlertMenuActivator, AxChoiceMenuActivator, AxChoiceActivator, AxFolderMenuActivator, AxFolderActivator, AxRangeActivator, AxShortcutsActivator, AxShortcutTextActivator, AxSpeechSettingsActivator, AxTextActivator, AxToggleActivator, AxVisualSettingsActivator, AxResourceLibraryActivator, AxResourceActivator, AxResourceLibrarySettingsActivator, AxResourceLibraryAddActivator, AxAudioResourceActivator, AxAudioResourceCommandActivator, AxBookResourceActivator, and AxBookResourceCommandActivator.

void AxActivator::Copy ( const AxActivator activator  )  [inline]

virtual AxActivator* AxActivator::Clone (  )  const [pure virtual]

Implemented in AxEventActivator, AxUpActivator, AxAlertMenuActivator, AxChoiceMenuActivator, AxChoiceActivator, AxFolderMenuActivator, AxFolderActivator, AxRangeActivator, AxShortcutsActivator, AxShortcutTextActivator, AxSpeechSettingsActivator, AxTextActivator, AxToggleActivator, AxVisualSettingsActivator, AxResourceLibraryActivator, AxResourceActivator, AxResourceLibrarySettingsActivator, AxResourceLibraryAddActivator, AxAudioResourceActivator, AxAudioResourceCommandActivator, AxBookResourceActivator, and AxBookResourceCommandActivator.

virtual AxMenu* AxActivator::Activate ( AxMenuController controller,
AxMenuItem item 
) [pure virtual]

Called when the user activates a menu item by pressing return or double-clicking.

Implemented in AxEventActivator, AxUpActivator, AxAlertMenuActivator, AxChoiceMenuActivator, AxChoiceActivator, AxFolderMenuActivator, AxFolderActivator, AxRangeActivator, AxShortcutsActivator, AxShortcutTextActivator, AxSpeechSettingsActivator, AxTextActivator, AxToggleActivator, AxVisualSettingsActivator, AxResourceLibraryActivator, AxResourceActivator, AxResourceLibrarySettingsActivator, AxResourceLibraryAddActivator, AxAudioResourceActivator, AxAudioResourceCommandActivator, AxBookResourceActivator, and AxBookResourceCommandActivator.

virtual bool AxActivator::Reactivate ( AxMenuController WXUNUSED(controller),
AxMenuItem WXUNUSED(item) 
) [inline, virtual]

Called when a menu is reactivated, for example by going up.

This allows a view to be shown again, without generating all the menus.

bool AxActivator::Select ( AxMenuController controller,
AxMenuItem item 
) [virtual]

Called when the user selects an item, for example to describe the item.

Reimplemented in AxResourceActivator.

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

Called just before the menu item is displayed.

Reimplemented in AxAutoUpdateActivator, and AxToggleActivator.

virtual bool AxActivator::UpdateUI ( AxMenuController controller,
AxMenuItem item 
) [virtual]

Called during display, at intervals.

Reimplemented in AxAutoUpdateActivator, and AxToggleActivator.

AxMenuItem* AxActivator::GetMenuItem (  )  const [inline]

Returns the corresponding menu item.

void AxActivator::SetMenuItem ( AxMenuItem item  )  [inline]


Member Data Documentation

AxMenuItem* AxActivator::m_menuItem [protected]


The documentation for this class was generated from the following files:
Generated on Wed May 6 19:20:20 2009 for AxTk by  doxygen 1.5.1