Class: TRemoveStylesCommand

Declaration: TextCommandsCore.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TChangeStylesCommand

Inherited By:

None.

Purpose:

TRemoveStylesCommand, derived from TChangeStylesCommand, is used to remove a set of styles from the currently selected text. This command does not change the current selection.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

The class is designed to be used directly.

Concurrency:

This command's functions assume that any required locks have already been acquired by the client.

Resource Use:

No special requirements.

Other Considerations:

None.

Member Function: TRemoveStylesCommand::TRemoveStylesCommand

  1. TRemoveStylesCommand ()
  2. TRemoveStylesCommand (const TStyleSet & stylesToChange)
  3. TRemoveStylesCommand (const TRemoveStylesCommand &)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Constructs a command that will remove the specified set of styles from the target selection.
  3. Copy constructor.

Calling Context:

  1. Called by the stream-in operators. Call this function directly.
  2. Call to construct a command that will remove particular styles. Called when creating the menus for the view. Call this function directly.
  3. Called to copy an object. Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

This command's functions assume that any required locks have already been acquired by the client.

Other Considerations:

None.

Member Function: TRemoveStylesCommand::~TRemoveStylesCommand

virtual ~ TRemoveStylesCommand ()

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:

This command's functions assume that any required locks have already been acquired by the client.

Other Considerations:

None.

Member Function: TRemoveStylesCommand::operator=

TRemoveStylesCommand & operator =(const TRemoveStylesCommand &)

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:

This command's functions assume that any required locks have already been acquired by the client.

Other Considerations:

None.

Member Function: TRemoveStylesCommand::HandleChangeStyles

virtual void HandleChangeStyles (MTextRepresentation * textToChange, const TStyleSet & styleToChange, const TTextArea & whereToChange, const TStyleKind & kind =TCharacterStyleRuns :: GetStyleKind ())

Interface Category:

API.

Purpose:

Calls the text representation's RemoveStyles function to remove the specified styles from the selected text in the representation. Called by HandleDoBegin when the command to remove the styles is executed.

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:

This command's functions assume that any required locks have already been acquired by the client.

Other Considerations:

This protected function overrides the inherited TChangeStylesCommand function.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.