| Prev | Next | Start of Chapter | End of Chapter | Contents | Glossary | Index | Comments | (4 out of 22)

Color Parameters

The Color Parameters system table lets you control which colors appear in the background- and foreground-color menus of G2, and the order in which those colors appear.

To display the color menu of a workspace:

where foreground-or-background-color is either background-color or foreground-color. Both choices have the same color selections. The color menus appear in other locations within G2, such as the Icon Editor.

Controlling the Menu Order of Colors

The Color-menu-ordering attribute controls the menu ordering. By default, the system-defined set of colors is ordered this way on the color menus:

This value... Arranges the colors...
hue
By hue. For example, greens are grouped together, reds are grouped together, blues are grouped together, and so on.
intensity
From light to dark.
alphabetic
Alphabetically, according to the color names.

Specifying the Colors on the First Color Menu

The Color-on-1st-level-color-menu attribute specifies what colors appear on the first level menu as follows:

This value... Provides...
color, color...
Any color from the G2 color set. Enter the names of the color in the order of your choice to construct your own color set. G2 accepts some variations in spelling. For example, you can enter grey instead of gray.
standard-set
A subset of the G2 color set consisting of: aquamarine, black, blue, brown, dark gray, gray, green, light gray, orange, purple, red, white, yellow
all
The full G2 color set as they appear: transparent, foreground, black, dim gray, dark gray, gray, light gray, white, pink, Indian red, salmon, brown, orange, red, tan, gold, coral, sienna, wheat, medium goldenrod, khaki, goldenrod, yellow, green yellow, pale green, forest green, lime green, green, aquamarine, medium aquamarine, light blue, turquoise, cadet blue, cyan, sky blue, slate blue, medium blue, blue, medium orchid, dark slate blue, thistle, plum, purple, violet, magenta, maroon, and violet red. The colors are arranged by hue, since that is the default for the Color-menu-ordering attribute

Defining the Colors on the Second Color Menu

The Color-on-2nd-level-color-menu attribute defines what colors appear on the second level menu. Specify this attribute as you would for the first level color menu.

Specifying the Number of Columns for the First Color Menu

The Number-of-columns-for-1st-level-color-menu attribute determines the number of columns, up to 7, that you want the menu to contain.

Specifying the Number of Columns for the Second Color Menu

The Number-of-columns-for-2nd-level-color-menu attribute determines the number of columns, up to 7, that you want the menu to contain.

Indicating Whether to Dismiss the Color Menu

The Dismiss-color-menu-after-choosing? attribute indicates whether the color menu remains displayed after you pick a color.

Class-Specific Attributes of Color Parameters

The class-specific attributes of the Color Parameters system table are:

Attribute Description
Color-menu-ordering
Controls the order in which colors are displayed in menus.
Allowable values:
{hue | intensity | alphabetic}
Default value:
hue


Colors-on-1st-level-color-menu
Controls which colors appear in the first level color menus.
Allowable values:
{color [, ...] | standard-set | all | none}
Default value:
standard-set


Colors-on-2nd-level-color-menu
Lets you create a subset of colors from the 1st level colors menu. This makes viewing the color syntax easier. It has the same syntax as the Color-on-1st-level-color-menu attribute.
Allowable values:
{color [, ...] | standard-set | all | none}
Default value:
all


Number-of-columns-for-1st-level-color-menu
Controls the number of columns to display the 1st level color menu.
Allowable values:
1 - 7
Default value:
1


Number-of-columns-for-2nd-level-color-menu
Controls the number of columns to display the 2nd level color menu.
Allowable values:
1 - 7
Default value:
3


Dismiss-color-menu-after-choosing?
Specifies how you want to dismiss menus. If yes, G2 dismisses the menus immediately. If no, all of the menus are left up, and you must dismiss them manually.
Allowable values:
{yes | no}
Default value:
yes

| Prev | Next | Start of Chapter | End of Chapter | Contents | Glossary | Index | Comments | (4 out of 22)

Copyright © 1997 Gensym Corporation, Inc.