#include <ax/ax_ui_adaptation.h>
Public Member Functions | |
AxSelfVoicing (wxWindow *window=NULL, AxSpeech *speech=NULL, wxShortcutManager *shortcutManager=NULL) | |
~AxSelfVoicing () | |
void | Init () |
virtual bool | Adapt (wxWindow *window=NULL, int flags=AxAdaptDefault) |
Adapt the controls in this window. | |
virtual bool | UndoAdaptation () |
Restore the controls in this window. | |
virtual bool | AdaptWindow (wxWindow *window, bool recurse=true) |
Adapt a single window, optionally recursing. | |
virtual bool | UnadaptWindow (wxWindow *window, bool recurse=true) |
Unadapt a single window, optionally recursing. | |
void | SetSpeech (AxSpeech *speech) |
AxSpeech * | GetSpeech () const |
void | SetWindow (wxWindow *win) |
wxWindow * | GetWindow () const |
void | SetShortcutManager (wxShortcutManager *shortcutManager) |
wxShortcutManager * | GetShortcutManager () const |
bool | IsAdapted () const |
Static Public Member Functions | |
static AxVoiceAdaptationHandlerArray & | GetAdaptationHandlers () |
Returns the array of handlers that can create event handlers for specific windows. | |
static void | AddAdaptationHandler (AxVoiceAdaptationHandler *handler) |
Adds an adaptation handler. | |
static void | InsertAdaptationHandler (AxVoiceAdaptationHandler *handler) |
Inserts an adaptation handler at the front of the list. | |
static void | AddStandardAdaptationHandlers () |
Adds standard handlers. | |
static void | ClearAdaptationHandlers () |
Clears the handlers. | |
static AxVoiceAdaptationHandler * | FindAdaptationHandler (wxWindow *window) |
Finds a handler for the given window. | |
static AxAdapter * | FindAdapter (wxWindow *window) |
Finds a voice event handler in the given window's event stack. | |
static bool | AddAdapter (wxWindow *window, AxAdapter *adapter) |
Adds an adapter to a window. | |
static bool | RemoveAdapter (wxWindow *window, AxAdapter *adapter=NULL) |
Removes and deletes an adapter. | |
Protected Attributes | |
wxWindow * | m_window |
AxSpeech * | m_speech |
wxShortcutManager * | m_shortcutManager |
bool | m_adapted |
wxArrayInt | m_adaptedCtrls |
Static Protected Attributes | |
static AxVoiceAdaptationHandlerArray | m_voiceAdaptationHandlers |
You can add an object of this class to your own dialogs and panels, and call Adapt after control creation. This will cause adapters to be inserted into the control event chains, intercepting events and talking as appropriate.
AxSelfVoicing::AxSelfVoicing | ( | wxWindow * | window = NULL , |
|
AxSpeech * | speech = NULL , |
|||
wxShortcutManager * | shortcutManager = NULL | |||
) |
AxSelfVoicing::~AxSelfVoicing | ( | ) |
bool AxSelfVoicing::Adapt | ( | wxWindow * | window = NULL , |
|
int | flags = AxAdaptDefault | |||
) | [virtual] |
Adapt the controls in this window.
If window is passed, it becomes the window associated with the adpater. Flags can be AxAdaptDefault, or AxAdaptSetAccelerators, which causes wxWindow::SetAcceleratorTable to be called using the current shortcut manager. However, use AxAdaptSetAccelerators with caution since it can conflict with shortcut processing by adapters and cause shortcuts to stop working.
bool AxSelfVoicing::AdaptWindow | ( | wxWindow * | window, | |
bool | recurse = true | |||
) | [virtual] |
Adapt a single window, optionally recursing.
static void AxSelfVoicing::AddAdaptationHandler | ( | AxVoiceAdaptationHandler * | handler | ) | [inline, static] |
Adds an adaptation handler.
bool AxSelfVoicing::AddAdapter | ( | wxWindow * | window, | |
AxAdapter * | adapter | |||
) | [static] |
Adds an adapter to a window.
void AxSelfVoicing::AddStandardAdaptationHandlers | ( | ) | [static] |
Adds standard handlers.
void AxSelfVoicing::ClearAdaptationHandlers | ( | ) | [static] |
Clears the handlers.
AxVoiceAdaptationHandler * AxSelfVoicing::FindAdaptationHandler | ( | wxWindow * | window | ) | [static] |
Finds a handler for the given window.
AxAdapter * AxSelfVoicing::FindAdapter | ( | wxWindow * | window | ) | [static] |
Finds a voice event handler in the given window's event stack.
static AxVoiceAdaptationHandlerArray& AxSelfVoicing::GetAdaptationHandlers | ( | ) | [inline, static] |
Returns the array of handlers that can create event handlers for specific windows.
wxShortcutManager* AxSelfVoicing::GetShortcutManager | ( | ) | const [inline] |
AxSpeech* AxSelfVoicing::GetSpeech | ( | ) | const [inline] |
wxWindow* AxSelfVoicing::GetWindow | ( | ) | const [inline] |
void AxSelfVoicing::Init | ( | ) |
static void AxSelfVoicing::InsertAdaptationHandler | ( | AxVoiceAdaptationHandler * | handler | ) | [inline, static] |
Inserts an adaptation handler at the front of the list.
bool AxSelfVoicing::IsAdapted | ( | ) | const [inline] |
bool AxSelfVoicing::RemoveAdapter | ( | wxWindow * | window, | |
AxAdapter * | adapter = NULL | |||
) | [static] |
Removes and deletes an adapter.
void AxSelfVoicing::SetShortcutManager | ( | wxShortcutManager * | shortcutManager | ) | [inline] |
void AxSelfVoicing::SetSpeech | ( | AxSpeech * | speech | ) | [inline] |
void AxSelfVoicing::SetWindow | ( | wxWindow * | win | ) | [inline] |
bool AxSelfVoicing::UnadaptWindow | ( | wxWindow * | window, | |
bool | recurse = true | |||
) | [virtual] |
Unadapt a single window, optionally recursing.
bool AxSelfVoicing::UndoAdaptation | ( | ) | [virtual] |
Restore the controls in this window.
bool AxSelfVoicing::m_adapted [protected] |
wxArrayInt AxSelfVoicing::m_adaptedCtrls [protected] |
wxShortcutManager* AxSelfVoicing::m_shortcutManager [protected] |
AxSpeech* AxSelfVoicing::m_speech [protected] |
AxVoiceAdaptationHandlerArray AxSelfVoicing::m_voiceAdaptationHandlers [static, protected] |
wxWindow* AxSelfVoicing::m_window [protected] |