Class: TDialogState

Declaration: DialogSupport.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

MCollectible

Inherited By:

TAcceptRejectCancelDialogState

Purpose:

TDialogState is the standard content state for dialog windows. TDialogState provides support for the handling of standard dialog key events, including Tab, Return, and Escape. TDialogState also provides for handling of the default, accept and cancel buttons and for the handling of buttons that dismiss the dialog. TDialogState defines a number of constants and utility functions that are useful for the construction of dialog windows.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

Derive classes from TDialogState to implement custom dialog behavior. By default, Accept and Cancel will do nothing. When you want to handle some things upon Accept or Cancel button being pressed, you need to derive from this class and override the member functions Accept and Cancel. For example, you may create a new dialog each time when user asks for one. Then, the memory space will keep being taken up by all these new dialogs created. You may want to delete a dialog and free its memory space when a user click Accept or Cancel button. Therefore, a user can derive from this class and override the Accept or Cancel to delete a particular dialog, and free up some space.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Other Considerations:

None.

Member Function: TDialogState::Accept

virtual void Accept ()

Interface Category:

API.

Purpose:

Accepts the dialog's offer. The default implementation does nothing.

Calling Context:

Called when the user selects accept on the control associated with this state. Called from TDialogView::HandleViewAction.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

Deriving classes should provide an implementation for this member function.

Member Function: TDialogState::Cancel

virtual void Cancel ()

Interface Category:

API.

Purpose:

Cancels the dialog. The default implementation does nothing.

Calling Context:

Called when the user selects cancel on the control associated with this state. Called from TDialogView::HandleViewAction.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

Deriving classes should provide an implementation for this member function.

Member Function: TDialogState::TDialogState

  1. TDialogState ()
  2. TDialogState (const TDialogState & source)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Copy constructor.

Calling Context:

  1. Called to create a TDialogState suitable for streaming into.
  2. Called to copy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TDialogState::~TDialogState

virtual ~ TDialogState ()

Interface Category:

API.

Purpose:

Destructor.

Calling Context:

Called to destroy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TDialogState::operator>>=

TStream & operator >>=(TStream & destination) const

Interface Category:

API.

Purpose:

Stream-out operator.

Calling Context:

Called to stream out data.

Parameters:

Return Value:

Returns a reference to the stream the object streams itself out to.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TDialogState::operator<<=

TStream & operator <<= (TStream & source)

Interface Category:

API.

Purpose:

Stream-in operator.

Calling Context:

Called to stream in data.

Parameters:

Return Value:

Returns a reference to the stream the object streams itself in from.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.