Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
TChangeStylesCommand
Inherited By:
TAddLanguageStyleCommand
Purpose:
TAddStylesCommand, derived from TChangeStylesCommand, is used to apply a set of styles to the currently selected text in the text representation. This command does not change the current selection.
Instantiation:
Allocate on the heap or the stack.
Deriving Classes:
This 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.
- TAddStylesCommand ()
- TAddStylesCommand (const TStyleSet & styles)
- TAddStylesCommand (const TAddStylesCommand & copy)
Interface Category:
API.
Purpose:
- Default constructor.
- Constructs a command that will apply the specified styles to the target selection.
- Copy constructor.
Calling Context:
- Called by the stream-in operators. Call this function directly.
- Call to construct this command with a particular style set. Called when creating the menus for the view. Call this function directly.
- Called to copy an object. Call this function directly.
Parameters:
- Takes no parameters.
- const TStyleSet & styles -The styles for this command to apply.
- const TAddStylesCommand & copy -The object to copy.
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.
virtual ~ TAddStylesCommand ()
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.
TAddStylesCommand & operator =(const TAddStylesCommand &)
Interface Category:
API.
Purpose:
Assignment operator.
Calling Context:
Typically not called directly by clients.
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: TAddStylesCommand::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 AddStyles function to apply the specified style set. Called by HandleDoBegin when the command to apply the styles is executed.
Calling Context:
Called by the Text Framework classes. Typically not called directly by clients.
Parameters:
- MTextRepresentation * textToChange -The text representation for the text to apply the style set to.
- const TStyleSet & styleToChange -The style set to apply.
- const TTextArea & whereToChange -The selection on which to apply the style set.
- const TStyleKind & kind =TCharacterStyleRuns :: GetStyleKind() -The category of styles to change (default: character).
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.