more html to doxygen conversion for {enumerations,glut,forms}.dox
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6408 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
0e518f7f49
commit
5abbe21b52
@ -8,305 +8,287 @@
|
||||
|
||||
\sa \ref FL/Enumerations.H.
|
||||
|
||||
<P>This appendix lists the enumerations provided in the
|
||||
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.
|
||||
|
||||
\section enumerations_versions Version Numbers
|
||||
|
||||
<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 3. </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, minor, and patch release numbers, currently 1.0300. </LI>
|
||||
</UL>
|
||||
<H2><A NAME="events">Events</A></H2>
|
||||
Events are identified by an <TT>Fl_Event</TT> enumeration value. The
|
||||
The FLTK version number is stored in a number of compile-time constants:
|
||||
|
||||
\li <tt>FL_MAJOR_VERSION</tt> - The major release number, currently 1.
|
||||
\li <tt>FL_MINOR_VERSION</tt> - The minor release number, currently 3.
|
||||
\li <tt>FL_PATCH_VERSION</tt> - The patch release number, currently 0.
|
||||
\li <tt>FL_VERSION</tt> - A combined floating-point version number for
|
||||
the major, minor, and patch release numbers, currently 1.0300.
|
||||
|
||||
<A NAME="events"> </A> <!-- For old HTML links only ! -->
|
||||
\section enumerations_events Events
|
||||
|
||||
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 (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>
|
||||
<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>
|
||||
<LI><TT>FL_MOUSEWHEEL</TT> - The horizontal or vertical mousewheel was turned. </LI>
|
||||
<LI><TT>FL_DND_ENTER</TT> - The mouse pointer entered a widget dragging data. </LI>
|
||||
<LI><TT>FL_DND_DRAG</TT> - The mouse pointer was moved dragging data. </LI>
|
||||
<LI><TT>FL_DND_LEAVE</TT> - The mouse pointer left a widget still dragging data. </LI>
|
||||
<LI><TT>FL_DND_RELEASE</TT> - Dragged data is about to be dropped. </LI>
|
||||
</UL>
|
||||
<H2><a name=when>Callback "When" Conditions</A></H2>
|
||||
The following constants determine when a callback is performed:
|
||||
<UL>
|
||||
<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
|
||||
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="button_values">Fl::event_button() Values</A></H2>
|
||||
|
||||
<P>The following constants define the button numbers for <TT>FL_PUSH</TT> and
|
||||
<TT>FL_RELEASE</TT> events:
|
||||
\li <tt>FL_NO_EVENT</tt> - No event (or an event fltk does not
|
||||
understand) occurred (0).
|
||||
\li <tt>FL_PUSH</tt> - A mouse button was pushed.
|
||||
\li <tt>FL_RELEASE</tt> - A mouse button was released.
|
||||
\li <tt>FL_ENTER</tt> - The mouse pointer entered a widget.
|
||||
\li <tt>FL_LEAVE</tt> - The mouse pointer left a widget.
|
||||
\li <tt>FL_DRAG</tt> - The mouse pointer was moved with a button pressed.
|
||||
\li <tt>FL_FOCUS</tt> - A widget should receive keyboard focus.
|
||||
\li <tt>FL_UNFOCUS</tt> - A widget loses keyboard focus.
|
||||
\li <tt>FL_KEYBOARD</tt> - A key was pressed.
|
||||
\li <tt>FL_CLOSE</tt> - A window was closed.
|
||||
\li <tt>FL_MOVE</tt> - The mouse pointer was moved with no buttons pressed.
|
||||
\li <tt>FL_SHORTCUT</tt> - The user pressed a shortcut key.
|
||||
\li <tt>FL_DEACTIVATE</tt> - The widget has been deactivated.
|
||||
\li <tt>FL_ACTIVATE</tt> - The widget has been activated.
|
||||
\li <tt>FL_HIDE</tt> - The widget has been hidden.
|
||||
\li <tt>FL_SHOW</tt> - The widget has been shown.
|
||||
\li <tt>FL_PASTE</tt> - The widget should paste the contents of the
|
||||
clipboard.
|
||||
\li <tt>FL_SELECTIONCLEAR</tt> - The widget should clear any selections
|
||||
made for the clipboard.
|
||||
\li <tt>FL_MOUSEWHEEL</tt> - The horizontal or vertical mousewheel was turned.
|
||||
\li <tt>FL_DND_ENTER</tt> - The mouse pointer entered a widget dragging data.
|
||||
\li <tt>FL_DND_DRAG</tt> - The mouse pointer was moved dragging data.
|
||||
\li <tt>FL_DND_LEAVE</tt> - The mouse pointer left a widget still dragging
|
||||
data.
|
||||
\li <tt>FL_DND_RELEASE</tt> - Dragged data is about to be dropped.
|
||||
|
||||
<UL>
|
||||
<LI><TT>FL_LEFT_MOUSE</TT> - the left mouse button
|
||||
<LI><TT>FL_MIDDLE_MOUSE</TT> - the middle mouse button
|
||||
<LI><TT>FL_RIGHT_MOUSE</TT> - the right mouse button
|
||||
</UL>
|
||||
<a name="when"> </A> <!-- For old HTML links only ! -->
|
||||
\section enumerations_when Callback "When" Conditions
|
||||
|
||||
<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_COMMAND</TT> - An alias for <TT>FL_CTRL</TT> on WIN32 and X11, or
|
||||
<TT>FL_META</TT> on MacOS X. </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>
|
||||
<LI><TT>FL_BUTTONS</TT> - Any mouse button is pushed. </LI>
|
||||
<LI><TT>FL_BUTTON(n)</TT> - Mouse button N (N > 0) is pushed. </LI>
|
||||
The following constants determine when a callback is performed:
|
||||
|
||||
\li <tt>FL_WHEN_NEVER</tt> - Never call the callback (0).
|
||||
\li <tt>FL_WHEN_CHANGED</tt> - Do the callback only when the widget
|
||||
value changes.
|
||||
\li <tt>FL_WHEN_NOT_CHANGED</tt> - Do the callback whenever the user
|
||||
interacts with the widget.
|
||||
\li <tt>FL_WHEN_RELEASE</tt> - Do the callback when the button or key
|
||||
is released and the value changes.
|
||||
\li <tt>FL_WHEN_ENTER_KEY</tt> - Do the callback when the user presses
|
||||
the ENTER key and the value changes.
|
||||
\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 <tt>FL_WHEN_ENTER_KEY_ALWAYS</tt> - Do the callback when the user
|
||||
presses the ENTER key, even if the value doesn't change.
|
||||
|
||||
<A NAME="button_values"> </A> <!-- For old HTML links only ! -->
|
||||
\section enumeration_button_values Fl::event_button() Values
|
||||
|
||||
The following constants define the button numbers for <tt>FL_PUSH</tt> and
|
||||
<tt>FL_RELEASE</tt> events:
|
||||
|
||||
\li <tt>FL_LEFT_MOUSE</tt> - the left mouse button
|
||||
\li <tt>FL_MIDDLE_MOUSE</tt> - the middle mouse button
|
||||
\li <tt>FL_RIGHT_MOUSE</tt> - the right mouse button
|
||||
|
||||
<A NAME="key_values"> </A> <!-- For old HTML links only ! -->
|
||||
\section enumerations_event_key Fl::event_key() Values
|
||||
|
||||
The following constants define the non-ASCII keys on the keyboard for <tt>
|
||||
FL_KEYBOARD</tt> and <tt>FL_SHORTCUT</tt> events:
|
||||
|
||||
\li <tt>FL_Button</tt> - A mouse button; use <tt>Fl_Button + n</tt>
|
||||
for mouse button <tt>n</tt>.
|
||||
\li <tt>FL_BackSpace</tt> - The backspace key.
|
||||
\li <tt>FL_Tab</tt> - The tab key.
|
||||
\li <tt>FL_Enter</tt> - The enter key.
|
||||
\li <tt>FL_Pause</tt> - The pause key.
|
||||
\li <tt>FL_Scroll_Lock</tt> - The scroll lock key.
|
||||
\li <tt>FL_Escape</tt> - The escape key.
|
||||
\li <tt>FL_Home</tt> - The home key.
|
||||
\li <tt>FL_Left</tt> - The left arrow key.
|
||||
\li <tt>FL_Up</tt> - The up arrow key.
|
||||
\li <tt>FL_Right</tt> - The right arrow key.
|
||||
\li <tt>FL_Down</tt> - The down arrow key.
|
||||
\li <tt>FL_Page_Up</tt> - The page-up key.
|
||||
\li <tt>FL_Page_Down</tt> - The page-down key.
|
||||
\li <tt>FL_End</tt> - The end key.
|
||||
\li <tt>FL_Print</tt> - The print (or print-screen) key.
|
||||
\li <tt>FL_Insert</tt> - The insert key.
|
||||
\li <tt>FL_Menu</tt> - The menu key.
|
||||
\li <tt>FL_Num_Lock</tt> - The num lock key.
|
||||
\li <tt>FL_KP</tt> - One of the keypad numbers; use <tt>FL_KP + n</tt>
|
||||
for number <tt>n</tt>.
|
||||
\li <tt>FL_KP_Enter</tt> - The enter key on the keypad.
|
||||
\li <tt>FL_F</tt> - One of the function keys; use <tt>FL_F + n</tt>
|
||||
for function key <tt>n</tt>.
|
||||
\li <tt>FL_Shift_L</tt> - The lefthand shift key.
|
||||
\li <tt>FL_Shift_R</tt> - The righthand shift key.
|
||||
\li <tt>FL_Control_L</tt> - The lefthand control key.
|
||||
\li <tt>FL_Control_R</tt> - The righthand control key.
|
||||
\li <tt>FL_Caps_Lock</tt> - The caps lock key.
|
||||
\li <tt>FL_Meta_L</tt> - The left meta/Windows key.
|
||||
\li <tt>FL_Meta_R</tt> - The right meta/Windows key.
|
||||
\li <tt>FL_Alt_L</tt> - The left alt key.
|
||||
\li <tt>FL_Alt_R</tt> - The right alt key.
|
||||
\li <tt>FL_Delete</tt> - The delete key.
|
||||
|
||||
\section enumerations_event_state Fl::event_state() Values
|
||||
|
||||
The following constants define bits in the <tt>Fl::event_state()</tt>
|
||||
value:
|
||||
|
||||
\li <tt>FL_SHIFT</tt> - One of the shift keys is down.
|
||||
\li <tt>FL_CAPS_LOCK</tt> - The caps lock is on.
|
||||
\li <tt>FL_CTRL</tt> - One of the ctrl keys is down.
|
||||
\li <tt>FL_ALT</tt> - One of the alt keys is down.
|
||||
\li <tt>FL_NUM_LOCK</tt> - The num lock is on.
|
||||
\li <tt>FL_META</tt> - One of the meta/Windows keys is down.
|
||||
\li <tt>FL_COMMAND</tt> - An alias for <tt>FL_CTRL</tt> on WIN32 and X11,
|
||||
or <tt>FL_META</tt> on MacOS X.
|
||||
\li <tt>FL_SCROLL_LOCK</tt> - The scroll lock is on.
|
||||
\li <tt>FL_BUTTON1</tt> - Mouse button 1 is pushed.
|
||||
\li <tt>FL_BUTTON2</tt> - Mouse button 2 is pushed.
|
||||
\li <tt>FL_BUTTON3</tt> - Mouse button 3 is pushed.
|
||||
\li <tt>FL_BUTTONS</tt> - Any mouse button is pushed.
|
||||
\li <tt>FL_BUTTON(n)</tt> - Mouse button N (N > 0) is pushed.
|
||||
|
||||
</UL>
|
||||
<!-- NEED 4in -->
|
||||
<H2><a name=align>Alignment Values</A></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 (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_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><a name=fonts>Fonts</A></H2>
|
||||
The following constants define the standard FLTK fonts:
|
||||
<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)
|
||||
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.
|
||||
</ul>
|
||||
<a name="align"> </A> <!-- For old HTML links only ! -->
|
||||
\section enumerations_alignment Alignment Values
|
||||
|
||||
<H2><a name=colors>Colors</A></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:
|
||||
|
||||
<P>The <TT>Fl_Color</TT> enumeration type holds a FLTK color value.
|
||||
\li <tt>FL_ALIGN_CENTER</tt> - The label is centered (0).
|
||||
\li <tt>FL_ALIGN_TOP</tt> - The label is top-aligned.
|
||||
\li <tt>FL_ALIGN_BOTTOM</tt> - The label is bottom-aligned.
|
||||
\li <tt>FL_ALIGN_LEFT</tt> - The label is left-aligned.
|
||||
\li <tt>FL_ALIGN_RIGHT</tt> - The label is right-aligned.
|
||||
\li <tt>FL_ALIGN_CLIP</tt> - The label is clipped to the widget.
|
||||
\li <tt>FL_ALIGN_WRAP</tt> - The label text is wrapped as needed.
|
||||
\li <tt>FL_ALIGN_TOP_LEFT</tt>
|
||||
\li <tt>FL_ALIGN_TOP_RIGHT</tt>
|
||||
\li <tt>FL_ALIGN_BOTTOM_LEFT</tt>
|
||||
\li <tt>FL_ALIGN_BOTTOM_RIGHT</tt>
|
||||
\li <tt>FL_ALIGN_LEFT_TOP</tt>
|
||||
\li <tt>FL_ALIGN_RIGHT_TOP</tt>
|
||||
\li <tt>FL_ALIGN_LEFT_BOTTOM</tt>
|
||||
\li <tt>FL_ALIGN_RIGHT_BOTTOM</tt>
|
||||
\li <tt>FL_ALIGN_INSIDE</tt> - 'or' this with other values to put
|
||||
label inside the widget.
|
||||
|
||||
<a name="fonts"> </A> <!-- For old HTML links only ! -->
|
||||
\section enumerations_fonts Fonts
|
||||
|
||||
The following constants define the standard FLTK fonts:
|
||||
|
||||
\li <tt>FL_HELVETICA</tt> - Helvetica (or Arial) normal (0).
|
||||
\li <tt>FL_HELVETICA_BOLD</tt> - Helvetica (or Arial) bold.
|
||||
\li <tt>FL_HELVETICA_ITALIC</tt> - Helvetica (or Arial) oblique.
|
||||
\li <tt>FL_HELVETICA_BOLD_ITALIC</tt> - Helvetica (or Arial) bold-oblique.
|
||||
\li <tt>FL_COURIER</tt> - Courier normal.
|
||||
\li <tt>FL_COURIER_BOLD</tt> - Courier bold.
|
||||
\li <tt>FL_COURIER_ITALIC</tt> - Courier italic.
|
||||
\li <tt>FL_COURIER_BOLD_ITALIC</tt> - Courier bold-italic.
|
||||
\li <tt>FL_TIMES</tt> - Times roman.
|
||||
\li <tt>FL_TIMES_BOLD</tt> - Times bold.
|
||||
\li <tt>FL_TIMES_ITALIC</tt> - Times italic.
|
||||
\li <tt>FL_TIMES_BOLD_ITALIC</tt> - Times bold-italic.
|
||||
\li <tt>FL_SYMBOL</tt> - Standard symbol font.
|
||||
\li <tt>FL_SCREEN</tt> - Default monospaced screen font.
|
||||
\li <tt>FL_SCREEN_BOLD</tt> - Default monospaced bold screen font.
|
||||
\li <tt>FL_ZAPF_DINGBATS</tt> - Zapf-dingbats font.
|
||||
|
||||
<a name="colors"> </A> <!-- For old HTML links only ! -->
|
||||
\section enumerations_colors Colors
|
||||
|
||||
The <tt>Fl_Color</tt> enumeration type holds a FLTK color value.
|
||||
Colors are either 8-bit indexes into a virtual colormap or 24-bit RGB
|
||||
color values. Color indices occupy the lower 8 bits of the value, while
|
||||
RGB colors occupy the upper 24 bits, for a byte organization of RGBI.
|
||||
|
||||
<H3>Color Constants</H3>
|
||||
\subsection enumerations_color_constants Color Constants
|
||||
|
||||
<P>Constants are defined for the user-defined foreground and background
|
||||
Constants are defined for the user-defined foreground and background
|
||||
colors, as well as specific colors and the start of the grayscale ramp
|
||||
and color cube in the virtual colormap. Inline functions are provided to
|
||||
retrieve specific grayscale, color cube, or RGB color values.
|
||||
|
||||
<P>The following color constants can be used to access the user-defined
|
||||
The following color constants can be used to access the user-defined
|
||||
colors:
|
||||
|
||||
<UL>
|
||||
\li <tt>FL_BACKGROUND_COLOR</tt> - the default background color
|
||||
\li <tt>FL_BACKGROUND2_COLOR</tt> - the default
|
||||
background color for text, list, and valuator widgets
|
||||
\li <tt>FL_FOREGROUND_COLOR</tt> - the default
|
||||
foreground color (0) used for labels and text
|
||||
\li <tt>FL_INACTIVE_COLOR</tt> - the inactive foreground color
|
||||
\li <tt>FL_SELECTION_COLOR</tt> - the default selection/highlight color
|
||||
|
||||
<LI><TT>FL_BACKGROUND_COLOR</TT> - the default
|
||||
background color</LI>
|
||||
|
||||
<LI><TT>FL_BACKGROUND2_COLOR</TT> - the default
|
||||
background color for text, list, and valuator widgets</LI>
|
||||
|
||||
<LI><TT>FL_FOREGROUND_COLOR</TT> - the default
|
||||
foreground color (0) used for labels and text</LI>
|
||||
|
||||
<LI><TT>FL_INACTIVE_COLOR</TT> - the inactive foreground
|
||||
color</LI>
|
||||
|
||||
<LI><TT>FL_SELECTION_COLOR</TT> - the default selection/highlight
|
||||
color</LI>
|
||||
|
||||
</UL>
|
||||
|
||||
<P>The following color constants can be used to access the colors from the
|
||||
The following color constants can be used to access the colors from the
|
||||
FLTK standard color cube:
|
||||
|
||||
<UL>
|
||||
\li <tt>FL_BLACK</tt>
|
||||
\li <tt>FL_BLUE</tt>
|
||||
\li <tt>FL_CYAN</tt>
|
||||
\li <tt>FL_DARK_BLUE</tt>
|
||||
\li <tt>FL_DARK_CYAN</tt>
|
||||
\li <tt>FL_DARK_GREEN</tt>
|
||||
\li <tt>FL_DARK_MAGENTA</tt>
|
||||
\li <tt>FL_DARK_RED</tt>
|
||||
\li <tt>FL_DARK_YELLOW</tt>
|
||||
\li <tt>FL_GREEN</tt>
|
||||
\li <tt>FL_MAGENTA</tt>
|
||||
\li <tt>FL_RED</tt>
|
||||
\li <tt>FL_WHITE</tt>
|
||||
\li <tt>FL_YELLOW</tt>
|
||||
|
||||
<LI><TT>FL_BLACK</TT></LI>
|
||||
<LI><TT>FL_BLUE</TT></LI>
|
||||
<LI><TT>FL_CYAN</TT></LI>
|
||||
<LI><TT>FL_DARK_BLUE</TT></LI>
|
||||
<LI><TT>FL_DARK_CYAN</TT></LI>
|
||||
<LI><TT>FL_DARK_GREEN</TT></LI>
|
||||
<LI><TT>FL_DARK_MAGENTA</TT></LI>
|
||||
<LI><TT>FL_DARK_RED</TT></LI>
|
||||
<LI><TT>FL_DARK_YELLOW</TT></LI>
|
||||
<LI><TT>FL_GREEN</TT></LI>
|
||||
<LI><TT>FL_MAGENTA</TT></LI>
|
||||
<LI><TT>FL_RED</TT></LI>
|
||||
<LI><TT>FL_WHITE</TT></LI>
|
||||
<LI><TT>FL_YELLOW</TT></LI>
|
||||
The inline methods for getting a grayscale, color cube, or
|
||||
RGB color value are described in
|
||||
<A HREF="functions.html#functions">Appendix B - Function Reference</A>.
|
||||
|
||||
</UL>
|
||||
<a name="cursor"> </A> <!-- For old HTML links only ! -->
|
||||
\section enumerations_cursors Cursors
|
||||
|
||||
<P>The inline methods for getting a grayscale, color cube, or
|
||||
RGB color value are described in <A
|
||||
HREF="functions.html#functions">Appendix B - Function
|
||||
Reference</A>.
|
||||
|
||||
<H2><a name=cursor>Cursors</A></H2>
|
||||
|
||||
<P>The following constants define the mouse cursors that are available in
|
||||
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.</P>
|
||||
cursors.
|
||||
|
||||
<UL>
|
||||
|
||||
<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>
|
||||
<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>
|
||||
\li <tt>FL_CURSOR_DEFAULT</tt> - the default cursor, usually an arrow (0)
|
||||
\li <tt>FL_CURSOR_ARROW</tt> - an arrow pointer
|
||||
\li <tt>FL_CURSOR_CROSS</tt> - crosshair
|
||||
\li <tt>FL_CURSOR_WAIT</tt> - watch or hourglass
|
||||
\li <tt>FL_CURSOR_INSERT</tt> - I-beam
|
||||
\li <tt>FL_CURSOR_HAND</tt> - hand (uparrow on MSWindows)
|
||||
\li <tt>FL_CURSOR_HELP</tt> - question mark
|
||||
\li <tt>FL_CURSOR_MOVE</tt> - 4-pointed arrow
|
||||
\li <tt>FL_CURSOR_NS</tt> - up/down arrow
|
||||
\li <tt>FL_CURSOR_WE</tt> - left/right arrow
|
||||
\li <tt>FL_CURSOR_NWSE</tt> - diagonal arrow
|
||||
\li <tt>FL_CURSOR_NESW</tt> - diagonal arrow
|
||||
\li <tt>FL_CURSOR_NONE</tt> - invisible
|
||||
|
||||
</UL>
|
||||
\section enumerations_file_when FD "When" Conditions
|
||||
|
||||
<H2>FD "When" Conditions</H2>
|
||||
\li <tt>FL_READ</tt> - Call the callback when there is data to be
|
||||
read.
|
||||
\li <tt>FL_WRITE</tt> - Call the callback when data can be written
|
||||
without blocking.
|
||||
\li <tt>FL_EXCEPT</tt> - Call the callback if an exception occurs on
|
||||
the file.
|
||||
|
||||
<UL>
|
||||
<a name="damage"> </A> <!-- For old HTML links only ! -->
|
||||
\section enumerations_damage Damage Masks
|
||||
|
||||
<LI><TT>FL_READ</TT> - Call the callback when there is data to be
|
||||
read.</LI>
|
||||
The following damage mask bits are used by the standard FLTK widgets:
|
||||
|
||||
<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><a name=damage>Damage Masks</A></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_USER1</TT> - First user-defined damage bit. </LI>
|
||||
<LI><TT>FL_DAMAGE_USER2</TT> - Second user-defined damage bit. </LI>
|
||||
<LI><TT>FL_DAMAGE_ALL</TT> - Everything needs to be redrawn. </LI>
|
||||
</UL>
|
||||
\li <tt>FL_DAMAGE_CHILD</tt> - A child needs to be redrawn.
|
||||
\li <tt>FL_DAMAGE_EXPOSE</tt> - The window was exposed.
|
||||
\li <tt>FL_DAMAGE_SCROLL</tt> - The <tt>Fl_Scroll</tt> widget was scrolled.
|
||||
\li <tt>FL_DAMAGE_OVERLAY</tt> - The overlay planes need to be redrawn.
|
||||
\li <tt>FL_DAMAGE_USER1</tt> - First user-defined damage bit.
|
||||
\li <tt>FL_DAMAGE_USER2</tt> - Second user-defined damage bit.
|
||||
\li <tt>FL_DAMAGE_ALL</tt> - Everything needs to be redrawn.
|
||||
|
||||
<hr>
|
||||
<a class="el" href="index.html">[Index]</a>
|
||||
|
@ -2,172 +2,205 @@
|
||||
|
||||
\page forms E - Forms Compatibility
|
||||
|
||||
<P>This appendix describes the Forms compatibility included with FLTK.
|
||||
<H2>Importing Forms Layout Files</H2>
|
||||
This appendix describes the Forms compatibility included with FLTK.
|
||||
|
||||
\section forms_importing Importing Forms Layout Files
|
||||
|
||||
<A href=fluid.html#FLUID>FLUID</A> can read the .fd files put out by
|
||||
all versions of Forms and XForms fdesign. However, it will mangle them
|
||||
a bit, but it prints a warning message about anything it does not
|
||||
understand. FLUID cannot write fdesign files, so you should save to a
|
||||
new name so you don't write over the old one.
|
||||
<P>You will need to edit your main code considerably to get it to link
|
||||
|
||||
You will need to edit your main code considerably to get it to link
|
||||
with the output from FLUID. If you are not interested in this you may
|
||||
have more immediate luck with the forms compatibility header, <TT>
|
||||
<FL/forms.H></TT>. </P>
|
||||
<H2>Using the Compatibility Header File</H2>
|
||||
You should be able to compile existing Forms or XForms source code by
|
||||
changing the include directory switch to your compiler so that the <TT>
|
||||
forms.h</TT> file supplied with FLTK is included. Take a look at <TT>
|
||||
forms.h</TT> to see how it works, but the basic trick is lots of inline
|
||||
have more immediate luck with the forms compatibility header, <tt>
|
||||
<FL/forms.H></tt>.
|
||||
|
||||
\section forms_using Using the Compatibility Header File
|
||||
|
||||
You should be able to compile existing Forms or XForms source code by
|
||||
changing the include directory switch to your compiler so that the <tt>
|
||||
forms.h</tt> file supplied with FLTK is included. Take a look at <tt>
|
||||
forms.h</tt> to see how it works, but the basic trick is lots of inline
|
||||
functions. Most of the XForms demo programs work without changes.
|
||||
<P>You will also have to compile your Forms or XForms program using a
|
||||
|
||||
You will also have to compile your Forms or XForms program using a
|
||||
C++ compiler. The FLTK library does not provide C bindings or header
|
||||
files. </P>
|
||||
<P>Although FLTK was designed to be compatible with the GL Forms
|
||||
files.
|
||||
|
||||
Although FLTK was designed to be compatible with the GL Forms
|
||||
library (version 0.3 or so), XForms has bloated severely and it's
|
||||
interface is X-specific. Therefore, XForms compatibility is no longer
|
||||
a goal of FLTK. Compatibility was limited to things that were free, or
|
||||
that would add code that would not be linked in if the feature is
|
||||
unused, or that was not X-specific. </P>
|
||||
<P>To use any new features of FLTK, you should rewrite your code to not
|
||||
unused, or that was not X-specific.
|
||||
|
||||
To use any new features of FLTK, you should rewrite your code to not
|
||||
use the inline functions and instead use "pure" FLTK. This will make
|
||||
it a lot cleaner and make it easier to figure out how to call the FLTK
|
||||
functions. Unfortunately this conversion is harder than expected and
|
||||
even Digital Domain's inhouse code still uses <TT>forms.H</TT> a lot. </P>
|
||||
<H2>Problems You Will Encounter</H2>
|
||||
<P>Many parts of XForms use X-specific structures like <TT>XEvent</TT>
|
||||
in their interface. I did not emulate these! Unfortunately these
|
||||
even Digital Domain's inhouse code still uses <tt>forms.H</tt> a lot.
|
||||
|
||||
\section forms_problems Problems You Will Encounter
|
||||
|
||||
Many parts of XForms use X-specific structures like <tt>XEvent</tt>
|
||||
in their interface. I did not emulate these! Unfortunately these
|
||||
features (such as the "canvas" widget) are needed by most large
|
||||
programs. You will need to rewrite these to use FLTK subclasses. </P>
|
||||
<P><A href=Fl_Free.html#Fl_Free><TT>Fl_Free</TT></A> widgets emulate
|
||||
programs. You will need to rewrite these to use FLTK subclasses.
|
||||
|
||||
<A href=Fl_Free.html#Fl_Free><tt>Fl_Free</tt></A> widgets emulate
|
||||
the <I>old</I> Forms "free" widget. It may be useful for porting
|
||||
programs that change the <TT>handle()</TT> function on widgets, but you
|
||||
will still need to rewrite things. </P>
|
||||
<P><A href=Fl_Timer.html#Fl_Timer><TT>Fl_Timer</TT></A> widgets are
|
||||
programs that change the <tt>handle()</tt> function on widgets, but you
|
||||
will still need to rewrite things.
|
||||
|
||||
<A href=Fl_Timer.html#Fl_Timer><tt>Fl_Timer</tt></A> widgets are
|
||||
provided to emulate the XForms timer. These work, but are quite
|
||||
inefficient and inaccurate compared to using <A href="Fl.html#Fl.add_timeout">
|
||||
<TT>Fl::add_timeout()</TT></A>. </P>
|
||||
<P><I>All instance variables are hidden.</I> If you directly refer to
|
||||
<tt>Fl::add_timeout()</tt></A>.
|
||||
|
||||
<I>All instance variables are hidden.</I> If you directly refer to
|
||||
the x, y, w, h, label, or other fields of your Forms widgets you will
|
||||
have to add empty parenthesis after each reference. The easiest way to
|
||||
do this is to globally replace "->x" with "->x()", etc. Replace
|
||||
"boxtype" with "box()". </P>
|
||||
<P><TT>const char *</TT> arguments to most FLTK methods are simply
|
||||
stored, while Forms would <TT>strdup()</TT> the passed string. This is
|
||||
"boxtype" with "box()".
|
||||
|
||||
<tt>const char *</tt> arguments to most FLTK methods are simply
|
||||
stored, while Forms would <tt>strdup()</tt> the passed string. This is
|
||||
most noticable with the label of widgets. Your program must always
|
||||
pass static data such as a string constant or malloc'd buffer to <TT>
|
||||
label()</TT>. If you are using labels to display program output you
|
||||
may want to try the <A href=Fl_Output.html#Fl_Output><TT>Fl_Output</TT></A>
|
||||
widget. </P>
|
||||
<P>The default fonts and sizes are matched to the older GL version of
|
||||
pass static data such as a string constant or malloc'd buffer to <tt>
|
||||
label()</tt>. If you are using labels to display program output you
|
||||
may want to try the <A href=Fl_Output.html#Fl_Output><tt>Fl_Output</tt></A>
|
||||
widget.
|
||||
|
||||
The default fonts and sizes are matched to the older GL version of
|
||||
Forms, so all labels will draw somewhat larger than an XForms program
|
||||
does. </P>
|
||||
<P>fdesign outputs a setting of a "fdui" instance variable to the main
|
||||
does.
|
||||
|
||||
fdesign outputs a setting of a "fdui" instance variable to the main
|
||||
window. I did not emulate this because I wanted all instance variables
|
||||
to be hidden. You can store the same information in the <TT>user_data()</TT>
|
||||
to be hidden. You can store the same information in the <tt>user_data()</tt>
|
||||
field of a window. To do this, search through the fdesign output for
|
||||
all occurances of "->fdui" and edit to use "->user_data()" instead.
|
||||
This will require casts and is not trivial. </P>
|
||||
<P>The prototype for the functions passed to <TT>fl_add_timeout()</TT>
|
||||
and <TT>fl_set_idle_callback()</TT> callback are different. </P>
|
||||
<P><B>All the following XForms calls are missing:</B></P>
|
||||
<UL>
|
||||
<LI><TT>FL_REVISION</TT>, <TT>fl_library_version()</TT></LI>
|
||||
<LI><TT>FL_RETURN_DBLCLICK</TT> (use <TT>Fl::event_clicks()</TT>) </LI>
|
||||
<LI><TT>fl_add_signal_callback()</TT></LI>
|
||||
<LI><TT>fl_set_form_atactivate()</TT> <TT>fl_set_form_atdeactivate()</TT>
|
||||
</LI>
|
||||
<LI><TT>fl_set_form_property()</TT></LI>
|
||||
<LI><TT>fl_set_app_mainform()</TT>, <TT>fl_get_app_mainform()</TT></LI>
|
||||
<LI><TT>fl_set_form_minsize()</TT>, <TT>fl_set_form_maxsize()</TT></LI>
|
||||
<LI><TT>fl_set_form_event_cmask()</TT>, <TT>fl_get_form_event_cmask()</TT>
|
||||
</LI>
|
||||
<LI><TT>fl_set_form_dblbuffer()</TT>, <TT>fl_set_object_dblbuffer()</TT>
|
||||
(use an <TT>Fl_Double_Window</TT> instead) </LI>
|
||||
<LI><TT>fl_adjust_form_size()</TT></LI>
|
||||
<LI><TT>fl_register_raw_callback()</TT></LI>
|
||||
<LI><TT>fl_set_object_bw()</TT>, <TT>fl_set_border_width()</TT></LI>
|
||||
<LI><TT>fl_set_object_resize()</TT>, <TT>fl_set_object_gravity()</TT></LI>
|
||||
<LI><TT>fl_set_object_shortcutkey()</TT></LI>
|
||||
<LI><TT>fl_set_object_automatic()</TT></LI>
|
||||
<LI><TT>fl_get_object_bbox()</TT> (maybe FLTK should do this) </LI>
|
||||
<LI><TT>fl_set_object_prehandler()</TT>, <TT>fl_set_object_posthandler()</TT>
|
||||
</LI>
|
||||
<LI><TT>fl_enumerate_fonts()</TT></LI>
|
||||
<LI>Most drawing functions </LI>
|
||||
<LI><TT>fl_set_coordunit()</TT> (FLTK uses pixels all the time) </LI>
|
||||
<LI><TT>fl_ringbell()</TT></LI>
|
||||
<LI><TT>fl_gettime()</TT></LI>
|
||||
<LI><TT>fl_win*()</TT> (all these functions) </LI>
|
||||
<LI><TT>fl_initialize(argc,argv,x,y,z)</TT> ignores last 3 arguments </LI>
|
||||
<LI><TT>fl_read_bitmapfile()</TT>, <TT>fl_read_pixmapfile()</TT></LI>
|
||||
<LI><TT>fl_addto_browser_chars()</TT></LI>
|
||||
<LI><TT>FL_MENU_BUTTON</TT> just draws normally </LI>
|
||||
<LI><TT>fl_set_bitmapbutton_file()</TT>, <TT>fl_set_pixmapbutton_file()</TT>
|
||||
</LI>
|
||||
<LI><TT>FL_CANVAS</TT> objects </LI>
|
||||
<LI><TT>FL_DIGITAL_CLOCK</TT> (comes out analog) </LI>
|
||||
<LI><TT>fl_create_bitmap_cursor()</TT>, <TT>fl_set_cursor_color()</TT></LI>
|
||||
<LI><TT>fl_set_dial_angles()</TT></LI>
|
||||
<LI><TT>fl_show_oneliner()</TT></LI>
|
||||
<LI><TT>fl_set_choice_shortcut(a,b,c) </TT></LI>
|
||||
<LI>command log </LI>
|
||||
<LI>Only some of file selector is emulated </LI>
|
||||
<LI><TT>FL_DATE_INPUT</TT></LI>
|
||||
<LI><TT>fl_pup*()</TT> (all these functions) </LI>
|
||||
<LI>textbox object (should be easy but I had no sample programs) </LI>
|
||||
<LI>xyplot object </LI>
|
||||
</UL>
|
||||
<H2>Additional Notes</H2>
|
||||
These notes were written for porting programs written with the older
|
||||
This will require casts and is not trivial.
|
||||
|
||||
The prototype for the functions passed to <tt>fl_add_timeout()</tt>
|
||||
and <tt>fl_set_idle_callback()</tt> callback are different.
|
||||
|
||||
<B>All the following XForms calls are missing:</B>
|
||||
|
||||
\li <tt>FL_REVISION</tt>, <tt>fl_library_version()</tt>
|
||||
\li <tt>FL_RETURN_DBLCLICK</tt> (use <tt>Fl::event_clicks()</tt>)
|
||||
\li <tt>fl_add_signal_callback()</tt>
|
||||
\li <tt>fl_set_form_atactivate()</tt> <tt>fl_set_form_atdeactivate()</tt>
|
||||
\li <tt>fl_set_form_property()</tt>
|
||||
\li <tt>fl_set_app_mainform()</tt>, <tt>fl_get_app_mainform()</tt>
|
||||
\li <tt>fl_set_form_minsize()</tt>, <tt>fl_set_form_maxsize()</tt>
|
||||
\li <tt>fl_set_form_event_cmask()</tt>, <tt>fl_get_form_event_cmask()</tt>
|
||||
\li <tt>fl_set_form_dblbuffer()</tt>, <tt>fl_set_object_dblbuffer()</tt>
|
||||
(use an <tt>Fl_Double_Window</tt> instead)
|
||||
\li <tt>fl_adjust_form_size()</tt>
|
||||
\li <tt>fl_register_raw_callback()</tt>
|
||||
\li <tt>fl_set_object_bw()</tt>, <tt>fl_set_border_width()</tt>
|
||||
\li <tt>fl_set_object_resize()</tt>, <tt>fl_set_object_gravity()</tt>
|
||||
\li <tt>fl_set_object_shortcutkey()</tt>
|
||||
\li <tt>fl_set_object_automatic()</tt>
|
||||
\li <tt>fl_get_object_bbox()</tt> (maybe FLTK should do this)
|
||||
\li <tt>fl_set_object_prehandler()</tt>, <tt>fl_set_object_posthandler()</tt>
|
||||
\li <tt>fl_enumerate_fonts()</tt>
|
||||
\li Most drawing functions
|
||||
\li <tt>fl_set_coordunit()</tt> (FLTK uses pixels all the time)
|
||||
\li <tt>fl_ringbell()</tt>
|
||||
\li <tt>fl_gettime()</tt>
|
||||
\li <tt>fl_win*()</tt> (all these functions)
|
||||
\li <tt>fl_initialize(argc,argv,x,y,z)</tt> ignores last 3 arguments
|
||||
\li <tt>fl_read_bitmapfile()</tt>, <tt>fl_read_pixmapfile()</tt>
|
||||
\li <tt>fl_addto_browser_chars()</tt>
|
||||
\li <tt>FL_MENU_BUTTON</tt> just draws normally
|
||||
\li <tt>fl_set_bitmapbutton_file()</tt>, <tt>fl_set_pixmapbutton_file()</tt>
|
||||
\li <tt>FL_CANVAS</tt> objects
|
||||
\li <tt>FL_DIGITAL_CLOCK</tt> (comes out analog)
|
||||
\li <tt>fl_create_bitmap_cursor()</tt>, <tt>fl_set_cursor_color()</tt>
|
||||
\li <tt>fl_set_dial_angles()</tt>
|
||||
\li <tt>fl_show_oneliner()</tt>
|
||||
\li <tt>fl_set_choice_shortcut(a,b,c) </tt>
|
||||
\li command log
|
||||
\li Only some of file selector is emulated
|
||||
\li <tt>FL_DATE_INPUT</tt>
|
||||
\li <tt>fl_pup*()</tt> (all these functions)
|
||||
\li textbox object (should be easy but I had no sample programs)
|
||||
\li xyplot object
|
||||
|
||||
\section forms_notes Additional Notes
|
||||
|
||||
These notes were written for porting programs written with the older
|
||||
IRISGL version of Forms. Most of these problems are the same ones
|
||||
encountered when going from old Forms to XForms:
|
||||
<H3>Does Not Run In Background</H3>
|
||||
The IRISGL library always forked when you created the first window,
|
||||
|
||||
\par Does Not Run In Background
|
||||
|
||||
The IRISGL library always forked when you created the first window,
|
||||
unless "foreground()" was called. FLTK acts like "foreground()" is
|
||||
called all the time. If you really want the fork behavior do "if
|
||||
(fork()) exit(0)" right at the start of your program.
|
||||
<H3>You Cannot Use IRISGL Windows or fl_queue</H3>
|
||||
If a Forms (not XForms) program if you wanted your own window for
|
||||
|
||||
\par You Cannot Use IRISGL Windows or fl_queue
|
||||
|
||||
If a Forms (not XForms) program if you wanted your own window for
|
||||
displaying things you would create a IRISGL window and draw in it,
|
||||
periodically calling Forms to check if the user hit buttons on the
|
||||
panels. If the user did things to the IRISGL window, you would find
|
||||
this out by having the value FL_EVENT returned from the call to Forms.
|
||||
<P>None of this works with FLTK. Nor will it compile, the necessary
|
||||
calls are not in the interface. </P>
|
||||
<P>You have to make a subclass of <A href=Fl_Gl_Window.html#Fl_Gl_Window>
|
||||
<TT>Fl_Gl_Window</TT></A> and write a <TT>draw()</TT> method and <TT>
|
||||
handle()</TT> method. This may require anywhere from a trivial to a
|
||||
major rewrite. </P>
|
||||
<P>If you draw into the overlay planes you will have to also write a <TT>
|
||||
draw_overlay()</TT> method and call <TT>redraw_overlay()</TT> on the
|
||||
OpenGL window. </P>
|
||||
<P>One easy way to hack your program so it works is to make the <TT>
|
||||
draw()</TT> and <TT>handle()</TT> methods on your window set some
|
||||
|
||||
None of this works with FLTK. Nor will it compile, the necessary
|
||||
calls are not in the interface.
|
||||
|
||||
You have to make a subclass of <A href=Fl_Gl_Window.html#Fl_Gl_Window>
|
||||
<tt>Fl_Gl_Window</tt></A> and write a <tt>draw()</tt> method and <tt>
|
||||
handle()</tt> method. This may require anywhere from a trivial to a
|
||||
major rewrite.
|
||||
|
||||
If you draw into the overlay planes you will have to also write a <tt>
|
||||
draw_overlay()</tt> method and call <tt>redraw_overlay()</tt> on the
|
||||
OpenGL window.
|
||||
|
||||
One easy way to hack your program so it works is to make the <tt>
|
||||
draw()</tt> and <tt>handle()</tt> methods on your window set some
|
||||
static variables, storing what event happened. Then in the main loop
|
||||
of your program, call <TT>Fl::wait()</TT> and then check these
|
||||
variables, acting on them as though they are events read from <TT>
|
||||
fl_queue</TT>. </P>
|
||||
<H3>You Must Use OpenGL to Draw Everything</H3>
|
||||
<P>The file <TT><FL/gl.h></TT> defines replacements for a lot of IRISGL
|
||||
of your program, call <tt>Fl::wait()</tt> and then check these
|
||||
variables, acting on them as though they are events read from <tt>
|
||||
fl_queue</tt>.
|
||||
|
||||
\par You Must Use OpenGL to Draw Everything
|
||||
|
||||
The file <tt><FL/gl.h></tt> defines replacements for a lot of IRISGL
|
||||
calls, translating them to OpenGL. There are much better translators
|
||||
available that you might want to investigate. </P>
|
||||
<H3>You Cannot Make Forms Subclasses</H3>
|
||||
Programs that call <TT>fl_make_object</TT> or directly setting the
|
||||
available that you might want to investigate.
|
||||
|
||||
\par You Cannot Make Forms Subclasses
|
||||
|
||||
Programs that call <tt>fl_make_object</tt> or directly setting the
|
||||
handle routine will not compile. You have to rewrite them to use a
|
||||
subclass of <TT>Fl_Widget</TT>. It is important to note that the <TT>
|
||||
handle()</TT> method is not exactly the same as the <TT>handle()</TT>
|
||||
function of Forms. Where a Forms <TT>handle()</TT> returned non-zero,
|
||||
your <TT>handle()</TT> must call <TT>do_callback()</TT>. And your <TT>
|
||||
handle()</TT> must return non-zero if it "understood" the event.
|
||||
<P>An attempt has been made to emulate the "free" widget. This appears
|
||||
subclass of <tt>Fl_Widget</tt>. It is important to note that the <tt>
|
||||
handle()</tt> method is not exactly the same as the <tt>handle()</tt>
|
||||
function of Forms. Where a Forms <tt>handle()</tt> returned non-zero,
|
||||
your <tt>handle()</tt> must call <tt>do_callback()</tt>. And your <tt>
|
||||
handle()</tt> must return non-zero if it "understood" the event.
|
||||
|
||||
An attempt has been made to emulate the "free" widget. This appears
|
||||
to work quite well. It may be quicker to modify your subclass into a
|
||||
"free" widget, since the "handle" functions match. </P>
|
||||
<P>If your subclass draws into the overlay you are in trouble and will
|
||||
have to rewrite things a lot. </P>
|
||||
<H3>You Cannot Use <device.h></H3>
|
||||
If you have written your own "free" widgets you will probably get a
|
||||
"free" widget, since the "handle" functions match.
|
||||
|
||||
If your subclass draws into the overlay you are in trouble and will
|
||||
have to rewrite things a lot.
|
||||
|
||||
\par You Cannot Use <device.h>
|
||||
|
||||
If you have written your own "free" widgets you will probably get a
|
||||
lot of errors about "getvaluator". You should substitute:
|
||||
<CENTER><TABLE border=1 WIDTH=90% summary="Mapping of Forms valuators to FLTK.">
|
||||
|
||||
<CENTER>
|
||||
<TABLE border=1 WIDTH=90% summary="Mapping of Forms valuators to FLTK.">
|
||||
<TR><TH align=center>Forms</TH><TH align=center>FLTK</TH></TR>
|
||||
<TR><TD>MOUSE_X</TD><TD>Fl::event_x_root()</TD></TR>
|
||||
<TR><TD>MOUSE_Y</TD><TD>Fl::event_y_root()</TD></TR>
|
||||
@ -178,10 +211,14 @@ lot of errors about "getvaluator". You should substitute:
|
||||
<TR><TD>MOUSE1,RIGHTMOUSE</TD><TD>Fl::event_state()</TD></TR>
|
||||
<TR><TD>MOUSE2,MIDDLEMOUSE</TD><TD>Fl::event_state()</TD></TR>
|
||||
<TR><TD>MOUSE3,LEFTMOUSE</TD><TD>Fl::event_state()</TD></TR>
|
||||
</TABLE></CENTER>
|
||||
Anything else in <TT>getvaluator</TT> and you are on your own...
|
||||
<H3>Font Numbers Are Different</H3>
|
||||
The "style" numbers have been changed because I wanted to insert
|
||||
</TABLE>
|
||||
</CENTER>
|
||||
|
||||
Anything else in <tt>getvaluator</tt> and you are on your own...
|
||||
|
||||
\par Font Numbers Are Different
|
||||
|
||||
The "style" numbers have been changed because I wanted to insert
|
||||
bold-italic versions of the normal fonts. If you use Times, Courier,
|
||||
or Bookman to display any text you will get a different font out of
|
||||
FLTK. If you are really desperate to fix this use the following code:
|
||||
|
@ -2,117 +2,155 @@
|
||||
|
||||
\page glut D - GLUT Compatibility
|
||||
|
||||
<P>This appendix describes the GLUT compatibility header file supplied with FLTK. FLTK's GLUT compatibility is based on the original GLUT 3.7 and the follow-on FreeGLUT 2.4.0 libraries.</P>
|
||||
<H2>Using the GLUT Compatibility Header File</H2>
|
||||
<P>You should be able to compile existing GLUT source code by including <TT><FL/glut.H></TT> instead of <TT><GL/glut.h></TT>. This can be done by editing the source, by changing the <TT>-I</TT> switches to the compiler, or by providing a symbolic link from <TT>GL/glut.h</TT> to <TT>FL/glut.H</TT>.</P>
|
||||
<P><I>All files calling GLUT procedures must be compiled with C++</I>. You may have to alter them slightly to get them to compile without warnings, and you may have to rename them to get make to use the C++ compiler.</P>
|
||||
<P>You must link with the FLTK library. Most of <TT>FL/glut.H</TT> is inline functions. You should take a look at it (and maybe at <TT>test/glpuzzle.cxx</TT> in the FLTK source) if you are having trouble porting your GLUT program. </P>
|
||||
<P>This has been tested with most of the demo programs that come with the GLUT and FreeGLUT distributions.</P>
|
||||
<H2>Known Problems</H2>
|
||||
<P>The following functions and/or arguments to functions are missing, and
|
||||
you will have to replace them or comment them out for your code to
|
||||
compile:
|
||||
<UL>
|
||||
<LI><TT>glutGet(GLUT_ELAPSED_TIME)</TT></LI>
|
||||
<LI><TT>glutGet(GLUT_SCREEN_HEIGHT_MM)</TT></LI>
|
||||
<LI><TT>glutGet(GLUT_SCREEN_WIDTH_MM)</TT></LI>
|
||||
<LI><TT>glutGet(GLUT_WINDOW_NUM_CHILDREN)</TT></LI>
|
||||
<LI><TT>glutInitDisplayMode(GLUT_LUMINANCE)</TT></LI>
|
||||
<LI><TT>glutLayerGet(GLUT_HAS_OVERLAY)</TT></LI>
|
||||
<LI><TT>glutLayerGet(GLUT_LAYER_IN_USE)</TT></LI>
|
||||
<LI><TT>glutPushWindow()</TT></LI>
|
||||
<LI><TT>glutSetColor(), glutGetColor(), glutCopyColormap()</TT></LI>
|
||||
<LI><TT>glutVideoResize()</TT> missing. </LI>
|
||||
<LI><TT>glutWarpPointer()</TT></LI>
|
||||
<LI><TT>glutWindowStatusFunc()</TT></LI>
|
||||
<LI>Spaceball, buttonbox, dials, and tablet functions</LI>
|
||||
</UL>
|
||||
Most of the symbols/enumerations have different values than GLUT uses.
|
||||
This will break code that relies on the actual values. The only
|
||||
symbols guaranteed to have the same values are true/false pairs like <TT>
|
||||
GLUT_DOWN</TT> and <TT>GLUT_UP</TT>, mouse buttons <TT>
|
||||
GLUT_LEFT_BUTTON, GLUT_MIDDLE_BUTTON, GLUT_RIGHT_BUTTON</TT>, and <TT>
|
||||
GLUT_KEY_F1</TT> thru <TT>F12</TT>.
|
||||
<P>The strings passed as menu labels are not copied. </P>
|
||||
<P><TT>glutPostRedisplay()</TT> does not work if called from inside a
|
||||
display function. You must use <TT>glutIdleFunc()</TT> if you want
|
||||
your display to update continuously. </P>
|
||||
<P><TT>glutSwapBuffers()</TT> does not work from inside a display
|
||||
function. This is on purpose, because FLTK swaps the buffers for you. </P>
|
||||
<P><TT>glutUseLayer()</TT> does not work well, and should only be used
|
||||
This appendix describes the GLUT compatibility header file supplied with
|
||||
FLTK. FLTK's GLUT compatibility is based on the original GLUT 3.7 and
|
||||
the follow-on FreeGLUT 2.4.0 libraries.
|
||||
|
||||
\section glut_using Using the GLUT Compatibility Header File
|
||||
|
||||
You should be able to compile existing GLUT source code by including
|
||||
<tt><FL/glut.H></tt> instead of <tt><GL/glut.h></tt>. This can be
|
||||
done by editing the source, by changing the <tt>-I</tt> switches to
|
||||
the compiler, or by providing a symbolic link from <tt>GL/glut.h</tt>
|
||||
to <tt>FL/glut.H</tt>.
|
||||
|
||||
<I>All files calling GLUT procedures must be compiled with C++</I>. You
|
||||
may have to alter them slightly to get them to compile without warnings,
|
||||
and you may have to rename them to get make to use the C++ compiler.
|
||||
|
||||
You must link with the FLTK library. Most of <tt>FL/glut.H</tt>
|
||||
is inline functions. You should take a look at it (and maybe at
|
||||
<tt>test/glpuzzle.cxx</tt> in the FLTK source) if you are having trouble
|
||||
porting your GLUT program.
|
||||
|
||||
This has been tested with most of the demo programs that come with
|
||||
the GLUT and FreeGLUT distributions.
|
||||
|
||||
\section glut_known_problems Known Problems
|
||||
|
||||
The following functions and/or arguments to functions are missing,
|
||||
and you will have to replace them or comment them out for your code
|
||||
to compile:
|
||||
|
||||
\li <tt>glutGet(GLUT_ELAPSED_TIME)</tt>
|
||||
\li <tt>glutGet(GLUT_SCREEN_HEIGHT_MM)</tt>
|
||||
\li <tt>glutGet(GLUT_SCREEN_WIDTH_MM)</tt>
|
||||
\li <tt>glutGet(GLUT_WINDOW_NUM_CHILDREN)</tt>
|
||||
\li <tt>glutInitDisplayMode(GLUT_LUMINANCE)</tt>
|
||||
\li <tt>glutLayerGet(GLUT_HAS_OVERLAY)</tt>
|
||||
\li <tt>glutLayerGet(GLUT_LAYER_IN_USE)</tt>
|
||||
\li <tt>glutPushWindow()</tt>
|
||||
\li <tt>glutSetColor(), glutGetColor(), glutCopyColormap()</tt>
|
||||
\li <tt>glutVideoResize()</tt> missing.
|
||||
\li <tt>glutWarpPointer()</tt>
|
||||
\li <tt>glutWindowStatusFunc()</tt>
|
||||
\li Spaceball, buttonbox, dials, and tablet functions
|
||||
|
||||
Most of the symbols/enumerations have different values than GLUT uses.
|
||||
This will break code that relies on the actual values. The only
|
||||
symbols guaranteed to have the same values are true/false pairs like <tt>
|
||||
GLUT_DOWN</tt> and <tt>GLUT_UP</tt>, mouse buttons <tt>
|
||||
GLUT_LEFT_BUTTON, GLUT_MIDDLE_BUTTON, GLUT_RIGHT_BUTTON</tt>, and <tt>
|
||||
GLUT_KEY_F1</tt> thru <tt>F12</tt>.
|
||||
|
||||
The strings passed as menu labels are not copied.
|
||||
|
||||
<tt>glutPostRedisplay()</tt> does not work if called from inside a
|
||||
display function. You must use <tt>glutIdleFunc()</tt> if you want
|
||||
your display to update continuously.
|
||||
|
||||
<tt>glutSwapBuffers()</tt> does not work from inside a display
|
||||
function. This is on purpose, because FLTK swaps the buffers for you.
|
||||
|
||||
<tt>glutUseLayer()</tt> does not work well, and should only be used
|
||||
to initialize transformations inside a resize callback. You should
|
||||
redraw overlays by using <TT>glutOverlayDisplayFunc()</TT>. </P>
|
||||
<P>Overlays are cleared before the overlay display function is called. <TT>
|
||||
glutLayerGet(GLUT_OVERLAY_DAMAGED)</TT> always returns true for
|
||||
redraw overlays by using <tt>glutOverlayDisplayFunc()</tt>.
|
||||
|
||||
Overlays are cleared before the overlay display function is called. <tt>
|
||||
glutLayerGet(GLUT_OVERLAY_DAMAGED)</tt> always returns true for
|
||||
compatibility with some GLUT overlay programs. You must rewrite your
|
||||
code so that <TT>gl_color()</TT> is used to choose colors in an
|
||||
overlay, or you will get random overlay colors. </P>
|
||||
<P><TT>glutSetCursor(GLUT_CURSOR_FULL_CROSSHAIR)</TT> just results in a
|
||||
small crosshair. </P>
|
||||
<P>The fonts used by <TT>glutBitmapCharacter() and glutBitmapWidth()</TT>
|
||||
may be different. </P>
|
||||
<P><TT>glutInit(argc,argv)</TT> will consume different switches than
|
||||
code so that <tt>gl_color()</tt> is used to choose colors in an
|
||||
overlay, or you will get random overlay colors.
|
||||
|
||||
<tt>glutSetCursor(GLUT_CURSOR_FULL_CROSSHAIR)</tt> just results in a
|
||||
small crosshair.
|
||||
|
||||
The fonts used by <tt>glutBitmapCharacter() and glutBitmapWidth()</tt>
|
||||
may be different.
|
||||
|
||||
<tt>glutInit(argc,argv)</tt> will consume different switches than
|
||||
GLUT does. It accepts the switches recognized by <A href="Fl.html#Fl.args">
|
||||
<TT>Fl::args()</TT></A>, and will accept any abbreviation of these
|
||||
switches (such as "-di" for "-display"). </P>
|
||||
<H2>Mixing GLUT and FLTK Code</H2>
|
||||
You can make your GLUT window a child of a <TT>Fl_Window</TT> with the
|
||||
following scheme. The biggest trick is that GLUT insists on <TT>show()</TT>
|
||||
'ing the window at the point it is created, which means the <TT>
|
||||
Fl_Window</TT> parent window must already be shown.
|
||||
<UL>
|
||||
<LI>Don't call <TT>glutInit()</TT>. </LI>
|
||||
<LI>Create your <TT>Fl_Window</TT>, and any FLTK widgets. Leave a
|
||||
blank area in the window for your GLUT window. </LI>
|
||||
<LI><TT>show()</TT> the <TT>Fl_Window</TT>. Perhaps call <TT>
|
||||
show(argc,argv)</TT>. </LI>
|
||||
<LI>Call <TT>window->begin()</TT> so that the GLUT window will be
|
||||
automatically added to it. </LI>
|
||||
<LI>Use <TT>glutInitWindowSize()</TT> and <TT>glutInitWindowPosition()</TT>
|
||||
to set the location in the parent window to put the GLUT window. </LI>
|
||||
<LI>Put your GLUT code next. It probably does not need many changes.
|
||||
Call <TT>window->end()</TT> immediately after the <TT>
|
||||
glutCreateWindow()</TT>! </LI>
|
||||
<LI>You can call either <TT>glutMainLoop()</TT>, <TT>Fl::run()</TT>, or
|
||||
loop calling <TT>Fl::wait()</TT> to run the program. </LI>
|
||||
</UL>
|
||||
<tt>Fl::args()</tt></A>, and will accept any abbreviation of these
|
||||
switches (such as "-di" for "-display").
|
||||
|
||||
\section glut_mixing Mixing GLUT and FLTK Code
|
||||
|
||||
You can make your GLUT window a child of a <tt>Fl_Window</tt> with the
|
||||
following scheme. The biggest trick is that GLUT insists on
|
||||
<tt>show()</tt>'ing the window at the point it is created, which means the
|
||||
<tt>Fl_Window</tt> parent window must already be shown.
|
||||
|
||||
\li Don't call <tt>glutInit()</tt>.
|
||||
\li Create your <tt>Fl_Window</tt>, and any FLTK widgets. Leave a
|
||||
blank area in the window for your GLUT window.
|
||||
\li <tt>show()</tt> the <tt>Fl_Window</tt>. Perhaps call <tt>
|
||||
show(argc,argv)</tt>.
|
||||
\li Call <tt>window->begin()</tt> so that the GLUT window will be
|
||||
automatically added to it.
|
||||
\li Use <tt>glutInitWindowSize()</tt> and <tt>glutInitWindowPosition()</tt>
|
||||
to set the location in the parent window to put the GLUT window.
|
||||
\li Put your GLUT code next. It probably does not need many changes.
|
||||
Call <tt>window->end()</tt> immediately after the
|
||||
<tt>glutCreateWindow()</tt>!
|
||||
\li You can call either <tt>glutMainLoop()</tt>, <tt>Fl::run()</tt>,
|
||||
or loop calling <tt>Fl::wait()</tt> to run the program.
|
||||
|
||||
<HR break>
|
||||
<A NAME="Fl_Glut_Window"></A> <!-- For old HTML links only ! -->
|
||||
\section glut_Fl_Glut_Window class Fl_Glut_Window
|
||||
<HR>
|
||||
<H3>Class Hierarchy</H3>
|
||||
|
||||
\subsection glut_class_hierarchy Class Hierarchy
|
||||
|
||||
\code
|
||||
<A href=Fl_Gl_Window.html#Fl_Gl_Window>Fl_Gl_Window</A>
|
||||
Fl_Gl_Window
|
||||
|
|
||||
+----<B>Fl_Glut_Window</B>
|
||||
+----Fl_Glut_Window
|
||||
\endcode
|
||||
|
||||
<H3>Include Files</H3>
|
||||
\subsection glut_include_files Include Files
|
||||
|
||||
\code
|
||||
#include <FL/glut.H>
|
||||
\endcode
|
||||
|
||||
<H3>Description</H3>
|
||||
Each GLUT window is an instance of this class. You may find it useful
|
||||
\subsection glut_description Description
|
||||
|
||||
Each GLUT window is an instance of this class. You may find it useful
|
||||
to manipulate instances directly rather than use GLUT window id's.
|
||||
These may be created without opening the display, and thus can fit
|
||||
These may be created without opening the display, and thus can fit
|
||||
better into FLTK's method of creating windows.
|
||||
<P>The current GLUT window is available in the global variable <TT>
|
||||
glut_window</TT>. </P>
|
||||
<P><TT>new Fl_Glut_Window(...)</TT> is the same as <TT>
|
||||
glutCreateWindow()</TT> except it does not <TT>show()</TT> the window
|
||||
|
||||
The current GLUT window is available in the global variable <tt>
|
||||
glut_window</tt>. </P>
|
||||
|
||||
<tt>new Fl_Glut_Window(...)</tt> is the same as <tt>
|
||||
glutCreateWindow()</tt> except it does not <tt>show()</tt> the window
|
||||
or make the window current. </P>
|
||||
<P><TT>window->make_current()</TT> is the same as <TT>
|
||||
glutSetWindow(number)</TT>. If the window has not had <TT>show()</TT>
|
||||
called on it yet, some functions that assumme an OpenGL context will
|
||||
not work. If you do <TT>show()</TT> the window, call <TT>make_current()</TT>
|
||||
again to set the context. </P>
|
||||
<P><TT>~Fl_Glut_Window()</TT> is the same as <TT>glutDestroyWindow()</TT>
|
||||
. </P>
|
||||
<H3>Members</H3>
|
||||
The <TT>Fl_Glut_Window</TT> class contains several public members that can
|
||||
|
||||
<tt>window->make_current()</tt> is the same as <tt>glutSetWindow(number)</tt>.
|
||||
If the window has not had <tt>show()</tt> called on it yet, some functions
|
||||
that assumme an OpenGL context will not work.
|
||||
If you do <tt>show()</tt> the window, call <tt>make_current()</tt>
|
||||
again to set the context. </P>
|
||||
|
||||
<tt>~Fl_Glut_Window()</tt> is the same as <tt>glutDestroyWindow()</tt>.
|
||||
|
||||
\subsection glut_members Members
|
||||
|
||||
The <tt>Fl_Glut_Window</tt> class contains several public members that can
|
||||
be altered directly:
|
||||
|
||||
<CENTER><TABLE WIDTH="80%" BORDER="1" ALT="Fl_Glut_Window public members.">
|
||||
<TR>
|
||||
<TH>member</TH>
|
||||
@ -169,25 +207,33 @@ be altered directly:
|
||||
</TR>
|
||||
</TABLE></CENTER>
|
||||
|
||||
<H3>Methods</H3>
|
||||
<UL>
|
||||
<LI><A href=#Fl_Glut_Window.Fl_Glut_Window>Fl_Glut_Window</A></LI>
|
||||
<LI><A href=#Fl_Glut_Window.~Fl_Glut_Window>~Fl_Glut_Window</A></LI>
|
||||
<LI><A href=#Fl_Glut_Window.make_current>make_current</A></LI>
|
||||
</UL>
|
||||
<H4><A name=Fl_Glut_Window.Fl_Glut_Window>
|
||||
\subsection glut_methods Methods
|
||||
|
||||
\li <A href=#Fl_Glut_Window.Fl_Glut_Window>Fl_Glut_Window</A>
|
||||
\li <A href=#Fl_Glut_Window.~Fl_Glut_Window>~Fl_Glut_Window</A>
|
||||
\li <A href=#Fl_Glut_Window.make_current>make_current</A>
|
||||
|
||||
<A name="Fl_Glut_Window.Fl_Glut_Window"></A> <!-- For old HTML links only ! -->
|
||||
Fl_Glut_Window::Fl_Glut_Window(int x, int y, int w, int h, const char
|
||||
*title = 0)
|
||||
<BR> Fl_Glut_Window::Fl_Glut_Window(int w, int h, const char *title = 0)</A>
|
||||
</H4>
|
||||
The first constructor takes 4 int arguments to create the window with
|
||||
*title = 0) <br>
|
||||
Fl_Glut_Window::Fl_Glut_Window(int w, int h, const char *title = 0)
|
||||
|
||||
\par
|
||||
The first constructor takes 4 int arguments to create the window with
|
||||
a preset position and size. The second constructor with 2 arguments
|
||||
will create the window with a preset size, but the window manager will
|
||||
choose the position according to it's own whims.
|
||||
<H4><A name=Fl_Glut_Window.~Fl_Glut_Window>virtual
|
||||
Fl_Glut_Window::~Fl_Glut_Window()</A></H4>
|
||||
Destroys the GLUT window.
|
||||
<H4><A name="Fl_Glut_Window.make_current">void Fl_Glut_Window::make_current()</A></H4>
|
||||
|
||||
<A name="Fl_Glut_Window.~Fl_Glut_Window"> </A> <!-- For old HTML links only ! -->
|
||||
virtual Fl_Glut_Window::~Fl_Glut_Window()
|
||||
|
||||
\par
|
||||
Destroys the GLUT window.
|
||||
|
||||
<A name="Fl_Glut_Window.make_current"> </A> <!-- For old HTML links only ! -->
|
||||
void Fl_Glut_Window::make_current()
|
||||
|
||||
\par
|
||||
Switches all drawing functions to the GLUT window.
|
||||
|
||||
<hr>
|
||||
|
Loading…
Reference in New Issue
Block a user