AxView Class Reference
[Basic AxTk UI classes]

Handles UI for a family of documents, or for a particular data type. More...

#include <ax/ax_view.h>

Inheritance diagram for AxView:

AxAudioView AxBookView AxSummaryView

List of all members.

Public Member Functions

 AxView ()
 ~AxView ()
void Init ()
virtual bool Activate (AxViewManager *viewManager, AxDocument *doc)=0
 Override to activate the view for a particular document, and show the window.
virtual bool Deactivate (AxViewManager *viewManager)=0
 Override to deactivate the view. This implementation can be empty.
virtual bool Initialize (AxViewManager *viewManager)=0
 Override to create the view's window if necessary.
virtual bool Uninitialize (AxViewManager *viewManager)=0
 Override to uninitialize the view's window. This implementation can be empty.
virtual bool AssociateDocument (AxDocument *doc)
 Override to associate the document with the view. By default, calls SetDocument.
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 *WXUNUSED(newMenu))
 Override if something needs to be done before the menu context changes, e.g.
virtual bool ShowWindow (AxViewManager *viewManager)
 Shows the current window in the pager control.
wxWindow * GetWindow () const
 Get the associated window.
void SetWindow (wxWindow *window)
 Set the associated window.
AxDocumentGetDocument () const
 Get the associated document.
void SetDocument (AxDocument *doc)
 Set the associated document.
bool IsActive () const
 Returns true if active. An active view is one that is currently being shown.
void SetActive (bool active)
 Set active.
bool IsLive () const
 A live view is one that has one or more tasks associated with it and therefore remains alive in the background.
void SetLive (bool live)
AxViewManagerGetViewManager () const
 Gets the view manager pointer.
void SetViewManager (AxViewManager *manager)
 Sets the view manager pointer.
AxSpeechGetSpeech () const
 Gets the speech object.
virtual bool Say (const wxString &text, int flags=AxSpeechFlagsPurge, int verbosity=2)
 Say some text.
virtual bool Say (AxSpeechChannel channel, const wxString &text, int flags=AxSpeechFlagsPurge, int verbosity=2)
 Say some text.
virtual bool StopSpeech (AxSpeechChannel channel=AxSpeechDefaultChannel)
 Stop speaking.
virtual bool PauseOrResumeSpeech (AxSpeechChannel channel=AxSpeechDefaultChannel)
 Pause or resume speech.
virtual bool SkipForward (AxSpeechChannel channel=AxSpeechDefaultChannel)
 Skip forward.
virtual bool SkipBack (AxSpeechChannel channel=AxSpeechDefaultChannel)
 Skip back.
virtual bool IsSpeaking (AxSpeechChannel channel=AxSpeechDefaultChannel) const
 Are we speaking?
virtual bool CanStop (AxSpeechChannel channel=AxSpeechDefaultChannel) const
 Can we stop?
virtual bool CanPause (AxSpeechChannel channel=AxSpeechDefaultChannel) const
 Can we pause?
virtual bool CanResume (AxSpeechChannel channel=AxSpeechDefaultChannel) const
 Can we resume?
void SetChannel (int channel)
 Sets the speech channel to be used by this adapter.
AxSpeechChannel GetChannel (AxSpeechChannel channel=AxSpeechDefaultChannel) const
 Returns the speech channel to be used by this adapter.

Protected Attributes

bool m_active
 An active view is one that is currently being shown.
bool m_live
 A live view is one that has one or more tasks associated with it and therefore remains alive in the background.
wxWindow * m_window
AxDocumentm_document
AxViewManagerm_viewManager
AxSpeechChannel m_channel


Detailed Description

Handles UI for a family of documents, or for a particular data type.

Override Activate, Deactivate, Initialize, and Uninitialize in your derived class. In your Initialize function, create the window(s) and add to the view manager's pager control if necessary.


Constructor & Destructor Documentation

AxView::AxView (  )  [inline]

AxView::~AxView (  )  [inline]


Member Function Documentation

virtual bool AxView::Activate ( AxViewManager viewManager,
AxDocument doc 
) [pure virtual]

Override to activate the view for a particular document, and show the window.

