ITextColorStyle

A style that controls the color of the text it is applied to. This class provides a style that specifies the color of the text it is applied to. The color is specified as three separate RGB components, each an unsigned char that can range in value from 0 to 255.

Do not derive your own classes from this class.


ITextColorStyle - Member Functions and Data by Group

Constructors & Destructor

Use the constructors and destructor in this group to create and destroy objects of class ITextColorStyle.


[view class]
~ITextColorStyle
public:
virtual ~ITextColorStyle()

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
ITextColorStyle
Constructs an object of class ITextColorStyle.


Overload 1
Constructs an ITextColorStyle object from the given values.
public:
ITextColorStyle( unsigned char red, unsigned char green, unsigned char blue )
Use this constructor to create an ITextColorStyle object from the given red, green, and blue values.

newRed
The red value to be used for the new object.
newGreen
The green value to be used for the new object.
newBlue
The blue value to be used for the new object.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Overload 2
Copy constructor.
public:
ITextColorStyle(const ITextColorStyle& other)
Use this constructor to create an object of class ITextColorStyle that is copied from the given one.

other
The ITextColorStyle object that is copied.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Overload 3
Default constructor.
public:
ITextColorStyle()
The default constructor leaves the style in an undefined state! A default-constructed style must have its value filled in in some way before it is used for anything!

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Assignment Operator

Use this operator to assign the given ITextColorStyle object to the target one.


[view class]
operator =
public:
ITextColorStyle& operator =(const ITextColorStyle& other)
Replaces the given ITextColorStyle object with the target one.

other
The ITextColorStyle object to be assigned.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Comparing Two ITextColorStyle Objects for Equality or Inequality

Use the operators in this group to test the given ITextColorStyle object against the current one for equality or inequality.


[view class]
operator !=
public:
bool operator !=(const ITextColorStyle& other) const
Compares two ITextColorStyle objects for inequality.

other
The ITextColorStyle object to be compared with the current one.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
operator ==
public:
bool operator ==(const ITextColorStyle& other) const
Compares the given ITextColorStyle object with the current one for equality.

other
The ITextColorStyle object to be compared with the current one.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Getting and Setting the RGB Values

Use the functions in this group to get and set the red, green, and blue color values either collectively or individually.


[view class]
blue
public:
unsigned char blue() const
Gets the blue value of the RGB.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
colors
Gets the red, green, and blue color values.
public:
void colors( unsigned char& red, unsigned char& greed, unsigned char& blue ) const
Gets all three RGB values.

red
The red value.
green
The green value.
blue
The blue value.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
green
public:
unsigned char green() const
Gets the green value of the RGB.

green
The green value.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
red
public:
unsigned char red() const
Gets the red value of the RGB.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
setBlue
public:
void setBlue(unsigned char newValue)
Sets the blue value of the RGB.

newValue
The blue value to be used as the new setting.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
setColors
public:
void setColors( unsigned char newRed, unsigned char newGreen, unsigned char newBlue )
Sets all three RGB color values.

newRed
The red value to be used as the new setting.
newGreen
The green value to be used as the new setting.
newBlue
The blue value to be used as the new setting.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
setGreen
public:
void setGreen(unsigned char newValue)
Sets the green value of the RGB.

newValue
The green value to be used as the new setting.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
setRed
public:
void setRed(unsigned char newValue)
Sets the red value of the RGB.

newValue
The red value to be used as the new setting.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


ITextColorStyle - Inherited Member Functions and Data

Inherited Public Functions

ICharacterStyle
ITextStyle

Inherited Public Data

Inherited Protected Functions

ITextStyle
ITextColorStyle
ICharacterStyle

Inherited Protected Data