IGUIColor

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.

Portability Considerations

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.

AIX Considerations

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.

OS/2 Considerations

IGUIColor objects correspond to one of the system SYSCLR_* colors in Presentation Manager.

Windows Considerations

IGUIColor objects correspond to one of the system COLOR_* colors in the Windows SDK.


IGUIColor - Member Functions and Data by Group

Constructors & Destructor

You can construct and destruct objects of this class.


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

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
IGUIColor
public:
IGUIColor(ESystemColor value)

You can only construct objects of this class from a system color value identified by an IColor::ESystemColor enumerator.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Color Representation

Use these members to identify the system color represented by an IGUIColor object.


[view class]
systemColor
public:
ESystemColor systemColor() const

Returns the IColor::SystemColor enumerator used to create this object.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Setting System Colors

System colors define the default colors for the windows of all applications.


[view class]
setColor
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.

Exception

IInvalidRequest The object does not represent a valid system color, or the presentation system was unable to change the system color.

Supported Platforms

Windows OS/2 AIX
Yes Yes Ignored


IGUIColor - Inherited Member Functions and Data

Inherited Public Functions

IBaseColor
IColor
IMStreamable

Inherited Public Data

Inherited Protected Functions

IBaseColor
IMStreamable
IColor

Inherited Protected Data

IBaseColor