Class: TDocumentTypingCommand

Declaration: DocumentTextCommands.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TTypingCommand

Inherited By:

None.

Purpose:

TDocumentTypingCommand is a derived class of TTypingCommand that handles embedded components.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

This class is designed to be used directly.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Other Considerations:

None.

Member Function: TDocumentTypingCommand::TDocumentTypingCommand

  1. TDocumentTypingCommand ()
  2. TDocumentTypingCommand (const TDocumentTypingCommand &)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Copy constructor.

Calling Context:

  1. Called by the stream-in operators. Call this function directly.
  2. Called to copy an object. Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TDocumentTypingCommand::~TDocumentTypingCommand

virtual ~ TDocumentTypingCommand ()

Interface Category:

API.

Purpose:

Destructor.

Calling Context:

Typically not called directly by clients.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TDocumentTypingCommand::operator>>=

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

Interface Category:

API.

Purpose:

Stream-out operator.

Calling Context:

Call this function directly.

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: TDocumentTypingCommand::operator<<=

virtual TStream & operator <<= (TStream &)

Interface Category:

API.

Purpose:

Stream-in operator.

Calling Context:

Call this function directly.

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.

Member Function: TDocumentTypingCommand::operator=

TDocumentTypingCommand & operator =(const TDocumentTypingCommand &)

Interface Category:

API.

Purpose:

Assignment operator.

Calling Context:

Call this function directly.

Parameters:

Return Value:

A non-const reference to the left-hand side object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TDocumentTypingCommand::EditRepresentation

virtual void EditRepresentation (MTextRepresentation & representation, MTextSelection & selection, const TText & textToInsert, const TTextRange & rangeToRemove)

Interface Category:

API.

Purpose:

Saves embedded components in the rangeToRemove for possible future undo. Then calls the TTypingCommand EditRepresentation function which this function overrides. That modifies the text representation by deleting the specified rangeToRemove., and inserting the specified textToInsert. Then it sets the selection to an insertion offset at the end of the inserted text.

Calling Context:

Called by the Text Framework classes. Typically not called directly by clients.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TDocumentTypingCommand::HandleUndo

virtual void HandleUndo (MTextSelection &)

Interface Category:

API.

Purpose:

Calls the inherited TTypingCommand HandleUndo to undo this command by replacing the new text that had been inserted by this command with the text that was originally selected in the representation (if there was an original selection), and by restoring any characters that had been deleted. Then undoes the components that were saved by EditRepresentation.

Calling Context:

Called by the Text Framework classes. Typically not called directly by clients.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TDocumentTypingCommand::HandleRedo

virtual void HandleRedo (MTextSelection &)

Interface Category:

API.

Purpose:

Examine the affected selection for embedded components and capture information needed to properly perform Undo. Then, call inherited TTypingCommand method.

Calling Context:

Called by the Text Framework classes. Typically not called directly by clients.

Parameters:

Return Value:

None.

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.