Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CP_StDialog Class Reference

A stack based class for display and handling of a dialog. More...

Inheritance diagram for CP_StDialog:

CP_SigSlot::CP_SlotObject List of all members.

Public Types

enum  { kCP_StDialog_DismissOK = 1, kCP_StDialog_DismissCancel = 2 }

Public Member Functions

void disconnect_all ()
void signal_connect (CP_Signal *inSender)
void signal_disconnect (CP_Signal *inSender)
Constructor / Destructor
 CP_StDialog (CP_XMLDocument &inXMLDoc, UInt32 inOKButtonID, UInt32 inCancelButtonID)
 Constructor.
 CP_StDialog (SInt16 inXMLResID, UInt32 inOKButtonID, UInt32 inCancelButtonID)
 CP_StDialog (const CP_String &inNibName, const CP_String &inWindowName, UInt32 inOKButtonID, UInt32 inCancelButtonID)
virtual ~CP_StDialog () throw ()
 Destructor.
Getters
CP_WindowGetDialogWindow ()
SInt16 GetDismissResult ()
Events
void Run ()
void Run (SInt32 inDuration)

Protected Member Functions

Initialization
virtual void CommonInit (UInt32 inOKButtonID, UInt32 inCancelButtonID)

Protected Attributes

CP_WindowfDialogWindow
CP_DialogModalityfDialogModality
SInt16 fDismissResult
CP_TimedTaskfDurationTimer
sender_set fSenders

Private Member Functions

Slots
void HandleDismiss (CPLAT::CP_DataValueHolder &inValue, CPLAT::OSStatus &inOutStatus)
void HandleCancel (CPLAT::CP_DataValueHolder &inValue, CPLAT::OSStatus &inOutStatus)
void HandleTimer (CPLAT::CP_DataValueHolder &inDataValue, CPLAT::OSStatus &inOSStatus)

Detailed Description

Note: CP_StDialogs are always stacked based, modal dialogs that run their own event loop until the user causes the dialog to go away. If you need a dialog that is modeless, then use the CP_Dialog class.


Member Enumeration Documentation

anonymous enum
 

Enumeration values:
kCP_StDialog_DismissOK  User dismissed dialog by clicking default button.
kCP_StDialog_DismissCancel  User dismissed dialog by clicking cancel button.


Constructor & Destructor Documentation

CP_StDialog::CP_StDialog CP_XMLDocument inXMLDoc,
UInt32  inOKButtonID,
UInt32  inCancelButtonID
 

CP_StDialog::CP_StDialog SInt16  inXMLResID,
UInt32  inOKButtonID,
UInt32  inCancelButtonID
 

Constructor.

Parameters:
inXMLResID Resource ID of the XML resource that contains the XML description of this dialogs window.
inOKButtonID Object ID of the OK or default button object in the dialogs window.
inCancelButtonID Object ID of the cancel button object in the dialogs window.
Exceptions:
none 

CP_StDialog::CP_StDialog const CP_String inNibName,
const CP_String inWindowName,
UInt32  inOKButtonID,
UInt32  inCancelButtonID
 

Constructor.

Parameters:
inNibName Name of the nib file that contains a MacOS Nib description of the dialog.
inWindowName Name of the window in the nib of this dialogs window.
inOKButtonID Object ID of the OK or default button object in the dialogs window.
inCancelButtonID Object ID of the cancel button object in the dialogs window.
Exceptions:
none 

CP_StDialog::~CP_StDialog  )  throw () [virtual]
 

Destructor.

Exceptions:
none 


Member Function Documentation

CP_Window* CP_StDialog::GetDialogWindow  ) 
 

Returns the window object used to display the dialog.

Exceptions:
none 
Returns:
CP_Window * Window displaying the dialog.

SInt16 CP_StDialog::GetDismissResult  ) 
 

Returns the result of the user dismissing the dialog.

Exceptions:
none 
Returns:
SInt16 Result of user dismissing dialog.

void CP_StDialog::Run  ) 
 

Runs the event loop for this dialog. This will cause the dialog to be displayed and continue to handle events for the dialog window, until the user dismisses the dialog.

Exceptions:
none 
Returns:
void

void CP_StDialog::Run SInt32  inDuration  ) 
 

Runs the event loop for this dialog. This will cause the dialog to be displayed and continue to handle events for the dialog window, until the user dismisses the dialog, or the time elapsed in the passed in inDuration field has expired.

Parameters:
inDuration Amount of time (in seconds) to display the dialog.
Exceptions:
none 
Returns:
void

void CP_StDialog::CommonInit UInt32  inOKButtonID,
UInt32  inCancelButtonID
[protected, virtual]
 

Common initialization routine used in the constructor to finish initializing the dialog.

Parameters:
inOKButtonID Object ID of the OK or default button object in the dialogs window.
inCancelButtonID Object ID of the cancel button object in the dialogs window.
Exceptions:
none 
Returns:
void

void CP_StDialog::HandleDismiss CPLAT::CP_DataValueHolder &  inValue,
CPLAT::OSStatus &  inOutStatus
[private]
 

Slot to handle the user clicking on the dismiss button of the dialog. This will set the result of the dialog to kCP_StDialog_DismissOK and get rid of the dialogs window.

Parameters:
inValue Not used.
inOutStatus Returns the result of this operation, default is to set the status to CP_noErr.
Exceptions:
none 
Returns:
void

void CP_StDialog::HandleCancel CPLAT::CP_DataValueHolder &  inValue,
CPLAT::OSStatus &  inOutStatus
[private]
 

Slot to handle the user clicking on the cancel button of the dialog. This will set the result of the dialog to kCP_StDialog_DismissCancel and get rid of the dialogs window.

Parameters:
inValue Not used.
inOutStatus Returns the result of this operation, default is to set the status to CP_noErr.
Exceptions:
none 
Returns:
void

void CP_StDialog::HandleTimer CPLAT::CP_DataValueHolder &  inDataValue,
CPLAT::OSStatus &  inOutStatus
[private]
 

Slot to handle the timer. This is used when the user has requested a dialog to be displayed for a fixed length of time.

Parameters:
inValue Not used.
inOutStatus Returns the result of this operation, default is to set the status to CP_noErr.
Exceptions:
none 
Returns:
void

void CP_SigSlot::CP_SlotObject::disconnect_all  )  [inherited]
 

void CP_SigSlot::CP_SlotObject::signal_connect CP_Signal inSender  )  [inherited]
 

void CP_SigSlot::CP_SlotObject::signal_disconnect CP_Signal inSender  )  [inherited]
 


Member Data Documentation

CP_Window* CP_StDialog::fDialogWindow [protected]
 

CP_DialogModality* CP_StDialog::fDialogModality [protected]
 

Dialog window.

SInt16 CP_StDialog::fDismissResult [protected]
 

Modality of dialog.

CP_TimedTask* CP_StDialog::fDurationTimer [protected]
 

Result of user dismissing dialog,

sender_set CP_SigSlot::CP_SlotObject::fSenders [protected, inherited]
 


The documentation for this class was generated from the following files:
Generated on Sat Sep 17 20:02:16 2005 for CPLAT by  doxygen 1.4.0