summaryrefslogtreecommitdiff
path: root/documentation/enumerations.html
diff options
context:
space:
mode:
authorBill Spitzak <spitzak@gmail.com>1999-01-27 08:45:11 +0000
committerBill Spitzak <spitzak@gmail.com>1999-01-27 08:45:11 +0000
commit59c96f54635aed579fcb40a1980ff3694af46bd8 (patch)
tree06bbd99c434659190549626dd5380262ce6eb0c5 /documentation/enumerations.html
parent7e0bd92469a8d9fd6fde66a856bfea703d587e71 (diff)
Fixes to documentation.
Restored the lines drawn around symbols, it uses fl_color_average to pick a dark line color that is still deactivatable. Requested by CE. git-svn-id: file:///fltk/svn/fltk/trunk@249 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'documentation/enumerations.html')
-rw-r--r--documentation/enumerations.html63
1 files changed, 47 insertions, 16 deletions
diff --git a/documentation/enumerations.html b/documentation/enumerations.html
index 2bb19ce69..be8d012c7 100644
--- a/documentation/enumerations.html
+++ b/documentation/enumerations.html
@@ -2,6 +2,8 @@
<H1 ALIGN=RIGHT><A NAME=enumerations>C - FLTK Enumerations</A></H1>
This appendix lists the enumerations provided in the <TT>
&lt;FL/Enumerations.H&gt;</TT> header file, organized by section.
+Constants whose value is zero are marked with "(0)", this is often
+useful to know when programming.
<H2>Version Numbers</H2>
The FLTK version number is stored in a number of compile-time
constants:
@@ -16,7 +18,8 @@ the major and minor release numbers, currently 1.0. </LI>
Events are identified by an <TT>Fl_Event</TT> enumeration value. The
following events are currently defined:
<UL>
-<LI><TT>FL_NO_EVENT</TT> - No event occurred. </LI>
+<LI><TT>FL_NO_EVENT</TT> - No event (or an event fltk does not
+understand) occurred (0).</LI>
<LI><TT>FL_PUSH</TT> - A mouse button was pushed. </LI>
<LI><TT>FL_RELEASE</TT> - A mouse button was released. </LI>
<LI><TT>FL_ENTER</TT> - The mouse pointer entered a widget. </LI>
@@ -42,7 +45,7 @@ following events are currently defined:
<H2>Callback &quot;When&quot; Conditions</H2>
The following constants determine when a callback is performed:
<UL>
-<LI><TT>FL_WHEN_NEVER</TT> - Never call the callback. </LI>
+<LI><TT>FL_WHEN_NEVER</TT> - Never call the callback (0). </LI>
<LI><TT>FL_WHEN_CHANGED</TT> - Do the callback only when the widget
value changes. </LI>
<LI><TT>FL_WHEN_NOT_CHANGED</TT> - Do the callback whenever the user
@@ -116,18 +119,29 @@ FL_KEYBOARD</TT> and <TT>FL_SHORTCUT</TT> events:
<TT>Fl_Widget::align()</TT></A> to control the positioning of the
label:
<UL>
-<LI><TT>FL_ALIGN_CENTER</TT> - The label is centered. </LI>
+<LI><TT>FL_ALIGN_CENTER</TT> - The label is centered (0). </LI>
<LI><TT>FL_ALIGN_TOP</TT> - The label is top-aligned. </LI>
<LI><TT>FL_ALIGN_BOTTOM</TT> - The label is bottom-aligned. </LI>
<LI><TT>FL_ALIGN_LEFT</TT> - The label is left-aligned. </LI>
<LI><TT>FL_ALIGN_RIGHT</TT> - The label is right-aligned. </LI>
-<LI><TT>FL_ALIGN_INSIDE</TT> - The label is put inside the widget. </LI>
<LI><TT>FL_ALIGN_CLIP</TT> - The label is clipped to the widget. </LI>
<LI><TT>FL_ALIGN_WRAP</TT> - The label text is wrapped as needed. </LI>
+<LI><TT>FL_ALIGN_TOP_LEFT</TT></LI>
+<LI><TT>FL_ALIGN_TOP_RIGHT</TT></LI>
+<LI><TT>FL_ALIGN_BOTTOM_LEFT</TT></LI>
+<LI><TT>FL_ALIGN_BOTTOM_RIGHT</TT></LI>
+<LI><TT>FL_ALIGN_LEFT_TOP</TT></LI>
+<LI><TT>FL_ALIGN_RIGHT_TOP</TT></LI>
+<LI><TT>FL_ALIGN_LEFT_BOTTOM</TT></LI>
+<LI><TT>FL_ALIGN_RIGHT_BOTTOM</TT></LI>
+<LI><TT>FL_ALIGN_INSIDE</TT> - 'or' this with other values to put
+label inside the widget. </LI>
+
</UL>
<H2>Fonts</H2>
The following constants define the standard FLTK fonts:
-<LI><TT>FL_HELVETICA</TT> - Helvetica (or Arial) normal. </LI>
+<ul>
+<LI><TT>FL_HELVETICA</TT> - Helvetica (or Arial) normal (0). </LI>
<LI><TT>FL_HELVETICA_BOLD</TT> - Helvetica (or Arial) bold. </LI>
<LI><TT>FL_HELVETICA_ITALIC</TT> - Helvetica (or Arial) oblique. </LI>
<LI><TT>FL_HELVETICA_BOLD_ITALIC</TT> - Helvetica (or Arial)
@@ -144,32 +158,49 @@ bold-oblique. </LI>
<LI><TT>FL_SCREEN</TT> - Default monospaced screen font. </LI>
<LI><TT>FL_SCREEN_BOLD</TT> - Default monospaced bold screen font. </LI>
<LI><TT>FL_ZAPF_DINGBATS</TT> - Zapf-dingbats font.
+</ul>
+
<H2>Colors</H2>
The following color constants can be used to access the colors in the
FLTK standard color palette:
<UL>
-<LI><TT>FL_BLACK</TT></LI>
+<LI><TT>FL_BLACK</TT> - the default label color (0)</LI>
<LI><TT>FL_RED</TT></LI>
<LI><TT>FL_GREEN</TT></LI>
<LI><TT>FL_YELLOW</TT></LI>
<LI><TT>FL_BLUE</TT></LI>
<LI><TT>FL_MAGENTA</TT></LI>
<LI><TT>FL_CYAN</TT></LI>
-<LI><TT>FL_WHITE</TT></LI>
-<LI><TT>FL_GRAY0</TT></LI>
-<LI><TT>FL_DARK3</TT></LI>
-<LI><TT>FL_DARK2</TT></LI>
-<LI><TT>FL_DARK1</TT></LI>
-<LI><TT>FL_GRAY</TT></LI>
-<LI><TT>FL_LIGHT1</TT></LI>
-<LI><TT>FL_LIGHT2</TT></LI>
-<LI><TT>FL_LIGHT3</TT></LI>
+<LI><TT>FL_WHITE</TT> - the default background for text</LI>
+<LI><TT>FL_SELECTION_COLOR</TT> - change to dark blue for Windows style</LI>
+<LI><TT>FL_GRAY</TT> - the default color.</LI>
</UL>
+
+In addition there are two inline functions to allow you to select
+grays or colors from the FLTK colormap:
+
+<p><b>Fl_Color fl_gray_ramp(int i)</b>
+<br>Returs a gray color. Returns black for zero, returns white for
+<tt>FL_NUM_GRAY</tt> (which is 24) minus 1. To get the closest to an
+8-bit gray value 'I' use
+<tt>fl_gray_ramp(I*FL_NUM_GRAY/256)</tt>
+
+<p><b>Fl_Color fl_color_cube(int r, int g, int b)</b>
+<br>Returns a color out of the color cube.
+
+<tt>r</tt> must be in the range 0 to FL_NUM_RED (5) minus 1.
+<tt>g</tt> must be in the range 0 to FL_NUM_GREEN (8) minus 1.
+<tt>b</tt> 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
+<tt>fl_color_cube(R*FL_NUM_RED/256, G*FL_NUM_GREEN/256,
+B*FL_NUM_BLUE/256);</tt>
+
<H2>Cursors</H2>
The following constants define the mouse cursors that are available in
FLTK:
<UL>
-<LI><TT>FL_CURSOR_DEFAULT</TT> - the default cursor, usually an arrow </LI>
+<LI><TT>FL_CURSOR_DEFAULT</TT> - the default cursor, usually an arrow (0)</LI>
<LI><TT>FL_CURSOR_ARROW</TT> - an arrow pointer </LI>
<LI><TT>FL_CURSOR_CROSS</TT> - crosshair </LI>
<LI><TT>FL_CURSOR_WAIT</TT> - watch or hourglass </LI>