Implemented in AxSummaryView, AxAudioView, and AxBookView.

bool AxView::AssociateDocument ( AxDocument doc  )  [virtual]

Override to associate the document with the view. By default, calls SetDocument.

bool AxView::CanPause ( AxSpeechChannel  channel = AxSpeechDefaultChannel  )  const [virtual]

Can we pause?

bool AxView::CanResume ( AxSpeechChannel  channel = AxSpeechDefaultChannel  )  const [virtual]

Can we resume?

bool AxView::CanStop ( AxSpeechChannel  channel = AxSpeechDefaultChannel  )  const [virtual]

Can we stop?

virtual bool AxView::Deactivate ( AxViewManager viewManager  )  [pure virtual]

Override to deactivate the view. This implementation can be empty.

Implemented in AxSummaryView, AxAudioView, and AxBookView.

AxSpeechChannel AxView::GetChannel ( AxSpeechChannel  channel = AxSpeechDefaultChannel  )  const

Returns the speech channel to be used by this adapter.

AxDocument* AxView::GetDocument (  )  const [inline]

Get the associated document.

AxSpeech * AxView::GetSpeech (  )  const

Gets the speech object.

AxViewManager* AxView::GetViewManager (  )  const [inline]

Gets the view manager pointer.

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

Get the associated window.

void AxView::Init (  ) 

Reimplemented in AxSummaryView, AxAudioView, and AxBookView.

virtual bool AxView::Initialize ( AxViewManager viewManager  )  [pure virtual]

Override to create the view's window if necessary.

Add the window to the view manager's pager control.

Implemented in AxSummaryView, AxAudioView, and AxBookView.

bool AxView::IsActive (  )  const [inline]

Returns true if active. An active view is one that is currently being shown.

bool AxView::IsLive (  )  const [inline]

A live view is one that has one or more tasks associated with it and therefore remains alive in the background.

Tasks are not currently implemented so this doesn't do anything yet.

bool AxView::IsSpeaking ( AxSpeechChannel  channel = AxSpeechDefaultChannel  )  const [virtual]

Are we speaking?

virtual bool AxView::OnChangeMenuPost ( AxMenu WXUNUSEDnewMenu  )  [inline, 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.

virtual bool AxView::OnChangeMenuPre ( AxMenu currentMenu,
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.

bool AxView::PauseOrResumeSpeech ( AxSpeechChannel  channel = AxSpeechDefaultChannel  )  [virtual]

Pause or resume speech.

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

Say some text.

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

Say some text.

void AxView::SetActive ( bool  active  )  [inline]

Set active.

void AxView::SetChannel ( int  channel  )  [inline]

Sets the speech channel to be used by this adapter.

void AxView::SetDocument ( AxDocument doc  )  [inline]

Set the associated document.

void AxView::SetLive ( bool  live  )  [inline]

void AxView::SetViewManager ( AxViewManager manager  )  [inline]

Sets the view manager pointer.

void AxView::SetWindow ( wxWindow *  window  )  [inline]

Set the associated window.

bool AxView::ShowWindow ( AxViewManager viewManager  )  [virtual]

Shows the current window in the pager control.

bool AxView::SkipBack ( AxSpeechChannel  channel = AxSpeechDefaultChannel  )  [virtual]

Skip back.

bool AxView::SkipForward ( AxSpeechChannel  channel = AxSpeechDefaultChannel  )  [virtual]

Skip forward.

bool AxView::StopSpeech ( AxSpeechChannel  channel = AxSpeechDefaultChannel  )  [virtual]

Stop speaking.

virtual bool AxView::Uninitialize ( AxViewManager viewManager  )  [pure virtual]

Override to uninitialize the view's window. This implementation can be empty.

Implemented in AxSummaryView, AxAudioView, and AxBookView.


Member Data Documentation

bool AxView::m_active [protected]

An active view is one that is currently being shown.

bool AxView::m_live [protected]

A live view is one that has one or more tasks associated with it and therefore remains alive in the background.

wxWindow* AxView::m_window [protected]


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

Generated on Wed May 6 19:22:08 2009 for AxTk by  doxygen 1.5.8