Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
TStyleKind
Inherited By:
None.
Purpose:
TParagraphStyleKind is a concrete class that is used to indicate the kind of styles that a TParagraphStyleRuns object can manage. This style kind refers to styles that can be applied to a paragraph of text, where a paragraph is a contiguous range of text terminated by a new paragraph character or the last character in the model.
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.
~ TParagraphStyleKind ()
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.
- TParagraphStyleKind ()
- TParagraphStyleKind (const TParagraphStyleKind &)
Interface Category:
API.
Purpose:
- Default constructor.
- Copy constructor.
Calling Context:
- Called to create a TParagraphStyleKind 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.
TParagraphStyleKind & operator =(const TParagraphStyleKind &)
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 TParagraphStyleRuns object.
Calling Context:
Called when a paragraph-based style is added to text that does not currently have paragraph-based styles. This member function creates and returns a TParagraphStyleRuns object that can manage paragraph-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 TParagraphStyleRuns 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 paragraph-based styles for the text when the text does not currently have any paragraph-based styles. For instance, when TStandardText::GetStyleBounds or StylesAt is called for paragraph-based styles before any paragraph-based styles have been applied to the text, the text has to be parsed in order to determine the paragraph boundaries.
Calling Context:
Called when information about paragraph-based styles has been requested before any paragraph-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 a newly created TParagraphStyleRuns 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.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.