Class: TParagraphStyleKind

Declaration: StyleKind.h

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.

Member Function: TParagraphStyleKind::~TParagraphStyleKind

~ 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.

Member Function: TParagraphStyleKind::TParagraphStyleKind

  1. TParagraphStyleKind ()
  2. TParagraphStyleKind (const TParagraphStyleKind &)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Copy constructor.

Calling Context:

  1. Called to create a TParagraphStyleKind 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: TParagraphStyleKind::operator=

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.

Member Function: TParagraphStyleKind::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: TParagraphStyleKind::CreateStyleRuns

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:

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.

Member Function: TParagraphStyleKind::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 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:

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.