CLASS ColorScheme

Store and set color scheme information


Return

The function ColorScheme() returns the class object of the ColorScheme class.

Description

The ColorScheme class acts as a container for structured data about color schemes. The normal use of a ColorScheme instance is simply to be contained within the Configuration class :ColorScheme instance variable.

The ColorScheme class supports introspection via the standard data members :_data and :_methods.

Class Data

None

Class Methods

:new()
Creates an instance of the ColorScheme class.

Life Cycle

A ColorScheme instance comes into existence immediately upon its assignment with the ColorScheme():new() method. No seperate :create() method is required to request system resources.

A ColorScheme instance is destroyed when its variable falls out of its declaration scope. In most cases, the ColorScheme instance should be assigned to the :ColorScheme data member of the Configuration class. The scope of the data member containing a ColorScheme instance will be the same as the scope of the container Configuration object instance.

Instance Data

:_data [EXPORTED; Array (member data list)]
Introspection data to expose member data.
:_methods [EXPORTED; Array (member methods list)]
Introspection data to expose member methods.
:SchemeName [EXPORTED; Character (from ColorScheme:Old())]
String description of the color scheme?
:Statusbar [EXPORTED; Numeric (from ColorScheme:Old()))]
Color of the status bar background?
:Hilite [EXPORTED; Numeric (from ColorScheme:Old()))]
Color of 3D-effect highlights?
:Shadow [EXPORTED; Numeric (from ColorScheme:Old()))]
Color of 3D-effect shadows?
:Titlebar [EXPORTED; Numeric (from ColorScheme:Old()))]
Color of titlebar elements in widgets using that element?
:Titletext [EXPORTED; Numeric (from ColorScheme:Old()))]
Color of titlebar text in widgets?
:Activeborder [EXPORTED; Numeric (from ColorScheme:Old()))]
Color of active border of widgets, where applicable?
:Passiveborder [EXPORTED; Numeric (from ColorScheme:Old()))]
Color of passive border of widgets, where applicable?
:DialogBG [EXPORTED; Numeric (from ColorScheme:Old()))]
Color of dialog-box background?

Instance Methods

:init()
Set introspection data members. Subcall to ColorScheme:Old() (see Class method :new())
:Old()
Set all exposed data members to GRA_CLR_* values expressing the compatibility color scheme, except the member :SchemeName, which is set to "Compatibility Color Scheme".
:Windows()
Set all exposed data members to XBPSYSCLR_* values expressing the appropriate elements of the Windows color scheme, except the member :SchemeName, which is set to "Windows Color Scheme".

Examples

oCfg := Configuration:new()
oCfg:ColorScheme := ColorScheme():new():Windows()

Files

Source file is ColorScheme.prg


See Also:

CLASS Configuration