Class: TCharacterStyleKind

Declaration: StyleKind.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TStyleKind

Inherited By:

None.

Purpose:

TCharacterStyleKind is a concrete class that is used to indicate the kind of styles that a TCharacterStyleRuns object can manage. This style kind refers to styles that can be applied to a range of characters or a substring of text.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

New style kind classes should be derived directly from TStyleKind.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Other Considerations:

None.

Member Function: TCharacterStyleKind::~TCharacterStyleKind

~ TCharacterStyleKind ()

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: TCharacterStyleKind::TCharacterStyleKind

  1. TCharacterStyleKind ()
  2. TCharacterStyleKind (const TCharacterStyleKind &)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Copy constructor.

Calling Context:

  1. Called to create a TCharacterStyleKind object.
  2. Called to copy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

Because the only data member of classes that are derived from TStyleKind is a const static TToken, the copy constructor and the default constructor are identical.

Member Function: TCharacterStyleKind::operator=

TCharacterStyleKind & operator =(const TCharacterStyleKind &)

Interface Category:

API.

Purpose:

Assignment operator.

Calling Context:

Called when an object is assigned to another compatible object.

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:

Because the only data member of classes that are derived from TStyleKind is a const static TToken, assignment of one kind to another does not do anything.

Member Function: TCharacterStyleKind::GetName

virtual const TToken & GetName () const

Interface Category:

API.

Purpose:

Returns the name of the style kind.

Calling Context:

Called to get the name of the style kind.

Parameters:

Return Value:

Returns a const TToken reference representing the name of the style kind. The returned TToken is a const static member of the class, so it does not go out of scope.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TCharacterStyleKind::CreateStyleRuns

virtual TStyleRuns * CreateStyleRuns (const TText & theText, const TAllocationHeap & whichHeap) const

Interface Category:

API.

Purpose:

Creates and returns a TCharacterStyleRuns object.

Calling Context:

Called when a character-based style is added to text that does not currently have character-based styles. This member function creates and returns a TCharacterStyleRuns object that can manage character-based styles.

Parameters:

Return Value:

Returns a pointer to a newly created TCharacterStyleRuns object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

The caller of this member function is responsible for the storage of the returned object.

Member Function: TCharacterStyleKind::GetDefaultStyleInfo

virtual TStyleRuns * GetDefaultStyleInfo (TTextIndex indexOfInterest, TStyleSet & returnSet, TTextRange & returnRange, TTextIndex & returnNextIndex, const TText & theText, const TAllocationHeap & whichHeap) const

Interface Category:

API.

Purpose:

Provides information about character-based styles for the text when the text does not currently have any character-based styles. For instance, when TStandardText::GetStyleBounds or StylesAt is called for character-based styles before any have been applied to the text, the resulting range is simply the range of the entire text, and the resulting style set is empty.

Calling Context:

Called when information about character-based styles has been requested before any character-based styles have been applied to the text.

Parameters:

Return Value:

Returns NIL, because no new object is created.

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.