Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CP_RGBColor Class Reference

A class to handle management of a color in RGB format, and provide conversion to and from the underlying OSs native format of a color representation.

List of all members.

Public Member Functions

Constructor / Destructor
 CP_RGBColor ()
 Constructor.
 CP_RGBColor (UInt16 inRed, UInt16 inGreen, UInt16 inBlue)
 CP_RGBColor (const CP_RGBColor &inColor)
virtual ~CP_RGBColor ()
 Destructor.
Getters
UInt16 red () const
UInt16 green () const
UInt16 blue () const
operators
bool operator== (const CP_RGBColor &inColor) const
bool operator!= (const CP_RGBColor &inColor) const
CP_RGBColoroperator= (const CP_RGBColor &inColor)
Setters
void Set (UInt16 inRed, UInt16 inGreen, UInt16 inBlue)
void Set (const CP_RGBColor &inColor)
void Lighten ()
void Darken ()
Constructor / Destructor
 CP_RGBColor (RGBColor inColor)
 Constructor.
Converters
 operator RGBColor * ()
 operator const RGBColor * () const
 operator RGBColor ()
 operator const RGBColor () const
Getters
RGBColor GetRGBColor ()
RGBColor GetRGBColor () const
Setters
void Set (const RGBColor inColor)
Constructor / Destructor
 CP_RGBColor (COLORREF inColor)
 Constructor.
Converters
COLORREF GetCOLORREF () const
 operator COLORREF () const
Setters
void Set (COLORREF inColor)
Converters
GdkColor * GetGDKColor ()
Setters
void Set (GdkColor inColor)

Protected Attributes

UInt16 fRed
UInt16 fGreen
UInt16 fBlue
GdkColor fGDKColor


Constructor & Destructor Documentation

CPLAT_Begin_Namespace_CPLAT CP_RGBColor::CP_RGBColor  ) 
 

Constructor. Sets the color to black.

CP_RGBColor::CP_RGBColor UInt16  inRed,
UInt16  inGreen,
UInt16  inBlue
 

Constructor.

Parameters:
inRed - red color component.
inGreen - green color component.
inBlue - blue color component.

CP_RGBColor::CP_RGBColor const CP_RGBColor inColor  ) 
 

Copy constructor.

CP_RGBColor::~CP_RGBColor  )  [virtual]
 

Destructor.

CP_RGBColor::CP_RGBColor RGBColor  inColor  ) 
 

The Linux reprentation of a color.

CP_RGBColor::CP_RGBColor COLORREF  inColor  ) 
 

Constructor. Sets the color based on the Windows COLORREF.

Parameters:
inColor - a Windows COLORREF to set ourselves to.


Member Function Documentation

UInt16 CP_RGBColor::red  )  const
 

Return the red component of the color as a UInt16.

UInt16 CP_RGBColor::green  )  const
 

Return the green component of the color as a UInt16.

UInt16 CP_RGBColor::blue  )  const
 

Return the blue component of the color as a UInt16.

bool CP_RGBColor::operator== const CP_RGBColor inColor  )  const
 

Equality operator. Return true if the passed in CP_RGBColor is equal to this color.

Parameters:
inColor - the CP_RGBColor to test against.

bool CP_RGBColor::operator!= const CP_RGBColor inColor  )  const
 

Operator not equal. Return true if the passed in CP_RGBColor is not equal to this color.

Parameters:
inColor - the CP_RGBColor to test against.

CP_RGBColor & CP_RGBColor::operator= const CP_RGBColor inColor  ) 
 

Assignment operator. Assign the color components of the passed in inColor to ourselves.

Parameters:
inColor - a CP_RGBColor we are copying.

void CP_RGBColor::Set UInt16  inRed,
UInt16  inGreen,
UInt16  inBlue
 

Set the color components to the values passed in.

Parameters:
inRed - red color component.
inGreen - green color component.
inBlue - blue color component.

void CP_RGBColor::Set const CP_RGBColor inColor  ) 
 

Sets the color from the passed in CP_RGBColor object.

Parameters:
inColor A CP_RGBColor object to set the color from.
Exceptions:
none 
Returns:
void

void CP_RGBColor::Lighten  ) 
 

Lighten the color.

void CP_RGBColor::Darken  ) 
 

Darken the color.

CP_RGBColor::operator RGBColor *  ) 
 

Operator RGBColor *. Return ourselves converted to a MacOS RGBColor *.

CP_RGBColor::operator const RGBColor *  )  const
 

Operator RGBColor *. Return ourselves converted to a MacOS RGBColor * const version.

CP_RGBColor::operator RGBColor  ) 
 

Operator RGBColor. Return ourselves converted to a MacOS RGBColor.

CP_RGBColor::operator const RGBColor  )  const
 

Operator RGBColor. Return ourselves converted to a MacOS RGBColor const version.

RGBColor CP_RGBColor::GetRGBColor  ) 
 

Return ourselves converted to a MacOS RGBColor const version.

RGBColor CP_RGBColor::GetRGBColor  )  const
 

Return ourselves converted to a MacOS RGBColor const version.

void CP_RGBColor::Set const RGBColor  inColor  ) 
 

Set the color components from the passed in MacOS RGBColor.

Parameters:
inColor - MacOS RGBColor.

COLORREF CP_RGBColor::GetCOLORREF  )  const
 

Return ourselves as a Windows COLORREF.

CP_RGBColor::operator COLORREF  )  const
 

COLORREF operator to return the color as a Windows COLORREF.

Exceptions:
none 
Returns:
COLORREF Windows COLORREF of this color.

void CP_RGBColor::Set COLORREF  inColor  ) 
 

Sets the color from a Windows COLORREF.

GdkColor * CP_RGBColor::GetGDKColor  ) 
 

void CP_RGBColor::Set GdkColor  inColor  ) 
 


Member Data Documentation

UInt16 CP_RGBColor::fRed [protected]
 

UInt16 CP_RGBColor::fGreen [protected]
 

The red color component.

UInt16 CP_RGBColor::fBlue [protected]
 

The green color component.

GdkColor CP_RGBColor::fGDKColor [protected]
 

The blue color component.


The documentation for this class was generated from the following files:
Generated on Sat Sep 17 20:02:06 2005 for CPLAT by  doxygen 1.4.0