wxTst::ModalDialogTimer Class Reference

When fired, the modal dialog interactor (if existing) is executed first, before the modal dialog is ended with the given return code. More...

#include <ModalDialogTimer.h>

Inheritance diagram for wxTst::ModalDialogTimer:

Inheritance graph
[legend]
Collaboration diagram for wxTst::ModalDialogTimer:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 ModalDialogTimer (int retCode)
 Constructor.
virtual void Notify ()
 Called when the time out actually expires.
virtual void SetModalDialog (wxDialog *dialog)
 Set modal dialog to interact with.
virtual void SetModalDialogInteractor (ModalDialogInteractionInterface *interactor)
 Set modal dialog interactor -- will be called/executed before dismissing/closing the modal dialog.
virtual bool Start (int milliseconds=-1, bool oneShot=true)
 Overridden to disallow repeated firing - only oneShot is allowed.
virtual ~ModalDialogTimer ()
 Destructor.

Protected Member Functions

virtual void EndDialog ()
 Helper method required due to protected access to corresponding dialog method in wxWidgets 2.8; plus avoid duplication.


Detailed Description

When fired, the modal dialog interactor (if existing) is executed first, before the modal dialog is ended with the given return code.

Definition at line 31 of file ModalDialogTimer.h.


Constructor & Destructor Documentation

wxTst::ModalDialogTimer::ModalDialogTimer ( int  retCode  ) 

Constructor.

Parameters:
retCode return code to use for ending the modal dialog

Definition at line 26 of file ModalDialogTimer.cpp.

wxTst::ModalDialogTimer::~ModalDialogTimer (  )  [virtual]

Destructor.

Deletes the modal dialog interactor if available.

Definition at line 33 of file ModalDialogTimer.cpp.


Member Function Documentation

void wxTst::ModalDialogTimer::EndDialog (  )  [protected, virtual]

Helper method required due to protected access to corresponding dialog method in wxWidgets 2.8; plus avoid duplication.

Definition at line 100 of file ModalDialogTimer.cpp.

Referenced by Notify().

void wxTst::ModalDialogTimer::Notify (  )  [virtual]

Called when the time out actually expires.

Definition at line 64 of file ModalDialogTimer.cpp.

References EndDialog(), and wxTst::ModalDialogInteractionInterface::Execute().

void wxTst::ModalDialogTimer::SetModalDialog ( wxDialog *  dialog  )  [virtual]

Set modal dialog to interact with.

Parameters:
dialog modal dialog to interact with

Definition at line 42 of file ModalDialogTimer.cpp.

void wxTst::ModalDialogTimer::SetModalDialogInteractor ( ModalDialogInteractionInterface interactor  )  [virtual]

Set modal dialog interactor -- will be called/executed before dismissing/closing the modal dialog.

Note that the interactor will be destroyed in the d'tor.

Parameters:
interactor actual code to carry out before dismissing the modal dialog

Definition at line 48 of file ModalDialogTimer.cpp.

bool wxTst::ModalDialogTimer::Start ( int  milliseconds = -1,
bool  oneShot = true 
) [virtual]

Overridden to disallow repeated firing - only oneShot is allowed.

Parameters:
milliseconds timer timeout period
oneShot must be left unset, or set to true, otherwise an exception is thrown

Definition at line 54 of file ModalDialogTimer.cpp.


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

wxWidgets Logo Get wxGuiTesting at SourceForge.net. Fast, secure and Free Open Source software downloads
Generated on Tue Mar 17 17:29:30 2009 for wxGuiTesting by doxygen 1.5.5