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.
~ 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.
- TCharacterStyleKind ()
- TCharacterStyleKind (const TCharacterStyleKind &)
Interface Category:
API.
Purpose:
- Default constructor.
- Copy constructor.
Calling Context:
- Called to create a TCharacterStyleKind object.
- 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.
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.
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.
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:
- const TText & theText -The text that the styles are to be applied to.
- const TAllocationHeap & whichHeap -The heap in which the new object is to be allocated.
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.
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:
- TTextIndex indexOfInterest -The index for which the information is requested.
- TStyleSet & returnSet -The set to be filled in with the styles at the given index.
- TTextRange & returnRange -The range over which the returnSet applies.
- TTextIndex & returnNextIndex -The index at the beginning of the next style set.
- const TText & theText -The text that the styles are applied to.
- const TAllocationHeap & whichHeap -The heap in which the new object is to be allocated.
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.