C - FLTK Enumerations

This appendix lists the enumerations provided in the <FL/Enumerations.H> header file, organized by section. Constants whose value is zero are marked with "(0)", this is often useful to know when programming.

Version Numbers

The FLTK version number is stored in a number of compile-time constants:

Events

Events are identified by an Fl_Event enumeration value. The following events are currently defined:

Callback "When" Conditions

The following constants determine when a callback is performed:

Fl::event_key() Values

The following constants define the non-ASCII keys on the keyboard for FL_KEYBOARD and FL_SHORTCUT events:

Fl::event_state() Values

The following constants define bits in the Fl::event_state() value:

Alignment Values

The following constants define bits that can be used with Fl_Widget::align() to control the positioning of the label:

Fonts

The following constants define the standard FLTK fonts:

Colors

The following color constants can be used to access the colors in the FLTK standard color palette: In addition there are two inline functions to allow you to select grays or colors from the FLTK colormap:

Fl_Color fl_gray_ramp(int i)
Returs a gray color. Returns black for zero, returns white for FL_NUM_GRAY (which is 24) minus 1. To get the closest to an 8-bit gray value 'I' use fl_gray_ramp(I*FL_NUM_GRAY/256)

Fl_Color fl_color_cube(int r, int g, int b)
Returns a color out of the color cube. r must be in the range 0 to FL_NUM_RED (5) minus 1. g must be in the range 0 to FL_NUM_GREEN (8) minus 1. b must be in the range 0 to FL_NUM_BLUE (5) minus 1. To get the closest color to a 8-bit set of R,G,B values use fl_color_cube(R*FL_NUM_RED/256, G*FL_NUM_GREEN/256, B*FL_NUM_BLUE/256);

Cursors

The following constants define the mouse cursors that are available in FLTK. The double-headed arrows are bitmaps provided by FLTK on X, the others are provided by system-defined cursors.

FD "When" Conditions

Damage Masks

The following damage mask bits are used by the standard FLTK widgets: