AxVoicedEvtHandler Class Reference
[Basic AxTk UI classes]

A base class for control-specific event handlers that process events controls and emit speech, as appropriate. More...

#include <ax/ax_ui_adaptation.h>

Inheritance diagram for AxVoicedEvtHandler:

AxButtonVoicedEvtHandler AxCheckBoxVoicedEvtHandler AxListBoxVoicedEvtHandler AxRadioButtonVoicedEvtHandler AxTextEvtHandler

List of all members.

Public Member Functions

 AxVoicedEvtHandler (wxWindow *window=NULL, AxSpeech *speech=NULL)
 ~AxVoicedEvtHandler ()
void Init ()
virtual wxString GetControlName ()=0
 Override to return the name of the control, e.g. button, listbox.
virtual wxString GetLabel ()
 Override to return the label for the control, e.g. button label or static text before a listbox.
virtual wxString GetControlStateText ()=0
 Override to return text representing the state of the control, for example the current value.
virtual bool DescribeControlContext (bool metaInfo=true)
 Describe current state.
virtual bool Say (const wxString &text, int flags=AxSpeechFlagsPurge, int verbosity=2)
 Say some text.
virtual bool StopSpeech ()
 Stop speaking.
virtual bool PauseOrResumeSpeech ()
 Pause or resume speech.
void SetSpeech (AxSpeech *speech)
AxSpeechGetSpeech () const
void SetWindow (wxWindow *win)
wxWindow * GetWindow () const
void SetShortcutManager (wxShortcutManager *shortcutManager)
wxShortcutManagerGetShortcutManager () const
void OnKeyDown (wxKeyEvent &event)
void OnChar (wxKeyEvent &event)
void OnIdle (wxIdleEvent &event)
void OnSetFocus (wxFocusEvent &event)
virtual wxStaticText * GetLabelForThisControl ()
 Find a static text control that might describe this control.
void OnDescribeContext (wxCommandEvent &event)
void OnStopSpeech (wxCommandEvent &event)
void OnPauseResumeSpeech (wxCommandEvent &event)

Static Public Member Functions

static bool IsPunctuation (const wxChar &ch)
static bool IsSentenceEnd (const wxChar &ch)
static bool IsWhitespace (const wxChar &ch)
static wxString GetSpokenTextForKeycode (int keycode)
 Returns a speakable string for the key pressed.

Protected Attributes

wxWindow * m_window
AxSpeechm_speech
wxShortcutManagerm_shortcutManager


Detailed Description

A base class for control-specific event handlers that process events controls and emit speech, as appropriate.

AxVoicedEvtHandler also generates shortcut commands from key presses, and provides some utility functions such as Say.


Constructor & Destructor Documentation

AxVoicedEvtHandler::AxVoicedEvtHandler ( wxWindow *  window = NULL,
AxSpeech speech = NULL 
) [inline]

AxVoicedEvtHandler::~AxVoicedEvtHandler (  ) 


Member Function Documentation

bool AxVoicedEvtHandler::DescribeControlContext ( bool  metaInfo = true  )  [virtual]

Describe current state.

If metaInfo is true, describes the kind of control it is. This is a default implementation that can be overridden to give more specific detail.

virtual wxString AxVoicedEvtHandler::GetControlName (  )  [pure virtual]

Override to return the name of the control, e.g. button, listbox.

Implemented in AxTextEvtHandler, AxButtonVoicedEvtHandler, AxCheckBoxVoicedEvtHandler, AxRadioButtonVoicedEvtHandler, and AxListBoxVoicedEvtHandler.

virtual wxString AxVoicedEvtHandler::GetControlStateText (  )  [pure virtual]

Override to return text representing the state of the control, for example the current value.

Implemented in AxTextEvtHandler, AxButtonVoicedEvtHandler, AxCheckBoxVoicedEvtHandler, AxRadioButtonVoicedEvtHandler, and AxListBoxVoicedEvtHandler.

wxString AxVoicedEvtHandler::GetLabel (  )  [virtual]

Override to return the label for the control, e.g. button label or static text before a listbox.

wxStaticText * AxVoicedEvtHandler::GetLabelForThisControl (  )  [virtual]

Find a static text control that might describe this control.

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

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

wxString AxVoicedEvtHandler::GetSpokenTextForKeycode ( int  keycode  )  [static]

Returns a speakable string for the key pressed.

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

void AxVoicedEvtHandler::Init (  ) 

Reimplemented in AxTextEvtHandler.

bool AxVoicedEvtHandler::IsPunctuation ( const wxChar &  ch  )  [static]

bool AxVoicedEvtHandler::IsSentenceEnd ( const wxChar &  ch  )  [static]

bool AxVoicedEvtHandler::IsWhitespace ( const wxChar &  ch  )  [static]

void AxVoicedEvtHandler::OnChar ( wxKeyEvent &  event  ) 

void AxVoicedEvtHandler::OnDescribeContext ( wxCommandEvent &  event  ) 

Reimplemented in AxTextEvtHandler.

void AxVoicedEvtHandler::OnIdle ( wxIdleEvent &  event  ) 

void AxVoicedEvtHandler::OnKeyDown ( wxKeyEvent &  event  ) 

void AxVoicedEvtHandler::OnPauseResumeSpeech ( wxCommandEvent &  event  ) 

void AxVoicedEvtHandler::OnSetFocus ( wxFocusEvent &  event  ) 

void AxVoicedEvtHandler::OnStopSpeech ( wxCommandEvent &  event  ) 

bool AxVoicedEvtHandler::PauseOrResumeSpeech (  )  [virtual]

Pause or resume speech.

bool AxVoicedEvtHandler::Say ( const wxString &  text,
int  flags = AxSpeechFlagsPurge,
int  verbosity = 2 
) [virtual]

Say some text.

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

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

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

bool AxVoicedEvtHandler::StopSpeech (  )  [virtual]

Stop speaking.


Member Data Documentation

wxWindow* AxVoicedEvtHandler::m_window [protected]


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

Generated on Thu Apr 23 13:14:00 2009 for AxTk by  doxygen 1.5.8