#include <ax/ax_menu.h>
Public Member Functions | |
AxMenuController () | |
~AxMenuController () | |
void | Init () |
void | SetViewManager (AxViewManager *manager) |
Set/get view manager. | |
AxViewManager * | GetViewManager () const |
AxMenu * | GetMenu () const |
Get the main menu. | |
void | SetMenu (AxMenu *menu) |
Set the main menu. | |
AxMenu * | GetCurrentMenu () const |
Get current menu (either the top-level menu, or a submenu). | |
void | SetCurrentMenu (AxMenu *menu) |
Set current menu (either the top-level menu, or a submenu). | |
virtual bool | ShowInitialMenu (AxMenu *menu) |
Show initial top-level menu. | |
virtual bool | Activate (AxMenuItem *item) |
Called by the menu control when the user has interacted with it. | |
virtual bool | Select (AxMenuItem *item) |
virtual bool | Describe (AxMenuItem *item, int describeAtVerbosity=5) |
virtual bool | DescribeCurrentContext (int describeAtVerbosity=3) |
virtual bool | DescribeCurrentItem (int describeAtVerbosity=5) |
virtual bool | GoUp () |
virtual bool | GoHome () |
virtual bool | ShowMenu (AxMenu *menu, AxMenuItem *parentItem=NULL, AxMenu *childMenu=NULL, AxNavigationHint hint=AxNavigationHintNone) |
Show menu, optionally passing the item it's spawned from. | |
virtual bool | UpdateUI (AxMenu *menu) |
Update the current menu UI. | |
virtual bool | CanGoUp () const |
Returns true if the user can go up a menu. | |
virtual bool | CanGoHome () const |
Returns true if the user can go to the home menu. | |
virtual bool | RefreshMenu (AxMenu *menu, AxNavigationHint hint)=0 |
Called when the menu must be refreshed - implement for a specific control. | |
virtual bool | SetMenuSelection (AxMenuItem *menuItem)=0 |
Called when a menu item should be selected - implement for a specific control. | |
virtual bool | UpdateMenuItem (AxMenuItem *item)=0 |
Called when a menu item must be updated. | |
virtual AxMenuItem * | GetMenuSelection () const =0 |
Called when we need to get the currently selected menu item - implement for a specific control. | |
virtual bool | BeginModal ()=0 |
Called when the menu becomes modal. | |
virtual bool | EndModal ()=0 |
Called when the menu stops being modal. | |
virtual bool | SetTitle (const wxString &title)=0 |
Called when the current view title should be changed - implement for a specific title control. | |
virtual bool | SetMenuFocus ()=0 |
Called when the menu should get the focus. | |
virtual bool | OnChangeMenuPre (AxMenu *currentMenu, AxMenu *newMenu) |
Override if something needs to be done before the menu context changes, e.g. | |
virtual bool | OnChangeMenuPost (AxMenu *newMenu) |
Override if something needs to be done before the menu context changes, e.g. | |
virtual bool | OnBeforeDisplay (AxMenu *newMenu) |
Override to do something just before the menu is refreshed. | |
virtual bool | UpdateAppearance (int hints)=0 |
Override to update the appearance when settings change. | |
bool | EmitSpeech (AxSpeechEvent &event) |
Emit speech. | |
bool | EmitSpeech (const wxString &speechEventType, const wxString &text=wxEmptyString, AxNavigationHint hint=AxNavigationHintNone, int flags=0) |
Emit speech. | |
bool | EmitSpeech (const wxString &speechEventType, AxNavigationHint hint, int flags=0) |
Emit speech. | |
virtual bool | DoEmitSpeech (AxSpeechEvent &event) |
Speech emission implementation. | |
virtual bool | IdleProcessing () |
Perform idle processing. | |
Protected Attributes | |
AxMenu * | m_menu |
AxMenu * | m_currentMenu |
AxViewManager * | m_viewManager |
Derive from this class and override functions that indicate when the menu should change. Also, call functions in this object to indicate activation, etc.
AxMenuController::AxMenuController | ( | ) | [inline] |
AxMenuController::~AxMenuController | ( | ) |
bool AxMenuController::Activate | ( | AxMenuItem * | item | ) | [virtual] |
Called by the menu control when the user has interacted with it.
virtual bool AxMenuController::BeginModal | ( | ) | [pure virtual] |
bool AxMenuController::CanGoHome | ( | ) | const [virtual] |
Returns true if the user can go to the home menu.
bool AxMenuController::CanGoUp | ( | ) | const [virtual] |
Returns true if the user can go up a menu.
bool AxMenuController::Describe | ( | AxMenuItem * | item, | |
int | describeAtVerbosity = 5 | |||
) | [virtual] |
bool AxMenuController::DescribeCurrentContext | ( | int | describeAtVerbosity = 3 |
) | [virtual] |
bool AxMenuController::DescribeCurrentItem | ( | int | describeAtVerbosity = 5 |
) | [virtual] |
bool AxMenuController::DoEmitSpeech | ( | AxSpeechEvent & | event | ) | [virtual] |
Speech emission implementation.
bool AxMenuController::EmitSpeech | ( | const wxString & | speechEventType, | |
AxNavigationHint | hint, | |||
int | flags = 0 | |||
) |
Emit speech.
bool AxMenuController::EmitSpeech | ( | const wxString & | speechEventType, | |
const wxString & | text = wxEmptyString , |
|||
AxNavigationHint | hint = AxNavigationHintNone , |
|||
int | flags = 0 | |||
) |
Emit speech.
bool AxMenuController::EmitSpeech | ( | AxSpeechEvent & | event | ) | [inline] |
Emit speech.
virtual bool AxMenuController::EndModal | ( | ) | [pure virtual] |
AxMenu* AxMenuController::GetCurrentMenu | ( | ) | const [inline] |
Get current menu (either the top-level menu, or a submenu).
AxMenu* AxMenuController::GetMenu | ( | ) | const [inline] |
Get the main menu.
virtual AxMenuItem* AxMenuController::GetMenuSelection | ( | ) | const [pure virtual] |
Called when we need to get the currently selected menu item - implement for a specific control.
Implemented in AxStandardMenuController.
AxViewManager* AxMenuController::GetViewManager | ( | ) | const [inline] |
bool AxMenuController::GoHome | ( | ) | [virtual] |
bool AxMenuController::GoUp | ( | ) | [virtual] |
bool AxMenuController::IdleProcessing | ( | ) | [virtual] |
void AxMenuController::Init | ( | ) |
Reimplemented in AxStandardMenuController.
bool AxMenuController::OnBeforeDisplay | ( | AxMenu * | newMenu | ) | [virtual] |
Override to do something just before the menu is refreshed.
virtual bool AxMenuController::OnChangeMenuPost | ( | AxMenu * | newMenu | ) | [virtual] |
Override if something needs to be done before the menu context changes, e.g.
saving an edit. If this returns false, it vetoes the menu change.
Override if something needs to be done before the menu context changes, e.g.
saving an edit. If this returns false, it vetoes the menu change.
virtual bool AxMenuController::RefreshMenu | ( | AxMenu * | menu, | |
AxNavigationHint | hint | |||
) | [pure virtual] |
Called when the menu must be refreshed - implement for a specific control.
Implemented in AxStandardMenuController.
bool AxMenuController::Select | ( | AxMenuItem * | item | ) | [virtual] |
void AxMenuController::SetCurrentMenu | ( | AxMenu * | menu | ) | [inline] |
Set current menu (either the top-level menu, or a submenu).
void AxMenuController::SetMenu | ( | AxMenu * | menu | ) |
Set the main menu.
virtual bool AxMenuController::SetMenuFocus | ( | ) | [pure virtual] |
virtual bool AxMenuController::SetMenuSelection | ( | AxMenuItem * | menuItem | ) | [pure virtual] |
Called when a menu item should be selected - implement for a specific control.
Implemented in AxStandardMenuController.
virtual bool AxMenuController::SetTitle | ( | const wxString & | title | ) | [pure virtual] |
Called when the current view title should be changed - implement for a specific title control.
Implemented in AxStandardMenuController.
void AxMenuController::SetViewManager | ( | AxViewManager * | manager | ) | [inline] |
Set/get view manager.
bool AxMenuController::ShowInitialMenu | ( | AxMenu * | menu | ) | [virtual] |
Show initial top-level menu.
bool AxMenuController::ShowMenu | ( | AxMenu * | menu, | |
AxMenuItem * | parentItem = NULL , |
|||
AxMenu * | childMenu = NULL , |
|||
AxNavigationHint | hint = AxNavigationHintNone | |||
) | [virtual] |
Show menu, optionally passing the item it's spawned from.
If childMenu is specified, link 'menu' but then show the child menu immediately (i.e., a child of the menu we're showing).
virtual bool AxMenuController::UpdateAppearance | ( | int | hints | ) | [pure virtual] |
virtual bool AxMenuController::UpdateMenuItem | ( | AxMenuItem * | item | ) | [pure virtual] |
bool AxMenuController::UpdateUI | ( | AxMenu * | menu | ) | [virtual] |
Update the current menu UI.
AxMenu* AxMenuController::m_currentMenu [protected] |
AxMenu* AxMenuController::m_menu [protected] |
AxViewManager* AxMenuController::m_viewManager [protected] |