Class: TAddLanguageStyleCommand

Declaration: TextCommandsCore.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TAddStylesCommand

Inherited By:

None.

Purpose:

TAddLanguageStyleCommand, derived from the class TAddStylesCommand, is used to apply a language style to a selection of text, along with a typing configuration to be used for text input within that range. 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: TAddLanguageStyleCommand::TAddLanguageStyleCommand

  1. TAddLanguageStyleCommand (TStyleSet & styles, const TTypingConfigurationHandle & config)
  2. TAddLanguageStyleCommand (const TAddLanguageStyleCommand & copy)
  3. TAddLanguageStyleCommand ()

Interface Category:

API.

Purpose:

  1. Constructs a command that applies the specified language style and sets the system typing configuration to the specified value.
  2. Copy constructor.
  3. Default constructor. This constructor is protected, and should not be called.

Calling Context:

  1. Call to construct this command. Call this function directly.
  2. Called to copy an object. Call this function directly.
  3. Only for internal use by Resurrect. Developers should treat as protected.

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: TAddLanguageStyleCommand::~TAddLanguageStyleCommand

virtual ~ TAddLanguageStyleCommand ()

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: TAddLanguageStyleCommand::SetTypingConfiguration

virtual void SetTypingConfiguration (const TTypingConfigurationHandle & config)

Interface Category:

API.

Purpose:

Specifies the typing configuration to set as the current one when applying this language style. Call to set up this command so it can associate the correct typing configuration with the specified natural language style.

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:

None.

Member Function: TAddLanguageStyleCommand::GetTypingConfiguration

virtual void GetTypingConfiguration (TTypingConfigurationHandle & config) const

Interface Category:

API.

Purpose:

Gets the typing configuration this command will activate when applying the specified language style. Call to get the typing configuration associated with this command.

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:

None.

Member Function: TAddLanguageStyleCommand::operator>>=

virtual TStream & operator >>=(TStream & output) 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:

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

Other Considerations:

None.

Member Function: TAddLanguageStyleCommand::operator<<=

virtual TStream & operator <<= (TStream & input)

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:

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

Other Considerations:

None.

Member Function: TAddLanguageStyleCommand::operator=

TAddLanguageStyleCommand & operator =(const TAddLanguageStyleCommand &)

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: TAddLanguageStyleCommand::HandleDoBegin

virtual void HandleDoBegin (MTextSelection &)

Interface Category:

API.

Purpose:

Executes the command. Stores the current typing configuration as the undo information, then sets the typing configuration and calls the parent class' overridden member function to apply the style.

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 TCommandOn function.

Member Function: TAddLanguageStyleCommand::HandleUndo

virtual void HandleUndo (MTextSelection &)

Interface Category:

API.

Purpose:

Undoes the command by resetting the typing configuration to its original value and then calling the inherited HandleUndo member function to undo the style change.

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 TCommandOn function.

Member Function: TAddLanguageStyleCommand::HandleRedo

virtual void HandleRedo (MTextSelection &)

Interface Category:

API.

Purpose:

Redoes the command by setting the typing configuration and then calling the inherited HandleRedo member function to reapply the style.

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 TCommandOn function.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.