![](../../Home/Icons/Home.gif)
![](../icons/UpCNM.gif)
![](../icons/CNMContext.gif)
![](../../Home/Icons/Search.gif)
Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
TText
Inherited By:
None.
Purpose:
TFilteredText is derived from TText. It provides a filtered, read-only view. It adds additional styles to those that are actually in the text. Style kinds that depend on the actual content of the text, such as paragraph styles, are not supported.
All reading calls delegate to the filtered TText, applying the filter to the result if necessary.
Any use of non-const TText functions causes an exception, since this class is only for reading. Some non-const functions (such as GetUniCharChunk) are used for both reading and writing. These are necessary because Text internally casts const TText to TText.
Instantiation:
Allocate on the heap or the stack.
Deriving Classes:
This class is designed to be used directly.
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
Other Considerations:
None.
- TFilteredText (const TText *)
- TFilteredText ()
- TFilteredText (const TFilteredText &)
Interface Category:
API.
Purpose:
- Constructs a TFilteredText on the specified TText.
- Default constructor.
- Copy constructor.
Calling Context:
- Called to construct a TFilteredText on the specified TText.
- Called by the stream-in operators.
- Called to copy an object.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual ~ TFilteredText ()
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: TFilteredText::operator=
- TFilteredText & operator =(const TFilteredText &)
- virtual TText & operator =(const TText &)
Interface Category:
API.
Purpose:
- Assignment operator.
- Assignment operator overriding inherited TText function.
Calling Context:
- Called when an object is assigned to another compatible object.
- Called when an object is assigned to another compatible object.
Parameters:
- const TFilteredText & -The source object for the assignment.
- const TText & -The source object for the assignment.
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:
None.
Member Function: TFilteredText::SetFilteredText
virtual void SetFilteredText (const TText *)
Interface Category:
API.
Purpose:
Sets the TText to be filtered.
Calling Context:
Called by clients that want to use the filter to superpose styles on the text, without the styles actually being in the text.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TFilteredText::AddFilterStyles
virtual void AddFilterStyles (const TStyleSet & stylesToAdd, const TTextRange & whereToAdd, const TStyleKind & kind =TCharacterStyleRuns :: GetStyleKind ())
Interface Category:
API.
Purpose:
Adds the specified styles for the specified range of text to the filter. Anyone making calls to read the text will see these styles as if they had been added to the actual text. In cases where the same style also appears in the filtered text, the style in the filter takes precedence.
Calling Context:
Called by TFilteredTextRepresentation objects and other clients that use filters to superpose styles on text.
Parameters:
- const TStyleSet & stylesToAdd -The styles to add.
- const TTextRange & whereToAdd -The range of text to which to add the styles.
- const TStyleKind & kind =TCharacterStyleRuns :: GetStyleKind () -The kind of style to add (default: character). Style kinds that depend on the actual text, such as paragraph styles, are not supported.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TFilteredText::RemoveFilterStyles
virtual void RemoveFilterStyles (const TStyleSet & stylesToRemove, const TTextRange & whereToRemove, const TStyleKind & kind =TCharacterStyleRuns :: GetStyleKind ())
Interface Category:
API.
Purpose:
Removes the specified styles from the specified range of text.
Calling Context:
Called by TFilteredTextRepresentation objects and other clients that use filters to superpose styles on text.
Parameters:
- const TStyleSet & stylesToRemove -The styles to remove.
- const TTextRange & whereToRemove -The range of text for which the styles are to be removed.
- const TStyleKind & kind =TCharacterStyleRuns :: GetStyleKind () -The kind of styles to remove (default: character).
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TFilteredText::ReplaceFilterStyles
virtual void ReplaceFilterStyles (const TStyleSet & incomingStyles, const TTextRange & whereToReplace, const TStyleKind & kind =TCharacterStyleRuns :: GetStyleKind ())
Interface Category:
API.
Purpose:
Replaces the current styles on the specified range of text with the specified styles.
Calling Context:
Called by TFilteredTextRepresentation objects and other clients that use filters to superpose styles on text.
Parameters:
- const TStyleSet & incomingStyles -The new styles to replace the current ones.
- const TTextRange & whereToReplace -The range of text where the new styles should replace the old.
- const TStyleKind & kind =TCharacterStyleRuns :: GetStyleKind () -The kind of styles to replace (default: character).
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TFilteredText::InsertFilterSpace
virtual void InsertFilterSpace (TTextOffset where, TTextCount howMuch)
Interface Category:
API.
Purpose:
Extends the filter range, in response to the insertion of the number of characters specified by howMuch, starting at the specified text offset.
Calling Context:
Called to keep the styles synchronized with the actual text. Called by TFilteredTextRepresentation objects and other clients that use filters to superpose styles on text.
Parameters:
- TTextOffset where -The location where characters have been inserted.
- TTextCount howMuch -The number of inserted characters.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TFilteredText::DeleteFilterSpace
virtual void DeleteFilterSpace (const TTextRange & where)
Interface Category:
API.
Purpose:
Reduces the filter range, in response to the deletion of characters in the specified range of text.
Calling Context:
Called to keep the styles synchronized with the actual text. Called by TFilteredTextRepresentation objects and other clients that use filters to superpose styles on text.
Parameters:
- const TTextRange & where -The range of deleted text.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TFilteredText::GetFilteredRange
virtual void GetFilteredRange (TTextRange &) const
Interface Category:
API.
Purpose:
Gets the currently filtered range.
Calling Context:
Called by TFilteredTextRepresentation objects and other clients that use filters to superpose styles on text.
Parameters:
- TTextRange & -Receives the currently filtered range.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TFilteredText::GetCharacterAt
virtual UniChar GetCharacterAt (TTextIndex index) const
Interface Category:
API.
Purpose:
Gets the character at the specified index.
Calling Context:
Called by TFilteredTextRepresentation objects and other clients that use filters to superpose styles on text.
Parameters:
- TTextIndex index -The index of the character to get.
Return Value:
The character at the specified index.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Overrides inherited TText function.
Member Function: TFilteredText::SetCharacterAt
virtual void SetCharacterAt (TTextIndex index, const UniChar thatChar)
Interface Category:
API.
Purpose:
Sets the character at a specified index.
Calling Context:
Called by TFilteredTextRepresentation objects and other clients that use filters to superpose styles on text.
Parameters:
- TTextIndex index -The index of the character to set.
- const UniChar thatChar -The new character value.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Overrides inherited TText function.
Member Function: TFilteredText::GetLength
virtual TTextCount GetLength () const
Interface Category:
API.
Purpose:
Gets the length of the text string encapsulated by this filtered text object.
Calling Context:
Called by TFilteredTextRepresentation objects and other clients that use filters to superpose styles on text.
Parameters:
Return Value:
The length of the text string encapsulated by this filtered text object.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Overrides inherited TText function.
Member Function: TFilteredText::GetUniCharChunk
virtual void GetUniCharChunk (TTextIndex indexOfInterest, UniChar * & chunkPtr, TTextIndex & chunkStart, TTextCount & chunkLength)
Interface Category:
API.
Purpose:
Gets a pointer to the contiguous block of text storage containing the character at the specified index, and determines the starting index and the length of the resulting storage. When the specified index is out of bounds, the resulting pointer will be NIL and the length will be 0.
Calling Context:
This function should only be used by character or text iterators.
Parameters:
- TTextIndex indexOfInterest -The index to get the contiguous block of text storage for.
- UniChar * & chunkPtr -The pointer to be set to point to the contiguous block of text storage.
- TTextIndex & chunkStart -The output index indicating where the resulting contiguous block of text storage begins.
- TTextCount & chunkLength -The output length of the resulting contiguous block of text storage.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Overrides inherited TText function.
Member Function: TFilteredText::GetConstUniCharChunk
virtual const UniChar * GetConstUniCharChunk (TTextIndex indexOfInterest, TTextIndex & chunkStart, TTextCount & chunkLength) const
Interface Category:
API.
Purpose:
Returns a const pointer to the contiguous block of text storage containing the character at the specified index, and determines the starting index and the length of the storage that is returned. When the specified index is out of bounds, the return value will be NIL and the length will be 0.
Calling Context:
This function should only be used by character or text iterators.
Parameters:
- TTextIndex indexOfInterest -The index to get the contiguous block of text storage for.
- TTextIndex & chunkStart -The output index indicating where the resulting contiguous block of text storage begins.
- TTextCount & chunkLength -The output length of the resulting contiguous block of text storage.
Return Value:
Returns a const pointer to the contiguous block of text storage containing the character at the specified index, and fills in the values representing the starting index and the length of the storage that is returned. When the specified index is out of bounds, the return value will be NIL and the length will be 0.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Overrides inherited TText function.
Member Function: TFilteredText::PartialCopy
virtual TText * PartialCopy (const TTextRange & range, TTextCount extraSpace =0, TMemoryHeap * whichHeap =NIL) const
Interface Category:
API.
Purpose:
Creates a copy of any part of any text object polymorphically. Use this member function when polymorphic extraction of a range of text is required. This is a copy function that passes ownership of new storage to the client instead of an extract function with a client-provided text object as an output parameter. Otherwise, it is not possible to extract a range of text polymorphically.
Calling Context:
Called by TFilteredTextRepresentation objects and other clients that use filters to superpose styles on text.
Parameters:
- const TTextRange & range -The text range in this text object to copy.
- TTextCount extraSpace =0 -Similar to constructors, the caller can request additional space be allocated with the newly constructed text object.
- TMemoryHeap * whichHeap =NIL -The heap to use for the copy.
Return Value:
A pointer to a newly created text object with a copy of the specified text range is returned. The caller gets ownership of the storage for this new object.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Overrides inherited TText function.
- virtual TTextCount Extract (const TTextRange & thisRange, TText & that) const
- virtual TTextCount Extract (const TTextRange & thisRange, TUnicodeArray & that) const
- virtual TTextCount Extract (const TTextRange & thisRange, UniChar that [], TTextCount thatMaxCount) const
- virtual TTextCount Extract (const TTextRange & thisRange, char that [], TTextCount thatMaxCount) const
Interface Category:
API.
Purpose:
- Copies text in the specified text range of this text object into the output text object. Also merges the filter styles into the output text object.
Use ExtractCharacters instead if you are only interested in the character information, but you want the copied characters in another text object.
- Copies text in the specified text range of this text object into the output character array. Also merges the filter styles into the output character array.
- Copies text in the specified text range of this text object into the output character array. Also merges the filter styles into the output character array.
- Copies text in the specified text range of this text object into the output character array. Also merges the filter styles into the output character array.
Calling Context:
- Called by TFilteredTextRepresentation objects and other clients that use filters to superpose styles on text.
- Called by TFilteredTextRepresentation objects and other clients that use filters to superpose styles on text.
- Called by TFilteredTextRepresentation objects and other clients that use filters to superpose styles on text.
- Called by TFilteredTextRepresentation objects and other clients that use filters to superpose styles on text.
Parameters:
- const TTextRange & thisRange -The text range in this text object to be copied to that text object.
- TText & that -The output text object.
- const TTextRange & thisRange -The text range in this text object to be copied to that character array.
- TUnicodeArray & that -The output TUnicodeArray.
- const TTextRange & thisRange -The text range in this text object to be copied to that character array.
- UniChar that [] -The output UniChar array.
- TTextCount thatMaxCount -The maximum number of characters to extract.
- const TTextRange & thisRange -The text range in this text object to be copied to that character array.
- char that [] -The output char array.
- TTextCount thatMaxCount -The maximum number of characters to extract.
Return Value:
The number of characters extracted; this can differ from the requested length.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Overrides inherited TText functions.
Member Function: TFilteredText::ExtractCharacters
virtual TTextCount ExtractCharacters (const TTextRange & thisRange, TText & that) const
Interface Category:
API.
Purpose:
Copies only the characters in the specified text range of this filtered text object into the output text object.
Use Extract instead If you are interested in both the character and style information.
Calling Context:
Called by TFilteredTextRepresentation objects and other clients that use filters to superpose styles on text.
Parameters:
- const TTextRange & thisRange -The text range for the characters in this filtered text object to be copied to that text object.
- TText & that -The output text object. The current contents of that are replaced by the characters copied from this filtered text object.
Return Value:
The number of characters extracted; this can differ from the requested length.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Overrides inherited TText function.
Member Function: TFilteredText::IsStyled
virtual bool IsStyled () const
Interface Category:
API.
Purpose:
Determines if this filtered text object has style information associated with it.
Calling Context:
Called by TFilteredTextRepresentation objects and other clients that use filters to superpose styles on text.
Parameters:
Return Value:
Returns true if there are any styles associated with this filtered text object.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Overrides inherited TText function.
Member Function: TFilteredText::CopyStyles
virtual void CopyStyles (const TText & that, const TTextRange & thatRange, TTextOffset thisOffset)
Interface Category:
API.
Purpose:
Causes an assertion failure, because write operations on TFilteredText objects are not supported.
Calling Context:
Should not be called.
Parameters:
- const TText & that -The TText object from which the styles are to be copied.
- const TTextRange & thatRange -The range of styles to be copied.
- TTextOffset thisOffset -The beginning offset where the styles are to be copied into.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Overrides inherited TText function.
Member Function: TFilteredText::GetStyleKinds
virtual void GetStyleKinds (TSetOf < TStyleKind > & returnSet) const
Interface Category:
API.
Purpose:
Generates the complete set of the kinds of styles that are being applied to the text. This member function is used to get all of the styles in a particular range, regardless of kind. For instance, to get all of the styles at a given index, use this member function to get all of the kinds of styles, then iterate through the resulting set calling StylesAt for each kind.
Calling Context:
Called by TFilteredTextRepresentation objects and other clients that use filters to superpose styles on text.
Parameters:
- TSetOf < TStyleKind > & returnSet -The output set to fill. Any objects in this set at the time of the call are removed before filling the set with the kinds of styles that are being applied to the text.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Overrides inherited TText function.
Member Function: TFilteredText::StylesAt
- virtual TTextIndex StylesAt (TTextIndex indexOfInterest, TStyleSet & returnSet, const TStyleKind & kind =TCharacterStyleRuns :: GetStyleKind ()) const
- virtual TTextIndex StylesAt (TTextIndex indexOfInterest, TStyleSet & returnSet, TTextRange & currentRunRange, const TStyleKind & kind =TCharacterStyleRuns :: GetStyleKind ()) const
Interface Category:
API.
Purpose:
- Fills in a given style set with the styles of the specified kind that are associated with the specified index.
- Fills in a given style set with the styles of the specified kind that are associated with the specified index. Also fills in the maximal contiguous text range with the same style information that contains the specified index.
Calling Context:
- Called by TFilteredTextRepresentation objects and other clients that use filters to superpose styles on text.
- Called by TFilteredTextRepresentation objects and other clients that use filters to superpose styles on text.
Parameters:
- TTextIndex indexOfInterest -The index to get styles for.
- TStyleSet & set -The output style set to copy the styles for the specified index into.
- const TStyleKind & kind =TCharacterStyleRuns :: GetStyleKind () -The kind of styles to include in the resulting set (default: character).
- TTextIndex indexOfInterest -The index to get styles for.
- TStyleSet & set -The output style set to copy the styles for the specified index into. The styles in the returned set are owned by the text. They are not to be deleted.
- TTextRange & currentRunRange -The maximal contiguous text range that contains the output styles and overlaps the index of interest too.
- const TStyleKind & kind =TCharacterStyleRuns :: GetStyleKind () -The kind of styles to include in the resulting set (default: character).
Return Value:
The starting index of the next style run. A style run is the term used to describe a maximal contiguous text range of text with the same style information.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Overrides inherited TText function.
Member Function: TFilteredText::CopyStylesAt
- virtual TStyleSet * CopyStylesAt (TTextIndex indexOfInterest, const TStyleKind & kind =TCharacterStyleRuns :: GetStyleKind (), TMemoryHeap * whichHeap =NIL) const
- virtual TStyleSet * CopyStylesAt (TTextIndex indexOfInterest, TTextRange & currentRunRange, const TStyleKind & kind =TCharacterStyleRuns :: GetStyleKind (), TMemoryHeap * whichHeap =NIL) const
Interface Category:
API.
Purpose:
- Creates a new style set on the heap with a copy of the styles of the specified kind that are associated with the specified index.
- Creates a new style set on the heap with a copy of the styles of the specified kind that are associated with the specified index. Also returns the maximal contiguous text range with the same style information that overlaps the specified index.
Calling Context:
- Called by TFilteredTextRepresentation objects and other clients that use filters to superpose styles on text.
- Called by TFilteredTextRepresentation objects and other clients that use filters to superpose styles on text.
Parameters:
- TTextIndex indexOfInterest -The index to copy styles from.
- const TStyleKind & kind =TCharacterStyleRuns :: GetStyleKind () -The kind of styles to copy (default: character).
- TMemoryHeap * whichHeap =NIL -The heap to allocate the new object in.
- TTextIndex indexOfInterest -The index to copy styles from.
- TTextRange & currentRunRange -The maximal contiguous text range that contains the returned styles and overlaps the index of interest too.
- const TStyleKind & kind =TCharacterStyleRuns :: GetStyleKind () -The kind of styles to copy.
- TMemoryHeap * whichHeap =NIL -The heap to allocate the new object in.
Return Value:
A copy of the styles of the specified kind at the specified index is returned. The caller gets ownership of the storage for this new object.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Overrides inherited TText function.
Member Function: TFilteredText::GetStyleBounds
virtual void GetStyleBounds (TTextIndex indexOfInterest, TTextRange & currentRunRange, const TStyleKind & kind =TCharacterStyleRuns :: GetStyleKind ()) const
Interface Category:
API.
Purpose:
For a specified style kind, this function determines the maximal contiguous text range with the same style information that contains the specified index.
Calling Context:
Called by TFilteredTextRepresentation objects and other clients that use filters to superpose styles on text.
Parameters:
- TTextIndex indexOfInterest -The index to get the style boundary information for.
- TTextRange & currentRunRange -The resulting range.
- const TStyleKind & kind =TCharacterStyleRuns :: GetStyleKind () -The kind of styles to look at (default: character).
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Overrides inherited TText function.
Member Function: TFilteredText::StylesExist
virtual bool StylesExist (const TStyleSet & set, const TTextRange & range, const TStyleKind & kind =TCharacterStyleRuns :: GetStyleKind ()) const
Interface Category:
API.
Purpose:
Determines if any of the characters within the specified text range are styled with all of the styles of the specified kind in the specified style set.
Calling Context:
Called by TFilteredTextRepresentation objects and other clients that use filters to superpose styles on text.
Parameters:
- const TStyleSet & set -The styles to look for.
- const TTextRange & range -The text range to look at.
- const TStyleKind & kind =TCharacterStyleRuns :: GetStyleKind () -The kind of styles to look for (default: character). Only styles of this kind will be checked.
Return Value:
Returns true if at least one character within the specified text range is styled with all the styles of the specified kind in the specified style set.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Overrides inherited TText function.
Member Function: TFilteredText::StylesContinuous
virtual bool StylesContinuous (const TStyleSet & set, const TTextRange & range) const
Interface Category:
API.
Purpose:
Determines if every character within the specified text range is styled with all the styles in the specified style set.
Calling Context:
Called by TFilteredTextRepresentation objects and other clients that use filters to superpose styles on text.
Parameters:
- const TStyleSet & set -The styles to look for.
- const TTextRange & range -The text range to look at.
Return Value:
Returns true if every character within the specified text range is styled with all the styles in the specified style set.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Overrides inherited TText function.
Member Function: TFilteredText::AllStyles
virtual void AllStyles (TSetOf < TStyle > & returnSet, const TTextRange & range, const TStyleKind & kind =TCharacterStyleRuns :: GetStyleKind ()) const
Interface Category:
API.
Purpose:
Gets the maximal set of styles of the specified kind for the specified text range. It is not required that styles in the returned set be continuous throughout the entire text range. It only matters that a style exist on at least one character in the text range for it to be included in this maximal set of styles.
Calling Context:
Called by TFilteredTextRepresentation objects and other clients that use filters to superpose styles on text.
Parameters:
- TSetOf < TStyle > & set -The output set to fill. Any objects in this set at the time of the call are removed before filling the set with the styles found.
- const TTextRange & range -The text range to look at.
- const TStyleKind & kind =TCharacterStyleRuns :: GetStyleKind () -The kind of styles to include in the resulting set (default: character).
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Overrides inherited TText function.
Member Function: TFilteredText::AllContinuousStyles
virtual void AllContinuousStyles (TStyleSet & returnSet, const TTextRange & range, const TStyleKind & kind =TCharacterStyleRuns :: GetStyleKind ()) const
Interface Category:
API.
Purpose:
Gets the maximal set of continuous styles of the specified kind for the specified text range. It is required that styles in the returned set be continuous throughout the entire text range.
Calling Context:
Called by TFilteredTextRepresentation objects and other clients that use filters to superpose styles on text.
Parameters:
- TStyleSet & set -The output set to fill. Any objects in this set at the time of the call are removed before filling the set with the styles found.
- const TTextRange & range -The text range to look at.
- const TStyleKind & kind =TCharacterStyleRuns :: GetStyleKind () -The kind of styles to include in the resulting set (default: character).
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Overrides inherited TText function.
Member Function: TFilteredText::AddStyles
- virtual void AddStyles (const TStyle & style, const TTextRange & range =TTextRange :: GetMaximumRange ())
- virtual void AddStyles (const TStyleSet & set, const TTextRange & range =TTextRange :: GetMaximumRange (), const TStyleKind & kind =TCharacterStyleRuns :: GetStyleKind ())
Interface Category:
API.
Purpose:
Always causes an assertion failure, because write operations on TFilteredText objects are not supported.
Calling Context:
Should not be called.
Parameters:
- const TStyle & style -The style to add.
- const TTextRange & range =TTextRange :: GetMaximumRange () -The text range to add a single style to.
- const TStyleSet & set -The set of styles to add.
- const TTextRange & range =TTextRange :: GetMaximumRange () -The text range to add a set of styles to.
- const TStyleKind & kind =TCharacterStyleRuns :: GetStyleKind () -The kind of styles to add. The styles that are not of this kind are ignored.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Overrides inherited TText function.
Member Function: TFilteredText::RemoveStyles
- virtual void RemoveStyles (const TStyle & style, const TTextRange & range =TTextRange :: GetMaximumRange ())
- virtual void RemoveStyles (const TStyleSet & set, const TTextRange & range =TTextRange :: GetMaximumRange (), const TStyleKind & kind =TCharacterStyleRuns :: GetStyleKind ())
- virtual void RemoveStyles (const TStyleKind & kind, const TTextRange & range =TTextRange :: GetMaximumRange ())
- virtual void RemoveStyles (const TStyleCategory & category, const TStyleName & name, const TTextRange & range =TTextRange :: GetMaximumRange (), const TStyleKind & styleKind =TCharacterStyleRuns :: GetStyleKind ())
- virtual void RemoveStyles ()
Interface Category:
API.
Purpose:
Always causes an assertion failure, because write operations on TFilteredText objects are not supported.
Calling Context:
Should not be called.
Parameters:
- const TStyle & style -The style to look for.
- const TTextRange & range =TTextRange :: GetMaximumRange () -The text range to look at (default: all the text).
- const TStyleSet & set -The set of styles to look for.
- const TTextRange & range =TTextRange :: GetMaximumRange () -The text range to look at (default: all the text).
- const TStyleKind & kind =TCharacterStyleRuns :: GetStyleKind () -The kind of styles to look for (default: character). Only styles of this kind are removed.
- const TStyleKind & kind -The kind of styles to look for. Only styles of this kind are removed.
- const TTextRange & range =TTextRange :: GetMaximumRange () -The text range to look at (default: all the text).
- const TStyleCategory & category -The category to look for.
- const TStyleName & name -The name to look for.
- const TTextRange & range =TTextRange :: GetMaximumRange () -The text range to look at (default: all the text).
- const TStyleKind & styleKind =TCharacterStyleRuns :: GetStyleKind () -The kind of styles to look for (default: character). Only styles of this kind are removed.
- Takes no parameters.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Overrides inherited TText function.
Member Function: TFilteredText::ReplaceStyles
- virtual void ReplaceStyles (const TStyle & replacementStyle, const TTextRange & range =TTextRange :: GetMaximumRange ())
- virtual void ReplaceStyles (const TStyleSet & replacementSet, const TTextRange & range =TTextRange :: GetMaximumRange (), const TStyleKind & kind =TCharacterStyleRuns :: GetStyleKind ())
Interface Category:
API.
Purpose:
Always causes an assertion failure, because write operations on TFilteredText objects are not supported.
Calling Context:
Should not be called.
Parameters:
- const TStyle & replacementStyle -The style to add after removing the existing styles.
- const TTextRange & range =TTextRange :: GetMaximumRange () -The text range to replace styles in.
- const TStyleSet & replacementSet -The set of styles to add after removing the existing styles.
- const TTextRange & range =TTextRange :: GetMaximumRange () -The text range to replace styles in.
- const TStyleKind & kind =TCharacterStyleRuns :: GetStyleKind () -The kind of styles to be replaced (default: character). Only styles of this kind are removed and added.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Overrides inherited TText function.
Member Function: TFilteredText::IsEqualStyles
virtual bool IsEqualStyles (const TText & that, const TTextRange & thatRange, const TTextRange & thisRange =TTextRange :: GetMaximumRange (), const TStyleKind & kind =TCharacterStyleRuns :: GetStyleKind ()) const
Interface Category:
API.
Purpose:
Compares the style information of this text object with the input text object.
Calling Context:
Called by TFilteredTextRepresentation objects and other clients that use filters to superpose styles on text.
Parameters:
- const TText & that -The text object to compare against this text object.
- const TTextRange & thatRange -The text range in that text object to be compared against text from this text object.
- const TTextRange & thisRange =TTextRange :: GetMaximumRange () -The text range in this text object to be compared against the text from that text object.
- const TStyleKind & kind =TCharacterStyleRuns :: GetStyleKind () -The kind of styles to compare (default: character). Only compares styles of this kind.
Return Value:
Returns true if the compared styles are equal.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Overrides inherited TText function.
Member Function: TFilteredText::operator>>=
virtual TStream & operator >>=(TStream & toStream) const
Interface Category:
API.
Purpose:
Stream-out operator.
Calling Context:
Called to stream out data.
Parameters:
- TStream & toStream -The stream the object streams itself out to.
Return Value:
Returns a reference to the stream the object streams itself out to.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TFilteredText::operator<<=
virtual TStream & operator <<= (TStream & fromStream)
Interface Category:
API.
Purpose:
Stream-in operator.
Calling Context:
Called to stream in data.
Parameters:
- TStream & fromStream -The stream the object streams itself in from.
Return Value:
Returns a reference to the stream the object streams itself in from.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TFilteredText::PartialStreamOut
virtual void PartialStreamOut (TStream & toStream, const TTextRange & range) const
Interface Category:
API.
Purpose:
Streams out a complete text object for the text contained within the specified text range.
Calling Context:
Called when you want to stream out only part of an existing text object. The standard streaming operators only work on the entire text object.
Parameters:
- TStream & toStream -The stream to write data out to.
- const TTextRange & range -The text range to be streamed out.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual long Hash () const
Interface Category:
API.
Purpose:
Delegates to the Hash function of the text being filtered.
Calling Context:
Same as for base class.
Parameters:
Return Value:
The numeric value of the hash.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Overrides inherited TText function.
Member Function: TFilteredText::HandleDeleteCharacters
virtual void HandleDeleteCharacters (TTextOffset beginOffset, TTextCount length)
Interface Category:
API.
Purpose:
Causes an assertion failure, because write operations on TFilteredText objects are not supported.
Calling Context:
Should not be called.
Parameters:
- TTextOffset beginOffset -The offset at the beginning of the range of characters to delete.
- TTextCount length -The length of the range of characters to delete.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
This protected function overrides the inherited TText function.
Member Function: TFilteredText::HandleInsertCharacterGap
virtual void HandleInsertCharacterGap (TTextOffset beginOffset, TTextCount length)
Interface Category:
API.
Purpose:
Causes an assertion failure, because write operations on TFilteredText objects are not supported.
Calling Context:
Should not be called.
Parameters:
- TTextOffset beginOffset -The offset at the beginning of the range where the gap is to be created.
- TTextCount length -The length of the gap to create.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
This protected function overrides the inherited TText function.
Member Function: TFilteredText::HandleCopyCharacters
- virtual void HandleCopyCharacters (const TText & that, TTextOffset thatOffset, TTextCount thatLength, TTextOffset thisOffset)
- virtual void HandleCopyCharacters (const UniChar that [], TTextCount thatLength, TTextOffset thisOffset)
Interface Category:
API.
Purpose:
Always causes an assertion failure, because write operations on TFilteredText objects are not supported.
Calling Context:
Should not be called.
Parameters:
- const TText & that -The TText object to copy the characters from.
- TTextOffset thatOffset -The offset at the beginning of the range of characters to be copied.
- TTextCount thatLength -The length of the range of characters to be copied.
- TTextOffset thisOffset -The beginning offset where the characters are to be copied into.
- const UniChar that [] -The array of characters to copy.
- TTextCount thatLength -The length of the array of characters.
- TTextOffset thisOffset -The beginning offset where the characters are to be copied into.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
This protected function overrides the inherited TText function.
Member Function: TFilteredText::HandleDeleteStyles
virtual void HandleDeleteStyles (TTextOffset beginOffset, TTextCount length)
Interface Category:
API.
Purpose:
Causes an assertion failure, because write operations on TFilteredText objects are not supported.
Calling Context:
Should not be called.
Parameters:
- TTextOffset beginOffset -The offset at the beginning of the range of characters that are going to be removed.
- TTextCount length -The length of the range of characters that are going to be removed.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
This protected function overrides the inherited TText function.
Member Function: TFilteredText::HandleInsertStylesGap
virtual void HandleInsertStylesGap (TTextOffset beginOffset, TTextCount length)
Interface Category:
API.
Purpose:
Causes an assertion failure, because write operations on TFilteredText objects are not supported.
Calling Context:
Should not be called.
Parameters:
- TTextOffset beginOffset -The offset at the beginning of the range of newly inserted characters.
- TTextCount length -The length of the range of newly inserted characters.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
This protected function overrides the inherited TText function.
Member Function: TFilteredText::HandleCopyStyles
virtual void HandleCopyStyles (const TText & that, TTextOffset thatOffset, TTextCount thatLength, TTextOffset thisOffset)
Interface Category:
API.
Purpose:
Causes an assertion failure, because write operations on TFilteredText objects are not supported.
Calling Context:
Should not be called.
Parameters:
- const TText & that -The TText object from which the styles are to be copied.
- TTextOffset thatOffset -The offset at the beginning of the range of styles to be copied.
- TTextCount thatLength -The length of the range of styles to be copied.
- TTextOffset thisOffset -The beginning offset where the styles are to be copied into.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
This protected function overrides the inherited TText function.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.