ITextStyleSet
- A class representing a collection of text styles.
It can contain any number of styles, including zero, but only one of each particular class.
Do not derive your own classes from this class.
ITextStyleSet - Member Functions and Data by Group
Constructors & Destructor
Use these methods to create and delete style sets.
- ~ITextStyleSet
- Destructor.
public:
~ITextStyleSet()
- Use this method to delete a style set.
- Supported Platforms
| Windows |
OS/2 |
AIX |
| Yes |
Yes |
Yes |
- ITextStyleSet
- Use this method to create a new style set.
Overload 1
- Constructor.
public:
ITextStyleSet(const ITextStyle& style)
- This method constructs a style set containing just the given style.
- style
- The style to add to the newly created style set.
- Supported Platforms
| Windows |
OS/2 |
AIX |
| Yes |
Yes |
Yes |
Overload 2
- Empty constructor.
public:
ITextStyleSet()
- This method constructs an empty style set.
- Supported Platforms
| Windows |
OS/2 |
AIX |
| Yes |
Yes |
Yes |
Overload 3
- Copy constructor.
public:
ITextStyleSet(const ITextStyleSet& other)
- This method constructs a copy of the given style set.
- other
- The set of styles to add to the newly created style set.
- Supported Platforms
| Windows |
OS/2 |
AIX |
| Yes |
Yes |
Yes |
Adding and Removing Contents
Use these methods to add, remove, intersect, filter, and assign text styles.
- add
- Add the given style or styles to "this."
Overload 1
- Adds styles.
public:
void add(const ITextStyleSet& other)
- If there are any styles in "other" that are of the same class as styles
in "this," the styles in "this" take on the values of the styles in "other"
- other
- The set of styles to add.
- Supported Platforms
| Windows |
OS/2 |
AIX |
| Yes |
Yes |
Yes |
Overload 2
- Add styles.
public:
void add(const ITextStyle& style)
- If there is already a style of the same class as "style" in "this," it takes
on the value of "style."
- style
- The style to add.
- Supported Platforms
| Windows |
OS/2 |
AIX |
| Yes |
Yes |
Yes |
- filterByType
- Filter styles.
public:
void filterByType(ITextStyle::EStylePropagation typeToKeep)
- Remove from "this" all styles that aren't of the specified propagation type.
- typeToKeep
- The type to keep. kMaximumPropagation is legal, but has no effect.
- Supported Platforms
| Windows |
OS/2 |
AIX |
| Yes |
Yes |
Yes |
- intersect
- Intersect style sets.
public:
void intersect(const ITextStyleSet& other)
- Remove from "this" any style that doesn't match the class of a style in "other."
- other
- The set of styles to intersect.
- Supported Platforms
| Windows |
OS/2 |
AIX |
| Yes |
Yes |
Yes |
- intersectByValue
- Intersect style sets.
public:
void intersectByValue(const ITextStyleSet& other)
- Remove from "this" any style that doesn't match both the class AND VALUE of a
style in "other."
- other
- The set of styles to intersect.
- Supported Platforms
| Windows |
OS/2 |
AIX |
| Yes |
Yes |
Yes |
- operator +
- Return a style set containing the styles in "this" plus the given style or styles.
Overload 1
- Add style sets.
public:
ITextStyleSet operator +(const ITextStyle& style) const
- Use this to achieve the same effect as ITextStyleSet(this) += style.
- style
- The style to add.
- Return
- operator+ returns a style set.
- Supported Platforms
| Windows |
OS/2 |
AIX |
| Yes |
Yes |
Yes |
Overload 2
- Add style sets.
public:
ITextStyleSet operator +(const ITextStyleSet& other) const
- Use this to achieve the same effect as ITextStyleSet(this) += other.
- other
- The set of styles to add.
- Return
- operator+ returns a style set.
- Supported Platforms
| Windows |
OS/2 |
AIX |
| Yes |
Yes |
Yes |
- operator +=
- Add the given style or styles to "this." This has the same effect as add().
Overload 1
- Add styles.
public:
ITextStyleSet& operator +=(const ITextStyle& style)
- If there is already a style of the same class as "style" in "this," it takes
on the value of "style."
- style
- The style to add.
- Return
- operator+= returns a reference to the updated style set.
- Supported Platforms
| Windows |
OS/2 |
AIX |
| Yes |
Yes |
Yes |
Overload 2
- Add styles.
public:
ITextStyleSet& operator +=(const ITextStyleSet& other)
- If there are any styles in "other" that are of the same class as styles
in "this," the styles in "this" take on the values of the styles in "other"
- other
- The set of styles to add.
- Return
- operator+= returns a reference to the updated style set.
- Supported Platforms
| Windows |
OS/2 |
AIX |
| Yes |
Yes |
Yes |
- operator -
- Return a style set containing the styles in "this" minus the given style or styles.
Overload 1
- Subtract style sets.
public:
ITextStyleSet operator -(const ITextStyle& style) const
- Use this to achieve the same effect as ITextStyleSet(this) -= style.
- style
- The style to subtract.
- Return
- operator- returns a style set.
- Supported Platforms
| Windows |
OS/2 |
AIX |
| Yes |
Yes |
Yes |
Overload 2
- Subtract style sets.
public:
ITextStyleSet operator -(const ITextStyleSet& other) const
- Use this to achieve the same effect as ITextStyleSet(this) -= other.
- other
- The set of styles to subtract.
- Return
- operator- returns a style set.
- Supported Platforms
| Windows |
OS/2 |
AIX |
| Yes |
Yes |
Yes |
- operator -=
- Remove the given style or styles from "this." This has the same effect as remove().
Overload 1
- Remove styles.
public:
ITextStyleSet& operator -=(const ITextStyle& style)
- If there is a style in "this" that has the same class as "style" (value doesn't
count, only class), it is removed.
- style
- The style to remove.
- Return
- operator-= returns a reference to the updated style set.
- Supported Platforms
| Windows |
OS/2 |
AIX |
| Yes |
Yes |
Yes |
Overload 2
- Remove styles.
public:
ITextStyleSet& operator -=(const ITextStyleSet& other)
- If there is any style in "this" that has the same class as a style in "other" (value doesn't
count, only class), it is removed.
- other
- The set of styles to remove.
- Return
- operator-= returns a reference to the updated style set.
- Supported Platforms
| Windows |
OS/2 |
AIX |
| Yes |
Yes |
Yes |
- operator =
- Replace the styles in "this" with the given style or styles.
Overload 1
- Assignment operator.
public:
ITextStyleSet& operator =(const ITextStyleSet& other)
- Replace the styles in "this" with the styles in "other."
- other
- The set of styles to assign.
- Return
- operator= returns a reference to the updated style set.
- Supported Platforms
| Windows |
OS/2 |
AIX |
| Yes |
Yes |
Yes |
Overload 2
- Assignment operator.
public:
ITextStyleSet& operator =(const ITextStyle& style)
- Replace the styles in "this" with the given style.
- style
- The style to assign.
- Return
- operator= returns a reference to the updated style set.
- Supported Platforms
| Windows |
OS/2 |
AIX |
| Yes |
Yes |
Yes |
- remove
- Remove from "this" any style that matches the class of the given style or styles.
Overload 1
- Remove styles.
public:
void remove(const ITextStyleSet& other)
- For every style in "other," if there is a style of the same class in "this,"
it is removed. (Values don't have to match; only classes.)
- other
- The set of styles to remove.
- Supported Platforms
| Windows |
OS/2 |
AIX |
| Yes |
Yes |
Yes |
Overload 2
- Remove styles.
public:
void remove(const ITextStyle& style)
- If there is a style in "this" that has the same class as "style" (value doesn't
count, only class), it is removed.
- style
- The style to remove.
- Supported Platforms
| Windows |
OS/2 |
AIX |
| Yes |
Yes |
Yes |
- removeAll
- Removes all styles.
public:
void removeAll()
- Remove all styles from "this."
- Supported Platforms
| Windows |
OS/2 |
AIX |
| Yes |
Yes |
Yes |
- removeByValue
- Remove from "this" any style that matches both the class AND VALUE of the given style or styles.
Overload 1
- Remove styles.
public:
void removeByValue(const ITextStyle& style)
- If there is a style in "this" that matches "style" in BOTH CLASS AND VALUE,
it is removed.
- style
- The style to remove.
- Supported Platforms
| Windows |
OS/2 |
AIX |
| Yes |
Yes |
Yes |
Overload 2
- Remove styles.
public:
void removeByValue(const ITextStyleSet& other)
- For every style in "other," if there is a style in "this" that matches it
in BOTH CLASS AND VALUE, it is removed.
- other
- The set of styles to remove.
- Supported Platforms
| Windows |
OS/2 |
AIX |
| Yes |
Yes |
Yes |
Comparing
Use these methods to compare styles sets.
- operator !=
- Return !(operator==(other)).
public:
bool operator !=(const ITextStyleSet& other) const
- Return true if the given style set and "this" do not contain the same styles with the same values.
- other
- The style set to compare.
- Return
- operator!= returns a bool.
- Supported Platforms
| Windows |
OS/2 |
AIX |
| Yes |
Yes |
Yes |
- operator ==
- Equality operator.
public:
bool operator ==(const ITextStyleSet& other) const
- Return true if the given style set and "this" contain the same styles with the same values.
- other
- The style set to compare.
- Return
- operator== returns a bool.
- Supported Platforms
| Windows |
OS/2 |
AIX |
| Yes |
Yes |
Yes |
Creating Empty Style Sets
Use these methods to create empty style sets.
- emptyStyleSet
- Returns reference to empty style set.
public:
static ITextStyleSet& emptyStyleSet()
- This method returns a reference to an empty style set.
- Return
- emptyStyleSet returns a reference to a style set.
- Supported Platforms
| Windows |
OS/2 |
AIX |
| Yes |
Yes |
Yes |
Debugging
Use these methods to debug styles sets.
- printDebugInfo
- Print debugging info.
public:
void printDebugInfo() const
- This method writes the classes and values of all the styles in the set,
in human-readable form, to the location specified by class ITraceSetup.
- Supported Platforms
| Windows |
OS/2 |
AIX |
| Yes |
Yes |
Yes |
Extracting Contents
Use these methods to extract the contents of styles sets.
- extract
- This method extracts a style or styles.
Overload 1
- Extract styles.
public:
bool
extract( ITextStyleSet& other,
ITextStyle::EStylePropagation propagation ) const
- This method extracts all styles of the given propagation type.
- other
- The style set whose contents will be replaced by all
styles in "this" with the given propagation type.
- propagation
- The propagation type. kMaximumPropagation can be used to extract all styles (this
would be the same as using the copy constructor).
- Return
- extract returns a bool. The return value is true if the set contains any styles of the given propagation type.
- Supported Platforms
| Windows |
OS/2 |
AIX |
| Yes |
Yes |
Yes |
Overload 2
- Extract style.
public:
bool extract(ITextStyle& style) const
- This method extracts a style value.
- style
- The style to extract. If "this" contains a style of the same class as "style,"
the value of "style" is filled in with the value in the style
set. Otherwise, "style" remains unchanged.
- Return
- extract returns a bool. The return value is true if the set contains a style of the same class as "style."
- Supported Platforms
| Windows |
OS/2 |
AIX |
| Yes |
Yes |
Yes |
Obtaining Content Information
Use these methods to obtain information about the contents of style sets.
- contains
- Use this method to determine if the style set contains the specified style or styles.
Overload 1
- Contains the styles.
public:
bool contains(const ITextStyleSet& other) const
- This method tests for style containment on a whole group of styles at once.
- other
- The set of styles to locate.
- Return
- contains returns a bool. The return value is true if for each of the styles in "other" there exists a style in "this"
of the same class (value doesn't count).
- Supported Platforms
| Windows |
OS/2 |
AIX |
| Yes |
Yes |
Yes |
Overload 2
- Contains the style.
public:
bool contains(const ITextStyle& style) const
- This method returns true if the set contains a style of the same class as "style" (value doesn't count).
- style
- The style to locate.
- Return
- contains returns a bool.
- Supported Platforms
| Windows |
OS/2 |
AIX |
| Yes |
Yes |
Yes |
Overload 3
- Contains styles with specified propagation type.
public:
bool
contains( ITextStyle::EStylePropagation propagation ) const
- This method returns true if the style set contains any styles with the specified propagation type.
- propagation
- The propagation type. If kMaximumPropagation is used to mean "all styles" and the set contains any styles at all, the function
returns true.
- Return
- contains returns a bool.
- Supported Platforms
| Windows |
OS/2 |
AIX |
| Yes |
Yes |
Yes |
- containsByValue
- Use this method to determine if the style set contains the specified style or styles.
Overload 1
- Contains style by value.
public:
bool containsByValue(const ITextStyleSet& other) const
- This method tests for style containment on a whole group of styles at once.
- other
- The set of styles to locate.
- Return
- containsByValue returns a bool. The return value is true if for each of the styles in "other," "this" contains a style that matches
it in both class AND VALUE
- Supported Platforms
| Windows |
OS/2 |
AIX |
| Yes |
Yes |
Yes |
Overload 2
- Contains style by value.
public:
bool containsByValue(const ITextStyle& style) const
- This method returns true if the style set contains a style which matches "style" in both class AND VALUE.
- style
- The style to locate.
- Return
- containByValue returns a bool.
- Supported Platforms
| Windows |
OS/2 |
AIX |
| Yes |
Yes |
Yes |
- empty
- Is empty.
public:
bool empty() const
- This method returns true if the set is empty (i.e., contains no styles).
- Return
- empty returns a bool.
- Supported Platforms
| Windows |
OS/2 |
AIX |
| Yes |
Yes |
Yes |
- styleCount
- Style count.
public:
size_t styleCount() const
- This method returns the number of styles contained in the set.
- Return
- styleCount returns a size_t.
- Supported Platforms
| Windows |
OS/2 |
AIX |
| Yes |
Yes |
Yes |
Streaming
Use these methods to stream styles sets.
- operator <<=
- Stream in.
public:
void operator <<=(IDataStream& fromWhere)
- Replace the contents of the style set with the style set data read from "fromWhere".
- fromWhere
- The input stream.
- Supported Platforms
| Windows |
OS/2 |
AIX |
| Yes |
Yes |
Yes |
- operator >>=
- Stream out.
public:
void operator >>=(IDataStream& toWhere) const
- Write the contents of the style set to "toWhere"
- toWhere
- The output stream.
- Supported Platforms
| Windows |
OS/2 |
AIX |
| Yes |
Yes |
Yes |
ITextStyleSet - Inherited Member Functions and Data
Inherited Public Functions
- IMRefCounted
-
Inherited Public Data
Inherited Protected Functions
- IMRefCounted
-
Inherited Protected Data