The IGUIColor class represents system-default colors for different areas of different types of windows. Like IColor objects created with the constructor that accepts a IColor::SystemColor enumeration value, the color returned by the object will represent the current system setting for the screen area, even if the system settings are changed after the IGUIColor object is created. When you use IGUIColor objects created with this constructor to set the color of an IWindow object, the window is updated automatically with the new color when the system settings are changed.
If you use the setBlue, setRed, or setGreen functions to modify the object, the link to the system color setting is broken.
In AIX, this class only provides hard-coded, default color values. If you want your application to be portable, use the class IColor to create IColor objects. Such objects give you control over color values.
You cannot determine the color of an area for a widget that has not been created. You can query a widget for the color of all of the color areas defined for that widget. Using X, you can set the color of each widget through resource files. Because of this, it is impossible to determine the default color of an unknown widget.
IGUIColor objects correspond to one of the system SYSCLR_* colors in Presentation Manager.
IGUIColor objects correspond to one of the system COLOR_* colors in the Windows SDK.
You can construct and destruct objects of this class.
![]() |
public:
virtual ~IGUIColor()
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IGUIColor(ESystemColor value)
You can only construct objects of this class from a system color value identified by an IColor::ESystemColor enumerator.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members to identify the system color represented by an IGUIColor object.
![]() |
public:
ESystemColor systemColor() const
Returns the IColor::SystemColor enumerator used to create this object.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
System colors define the default colors for the windows of all applications.
![]() |
public:
IGUIColor& setColor(const IColor& newColor)
Changes the system color represented by the object to the specified color. Changing a system color will affect the color of all windows, including those created by other applications, that use that system color.
IInvalidRequest | The object does not represent a valid system color, or the presentation system was unable to change the system color. |
Windows | OS/2 | AIX |
Yes | Yes | Ignored |
virtual ~IBaseColor()
IBaseColor(CharIntensity gray, CharIntensity opacity = 255)
IBaseColor(EPredefinedColor commonlyUsedColor)
IBaseColor()
IBaseColor( CharIntensity red, CharIntensity green, CharIntensity blue, CharIntensity opacity = 255 )
IBaseColor(const IBaseColor&)
bool operator !=(const IBaseColor&) const
IBaseColor& operator =(const IBaseColor& source)
virtual bool operator ==(const IBaseColor&) const
virtual ~IColor()
long asRGBLong() const
virtual CharIntensity blueMix() const
virtual void blueMix(GIntensity& blue) const
virtual void elementsInXYZColorSpace( GIntensity& x, GIntensity& y, GIntensity& z ) const
virtual CharIntensity gray() const
virtual void greenMix(GIntensity& green) const
virtual CharIntensity greenMix() const
IColor( unsigned long index, const IColorMap* referencedColorMap = NULL )
IColor(ESystemColor value)
IColor(EPredefinedColor color)
IColor( CharIntensity red, CharIntensity green, CharIntensity blue, CharIntensity opacity = 255 )
IColor(const IColor& color)
virtual long index() const
virtual void opacity(GIntensity& opacity) const
virtual CharIntensity opacity() const
IColor& operator =(const IColor& color)
virtual bool operator ==(const IBaseColor& color) const
IBaseColor::EPredefinedColor predefinedColor() const
virtual void redMix(GIntensity& red) const
virtual CharIntensity redMix() const
ESystemColor runtimeGuiColor() const
virtual IBaseColor& setBlue(CharIntensity blue)
virtual void setElementsInXYZColorSpace( GIntensity x, GIntensity y, GIntensity z )
virtual IBaseColor& setGreen(CharIntensity green)
virtual IBaseColor& setOpacity(CharIntensity opacity)
virtual IBaseColor& setRed(CharIntensity red)
virtual ~IMStreamable()
void externalizeToStream(IDataStream& towhere) const
void internalizeFromStream(IDataStream& fromwhere)
virtual const ITypeRepresentation& typeRepresentation() const = 0
const IColorProfile* colorProfile() const
IBaseColor& copyRGBA(const IBaseColor& source)
long createIndex( CharIntensity r, CharIntensity g, CharIntensity b )
void rgbFromIndex(unsigned long index)
void setRGB( CharIntensity r, CharIntensity g, CharIntensity b, CharIntensity o = 255 )
IMStreamable()
IMStreamable(const IMStreamable& other)
virtual void readFromStream(IDataStream& fromwhere) = 0
virtual void writeToStream(IDataStream& towhere) const = 0
virtual void readFromStream(IDataStream& fromWhere)
virtual void writeToStream(IDataStream& toWhere) const
CharIntensity fBlue
static const IColorProfile* fgColorProfile
CharIntensity fGreen
CharIntensity fOpacity
CharIntensity fRed