dc70b69502
Added new image files for buttons. git-svn-id: file:///fltk/svn/fltk/trunk@237 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
207 lines
9.3 KiB
HTML
207 lines
9.3 KiB
HTML
<HTML><BODY>
|
|
<H1 ALIGN=RIGHT><A NAME=enumerations>C - FLTK Enumerations</A></H1>
|
|
This appendix lists the enumerations provided in the <TT>
|
|
<FL/Enumerations.H></TT> header file, organized by section.
|
|
<H2>Version Numbers</H2>
|
|
The FLTK version number is stored in a number of compile-time
|
|
constants:
|
|
<UL>
|
|
<LI><TT>FL_MAJOR_VERSION</TT> - The major release number, currently 1. </LI>
|
|
<LI><TT>FL_MINOR_VERSION</TT> - The minor release number, currently 0. </LI>
|
|
<LI><TT>FL_PATCH_VERSION</TT> - The patch release number, currently 0. </LI>
|
|
<LI><TT>FL_VERSION</TT> - A combined floating-point version number for
|
|
the major and minor release numbers, currently 1.0. </LI>
|
|
</UL>
|
|
<H2>Events</H2>
|
|
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_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>
|
|
<LI><TT>FL_LEAVE</TT> - The mouse pointer left a widget. </LI>
|
|
<LI><TT>FL_DRAG</TT> - The mouse pointer was moved with a button
|
|
pressed. </LI>
|
|
<LI><TT>FL_FOCUS</TT> - A widget should receive keyboard focus. </LI>
|
|
<LI><TT>FL_UNFOCUS</TT> - A widget loses keyboard focus. </LI>
|
|
<LI><TT>FL_KEYBOARD</TT> - A key was pressed. </LI>
|
|
<LI><TT>FL_CLOSE</TT> - A window was closed. </LI>
|
|
<LI><TT>FL_MOVE</TT> - The mouse pointer was moved with no buttons
|
|
pressed. </LI>
|
|
<LI><TT>FL_SHORTCUT</TT> - The user pressed a shortcut key. </LI>
|
|
<LI><TT>FL_DEACTIVATE</TT> - The widget has been deactivated. </LI>
|
|
<LI><TT>FL_ACTIVATE</TT> - The widget has been activated. </LI>
|
|
<LI><TT>FL_HIDE</TT> - The widget has been hidden. </LI>
|
|
<LI><TT>FL_SHOW</TT> - The widget has been shown. </LI>
|
|
<LI><TT>FL_PASTE</TT> - The widget should paste the contents of the
|
|
clipboard. </LI>
|
|
<LI><TT>FL_SELECTIONCLEAR</TT> - The widget should clear any selections
|
|
made for the clipboard. </LI>
|
|
</UL>
|
|
<H2>Callback "When" 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_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
|
|
interacts with the widget. </LI>
|
|
<LI><TT>FL_WHEN_RELEASE</TT> - Do the callback when the button or key
|
|
is released and the value changes. </LI>
|
|
<LI><TT>FL_WHEN_ENTER_KEY</TT> - Do the callback when the user presses
|
|
the ENTER key and the value changes. </LI>
|
|
<LI><TT>FL_WHEN_RELEASE_ALWAYS</TT> - Do the callback when the button
|
|
or key is released, even if the value doesn't change. </LI>
|
|
<LI><TT>FL_WHEN_ENTER_KEY_ALWAYS</TT> - Do the callback when the user
|
|
presses the ENTER key, even if the value doesn't change. </LI>
|
|
</UL>
|
|
<H2><A NAME="key_values">Fl::event_key() Values</A></H2>
|
|
The following constants define the non-ASCII keys on the keyboard for <TT>
|
|
FL_KEYBOARD</TT> and <TT>FL_SHORTCUT</TT> events:
|
|
<UL>
|
|
<LI><TT>FL_Button</TT> - A mouse button; use <TT>Fl_Button + n</TT>
|
|
for mouse button <TT>n</TT>. </LI>
|
|
<LI><TT>FL_BackSpace</TT> - The backspace key. </LI>
|
|
<LI><TT>FL_Tab</TT> - The tab key. </LI>
|
|
<LI><TT>FL_Enter</TT> - The enter key. </LI>
|
|
<LI><TT>FL_Pause</TT> - The pause key. </LI>
|
|
<LI><TT>FL_Scroll_Lock</TT> - The scroll lock key. </LI>
|
|
<LI><TT>FL_Escape</TT> - The escape key. </LI>
|
|
<LI><TT>FL_Home</TT> - The home key. </LI>
|
|
<LI><TT>FL_Left</TT> - The left arrow key. </LI>
|
|
<LI><TT>FL_Up</TT> - The up arrow key. </LI>
|
|
<LI><TT>FL_Right</TT> - The right arrow key. </LI>
|
|
<LI><TT>FL_Down</TT> - The down arrow key. </LI>
|
|
<LI><TT>FL_Page_Up</TT> - The page-up key. </LI>
|
|
<LI><TT>FL_Page_Down</TT> - The page-down key. </LI>
|
|
<LI><TT>FL_End</TT> - The end key. </LI>
|
|
<LI><TT>FL_Print</TT> - The print (or print-screen) key. </LI>
|
|
<LI><TT>FL_Insert</TT> - The insert key. </LI>
|
|
<LI><TT>FL_Menu</TT> - The menu key. </LI>
|
|
<LI><TT>FL_Num_Lock</TT> - The num lock key. </LI>
|
|
<LI><TT>FL_KP</TT> - One of the keypad numbers; use <TT>FL_KP + n</TT>
|
|
for number <TT>n</TT>. </LI>
|
|
<LI><TT>FL_KP_Enter</TT> - The enter key on the keypad. </LI>
|
|
<LI><TT>FL_F</TT> - One of the function keys; use <TT>FL_F + n</TT>
|
|
for function key <TT>n</TT>. </LI>
|
|
<LI><TT>FL_Shift_L</TT> - The lefthand shift key. </LI>
|
|
<LI><TT>FL_Shift_R</TT> - The righthand shift key. </LI>
|
|
<LI><TT>FL_Control_L</TT> - The lefthand control key. </LI>
|
|
<LI><TT>FL_Control_R</TT> - The righthand control key. </LI>
|
|
<LI><TT>FL_Caps_Lock</TT> - The caps lock key. </LI>
|
|
<LI><TT>FL_Meta_L</TT> - The left meta/Windows key. </LI>
|
|
<LI><TT>FL_Meta_R</TT> - The right meta/Windows key. </LI>
|
|
<LI><TT>FL_Alt_L</TT> - The left alt key. </LI>
|
|
<LI><TT>FL_Alt_R</TT> - The right alt key. </LI>
|
|
<LI><TT>FL_Delete</TT> - The delete key. </LI>
|
|
</UL>
|
|
<H2>Fl::event_state() Values</H2>
|
|
The following constants define bits in the <TT>Fl::event_state()</TT>
|
|
value:
|
|
<UL>
|
|
<LI><TT>FL_SHIFT</TT> - One of the shift keys is down. </LI>
|
|
<LI><TT>FL_CAPS_LOCK</TT> - The caps lock is on. </LI>
|
|
<LI><TT>FL_CTRL</TT> - One of the ctrl keys is down. </LI>
|
|
<LI><TT>FL_ALT</TT> - One of the alt keys is down. </LI>
|
|
<LI><TT>FL_NUM_LOCK</TT> - The num lock is on. </LI>
|
|
<LI><TT>FL_META</TT> - One of the meta/Windows keys is down. </LI>
|
|
<LI><TT>FL_SCROLL_LOCK</TT> - The scroll lock is on. </LI>
|
|
<LI><TT>FL_BUTTON1</TT> - Mouse button 1 is pushed. </LI>
|
|
<LI><TT>FL_BUTTON2</TT> - Mouse button 2 is pushed. </LI>
|
|
<LI><TT>FL_BUTTON3</TT> - Mouse button 3 is pushed. </LI>
|
|
</UL>
|
|
<H2>Alignment Values</H2>
|
|
The following constants define bits that can be used with <A href=Fl_Widget.html#Fl_Widget.align>
|
|
<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_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>
|
|
</UL>
|
|
<H2>Fonts</H2>
|
|
The following constants define the standard FLTK fonts:
|
|
<LI><TT>FL_HELVETICA</TT> - Helvetica (or Arial) normal. </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)
|
|
bold-oblique. </LI>
|
|
<LI><TT>FL_COURIER</TT> - Courier normal. </LI>
|
|
<LI><TT>FL_COURIER_BOLD</TT> - Courier bold. </LI>
|
|
<LI><TT>FL_COURIER_ITALIC</TT> - Courier italic. </LI>
|
|
<LI><TT>FL_COURIER_BOLD_ITALIC</TT> - Courier bold-italic. </LI>
|
|
<LI><TT>FL_TIMES</TT> - Times roman. </LI>
|
|
<LI><TT>FL_TIMES_BOLD</TT> - Times bold. </LI>
|
|
<LI><TT>FL_TIMES_ITALIC</TT> - Times italic. </LI>
|
|
<LI><TT>FL_TIMES_BOLD_ITALIC</TT> - Times bold-italic. </LI>
|
|
<LI><TT>FL_SYMBOL</TT> - Standard symbol font. </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.
|
|
<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_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>
|
|
</UL>
|
|
<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_ARROW</TT> - an arrow pointer </LI>
|
|
<LI><TT>FL_CURSOR_CROSS</TT> - crosshair </LI>
|
|
<LI><TT>FL_CURSOR_WAIT</TT> - watch or hourglass </LI>
|
|
<LI><TT>FL_CURSOR_INSERT</TT> - I-beam </LI>
|
|
<LI><TT>FL_CURSOR_HAND</TT> - hand (uparrow on MSWindows) </LI>
|
|
<LI><TT>FL_CURSOR_HELP</TT> - question mark </LI>
|
|
<LI><TT>FL_CURSOR_MOVE</TT> - 4-pointed arrow </LI>
|
|
<LI><TT>FL_CURSOR_NS</TT> - up/down arrow </LI>
|
|
<LI><TT>FL_CURSOR_WE</TT> - left/right arrow </LI>
|
|
<LI><TT>FL_CURSOR_NWSE</TT> - diagonal arrow </LI>
|
|
<LI><TT>FL_CURSOR_NESW</TT> - diagonal arrow </LI>
|
|
<LI><TT>FL_CURSOR_NONE</TT> - invisible </LI>
|
|
</UL>
|
|
<H2>FD "When" Conditions</H2>
|
|
<UL>
|
|
<LI><TT>FL_READ</TT> - Call the callback when there is data to be
|
|
read. </LI>
|
|
<LI><TT>FL_WRITE</TT> - Call the callback when data can be written
|
|
without blocking. </LI>
|
|
<LI><TT>FL_EXCEPT</TT> - Call the callback if an exception occurs on
|
|
the file. </LI>
|
|
</UL>
|
|
<H2>Damage Masks</H2>
|
|
The following damage mask bits are used by the standard FLTK widgets:
|
|
<UL>
|
|
<LI><TT>FL_DAMAGE_CHILD</TT> - A child needs to be redrawn. </LI>
|
|
<LI><TT>FL_DAMAGE_EXPOSE</TT> - The window was exposed. </LI>
|
|
<LI><TT>FL_DAMAGE_SCROLL</TT> - The <TT>Fl_Scroll</TT> widget was
|
|
scrolled. </LI>
|
|
<LI><TT>FL_DAMAGE_OVERLAY</TT> - The overlay planes need to be redrawn. </LI>
|
|
<LI><TT>FL_DAMAGE_ALL</TT> - Everything needs to be redrawn. </LI>
|
|
</UL>
|
|
</LI>
|
|
</BODY></HTML>
|