AxSelfVoicing Class Reference

A class that can voice-enable an existing window containing controls, by inserting event handlers. More...

#include <ax/ax_ui_adaptation.h>

List of all members.

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)
AxSpeechGetSpeech () const
void SetWindow (wxWindow *win)
wxWindow * GetWindow () const
void SetShortcutManager (wxShortcutManager *shortcutManager)
wxShortcutManagerGetShortcutManager () 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 AxVoiceAdaptationHandlerFindAdaptationHandler (wxWindow *window)
 Finds a handler for the given window.
static AxAdapterFindAdapter (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
AxSpeechm_speech
wxShortcutManagerm_shortcutManager
bool m_adapted
wxArrayInt m_adaptedCtrls

Static Protected Attributes

static AxVoiceAdaptationHandlerArray m_voiceAdaptationHandlers


Detailed Description

A class that can voice-enable an existing window containing controls, by inserting event handlers.

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.


Constructor & Destructor Documentation

AxSelfVoicing::AxSelfVoicing ( wxWindow *  window = NULL,
AxSpeech speech = NULL,
wxShortcutManager shortcutManager = NULL 
)

AxSelfVoicing::~AxSelfVoicing (  ) 


Member Function Documentation

void AxSelfVoicing::Init (  ) 

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::UndoAdaptation (  )  [virtual]

Restore the controls in this window.

bool AxSelfVoicing::AdaptWindow ( wxWindow *  window,
bool  recurse = true 
) [virtual]

Adapt a single window, optionally recursing.

bool AxSelfVoicing::UnadaptWindow ( wxWindow *  window,
bool  recurse = true 
) [virtual]

Unadapt a single window, optionally recursing.

void AxSelfVoicing::SetSpeech ( AxSpeech speech  )  [inline]

AxSpeech* AxSelfVoicing::GetSpeech (  )  const [inline]

void AxSelfVoicing::SetWindow ( wxWindow *  win  )  [inline]

wxWindow* AxSelfVoicing::GetWindow (  )  const [inline]

void AxSelfVoicing::SetShortcutManager ( wxShortcutManager shortcutManager  )  [inline]

wxShortcutManager* AxSelfVoicing::GetShortcutManager (  )  const [inline]

bool AxSelfVoicing::IsAdapted (  )  const [inline]

static AxVoiceAdaptationHandlerArray& AxSelfVoicing::GetAdaptationHandlers (  )  [inline, static]

Returns the array of handlers that can create event handlers for specific windows.

static void AxSelfVoicing::AddAdaptationHandler ( AxVoiceAdaptationHandler handler  )  [inline, static]

Adds an adaptation handler.

static void AxSelfVoicing::InsertAdaptationHandler ( AxVoiceAdaptationHandler handler  )  [inline, static]

Inserts an adaptation handler at the front of the list.

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.

bool AxSelfVoicing::AddAdapter ( wxWindow *  window,
AxAdapter adapter 
) [static]

Adds an adapter to a window.

bool AxSelfVoicing::RemoveAdapter ( wxWindow *  window,
AxAdapter adapter = NULL 
) [static]

Removes and deletes an adapter.


Member Data Documentation

AxVoiceAdaptationHandlerArray AxSelfVoicing::m_voiceAdaptationHandlers [static, protected]

wxWindow* AxSelfVoicing::m_window [protected]

AxSpeech* AxSelfVoicing::m_speech [protected]

wxShortcutManager* AxSelfVoicing::m_shortcutManager [protected]

bool AxSelfVoicing::m_adapted [protected]

wxArrayInt AxSelfVoicing::m_adaptedCtrls [protected]


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