Doco updates (more to come)

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1681 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Michael R Sweet
2001-11-05 01:07:34 +00:00
parent 0884e2ba0d
commit 74bff0b300
5 changed files with 382 additions and 262 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

+3 -3
View File
@@ -1,5 +1,5 @@
#HTMLDOC 1.8.14 #HTMLDOC 1.8.16
-t pdf13 -f fltk.pdf --book --toclevels 2 --no-numbered --toctitle "Table of Contents" --title --titleimage FL.gif --linkstyle underline --size Universal --left 1.00in --right 0.50in --top 0.50in --bottom 0.50in --header .t. --footer h.1 --tocheader .t. --tocfooter ..i --duplex --portrait --color --no-pscommands --compression=9 --jpeg=50 --fontsize 11.0 --fontspacing 1.2 --headingfont Helvetica --bodyfont Times --headfootsize 11.0 --headfootfont Helvetica --charset 8859-1 --links --no-truetype --pagemode outline --pagelayout single --firstpage c1 --pageeffect none --pageduration 10 --effectduration 1.0 --no-encryption --permissions all --owner-password "" --user-password "" --browserwidth 680 -t pdf13 -f fltk.pdf --book --toclevels 2 --no-numbered --toctitle "Table of Contents" --title --titleimage FL.gif --linkstyle underline --size Universal --left 1.00in --right 0.50in --top 0.50in --bottom 0.50in --header .t. --footer h.1 --tocheader .t. --tocfooter ..i --duplex --portrait --color --no-pscommands --no-xrxcomments --compression=9 --jpeg=50 --fontsize 11.0 --fontspacing 1.2 --headingfont Helvetica --bodyfont Times --headfootsize 11.0 --headfootfont Helvetica --charset 8859-1 --links --no-truetype --pagemode outline --pagelayout single --firstpage c1 --pageeffect none --pageduration 10 --effectduration 1.0 --no-encryption --permissions all --owner-password "" --user-password "" --browserwidth 680
preface.html preface.html
intro.html intro.html
basics.html basics.html
@@ -13,8 +13,8 @@ opengl.html
widgets.html widgets.html
Fl_Adjuster.html Fl_Adjuster.html
Fl_Box.html Fl_Box.html
Fl_Browser.html
Fl_Browser_.html Fl_Browser_.html
Fl_Browser.html
Fl_Button.html Fl_Button.html
Fl_Chart.html Fl_Chart.html
Fl_Check_Button.html Fl_Check_Button.html
+79 -78
View File
@@ -1,93 +1,94 @@
<HTML> <HTML>
<HEAD><meta name="robots" content="noindex"> <HEAD>
<META NAME="robots" CONTENT="noindex">
<TITLE>FLTK 1.1.0 Programming Manual</TITLE> <TITLE>FLTK 1.1.0 Programming Manual</TITLE>
</HEAD> </HEAD>
<BODY> <BODY>
<TABLE WIDTH=90% BGCOLOR=#9f9f9f CELLPADDING=8 CELLSPACING=0 SUMMARY="TITLE BAR"> <TABLE BGCOLOR="#9f9f9f" CELLPADDING="8" CELLSPACING="0" SUMMARY="TITLE BAR">
<TR> <TR>
<TD ALIGN=CENTER VALIGN=MIDDLE WIDTH=100><IMG SRC="FL.gif" WIDTH=100 HEIGHT=70 ALIGN="ABSMIDDLE" ALT="FL"></TD> <TD ALIGN="CENTER" VALIGN="MIDDLE" WIDTH="200">
<TD ALIGN=CENTER VALIGN=MIDDLE WIDTH=500> <IMG SRC="FL.gif" WIDTH="200" HEIGHT="100" ALIGN="ABSMIDDLE" ALT="FL"></TD>
<H1>FLTK 1.1.0 Programming Manual</H1> <TD ALIGN="CENTER" VALIGN="MIDDLE" WIDTH="500">
Revision 0 by Michael Sweet, Craig P. Earls, and Bill Spitzak<BR> <H1>FLTK 1.1.0 Programming Manual</H1>
Copyright 1998-2001 by Bill Spitzak and others.<BR> <P>Revision 1 by Michael Sweet, Craig P. Earls, and Bill Spitzak<BR>
</TD> Copyright 1998-2001 by Bill Spitzak and others.</P>
</TD>
</TR> </TR>
</TABLE> </TABLE>
<TABLE WIDTH=90% BGCOLOR=#9f9f9f CELLPADDING=8 CELLSPACING=0 SUMMARY="TITLE BAR">
<TABLE BGCOLOR="#9f9f9f" CELLPADDING="8" CELLSPACING="0" SUMMARY="TITLE BAR">
<TR> <TR>
<TD ALIGN=CENTER WIDTH=600> <TD ALIGN="CENTER" WIDTH="600">This software is provided under the terms of the GNU Library General
This software is provided under the terms of the GNU Library General Public License.</TD>
Public License.
</TD>
</TR> </TR>
</TABLE> </TABLE>
<TABLE WIDTH=90% COLS=2 BGCOLOR=#9f9fef CELLPADDING=8 CELLSPACING=0 SUMMARY="Table of Contents">
<TABLE COLS="2" BGCOLOR="#9f9fef" CELLPADDING="8" CELLSPACING="0" SUMMARY="Table of Contents">
<TR> <TR>
<TD ALIGN=LEFT VALIGN=TOP WIDTH=300> <TD ALIGN="LEFT" VALIGN="TOP" WIDTH="300"><B><A HREF="preface.html#preface">Preface</A></B>
<B><A HREF=preface.html#preface>Preface</A></B> <BR>
<BR> <BR>
<BR> <B><A HREF="intro.html#intro">1 - Introduction to FLTK</A></B>
<B><A HREF=intro.html#intro>1 - Introduction to FLTK</A></B> <BR>
<BR> <BR>
<BR> <B><A HREF="basics.html#basics">2 - FLTK Basics</A></B>
<B><A HREF=basics.html#basics>2 - FLTK Basics</A></B> <BR>
<BR> <BR>
<BR> <B><A HREF="common.html#common">3 - Common Widgets and Attributes</A></B>
<B><A HREF=common.html#common>3 - Common Widgets and Attributes</A></B> <UL>
<UL> <LI><A HREF="drawing.html#colors">Colors</A></LI>
<LI><A HREF=drawing.html#colors>Colors</A></LI> <LI><A HREF="common.html#boxtypes">Box Types</A></LI>
<LI><A HREF=common.html#boxtypes>Box Types</A></LI> <LI><A HREF="common.html#labels">Labels and Label Types</A></LI>
<LI><A HREF=common.html#labels>Labels and Label Types</A></LI> <LI><A HREF="drawing.html#images">Images</A></LI>
<LI><A HREF=drawing.html#images>Images</A></LI> <LI><A HREF="drawing.html#Fl_Pixmap">class Fl_Pixmap</A></LI>
<LI><A HREF=drawing.html#Fl_Pixmap>class Fl_Pixmap</A></LI> </UL>
</UL> <B><A HREF="editor.html#editor">4 - Designing a Simple Text Editor</A></B>
<B><A HREF=editor.html#editor>4 - Designing a Simple Text Editor</A></B> <BR>
<BR> <BR>
<BR> <B><A HREF="drawing.html#drawing">5 - Drawing Things in FLTK</A></B>
<B><A HREF=drawing.html#drawing>5 - Drawing Things in FLTK</A></B> <BR>
<BR> <BR>
<BR> <B><A HREF="events.html#events">6 - Handling Events</A></B>
<B><A HREF=events.html#events>6 - Handling Events</A></B> <UL>
<UL> <LI><A HREF="events.html#event_xxx">Fl::event_*() methods</A></LI>
<LI><A HREF=events.html#event_xxx>Fl::event_*() methods</A></LI> <LI><A HREF="events.html#propagation">Event Propagation</A></LI>
<LI><A HREF=events.html#propagation>Event Propagation</A></LI> </UL>
</UL> <B><A HREF="subclassing.html#subclassing">7 - Adding and Extending
<B><A HREF=subclassing.html#subclassing>7 - Adding and Extending Widgets</A></B>
Widgets</A></B> </TD>
</TD> <TD ALIGN=LEFT VALIGN=TOP WIDTH=300>
<TD ALIGN=LEFT VALIGN=TOP WIDTH=300> <B><A HREF="opengl.html#opengl">8 - Using OpenGL</A></B>
<B><A HREF=fluid.html#FLUID>8 - Programming with FLUID</A></B> <BR>
<UL> <BR>
<LI><A HREF=fluid.html#widget_attributes>Widget Attributes</A></LI> <B><A HREF="fluid.html#FLUID">9 - Programming with FLUID</A></B>
<LI><A HREF=fluid.html#widget_attributes>Selecting Moving Widgets</A></LI> <UL>
<LI><A HREF=fluid.html#images>Image Labels</A></LI> <LI><A HREF="fluid.html#widget_attributes">Widget Attributes</A></LI>
</UL> <LI><A HREF="fluid.html#widget_attributes">Selecting Moving Widgets</A></LI>
<B><A HREF=opengl.html#opengl>9 - Using OpenGL</A></B> <LI><A HREF="fluid.html#images">Image Labels</A></LI>
<BR> </UL>
<BR> <B><A HREF="widgets.html#widgets">A - Class Reference</A></B>
<B><A HREF=widgets.html#widgets>A - Widget Reference</A></B> <BR>
<BR> <BR>
<BR> <B><A HREF="functions.html#functions">B - Function Reference</A></B>
<B><A HREF=functions.html#functions>B - Function Reference</A></B> <BR>
<BR> <BR>
<BR> <B><A HREF="enumerations.html#enumerations">C - FLTK Enumerations.H</A>
<B><A HREF=enumerations.html#enumerations>C - FLTK Enumerations.H</A> </B>
</B> <BR>
<BR> <BR>
<BR> <B><A HREF="glut.html#glut">D - GLUT Compatibility</A></B>
<B><A HREF=glut.html#glut>D - GLUT Compatibility</A></B> <UL>
<UL> <LI><A HREF="glut.html#Fl_Glut_Window">class Fl_Glut_Window</A></LI>
<LI><A HREF=glut.html#Fl_Glut_Window>class Fl_Glut_Window</A></LI> </UL>
</UL> <B><A HREF="forms.html#forms">E - Forms Compatibility</A></B>
<B><A HREF=forms.html#forms>E - Forms Compatibility</A></B> <BR>
<BR> <BR>
<BR> <B><A HREF="osissues.html#osissues">F - Operating System Issues</A></B>
<B><A HREF=osissues.html#osissues>F - Operating System Issues</A></B> <BR>
<BR> <BR>
<BR> <B><A HREF="license.html#license">G - Software License</A></B>
<B><A HREF=license.html#license>G - Software License</A></B> </TD>
</TD>
</TR> </TR>
</TABLE> </TABLE>
+225 -142
View File
@@ -1,173 +1,256 @@
<HTML><BODY> <HTML>
<H1 ALIGN=RIGHT><A NAME=intro>1 - Introduction to FLTK</A></H1> <BODY>
The Fast Light Tool Kit (&quot;FLTK&quot;, pronounced &quot;fulltick&quot;) is a LGPL'd <H1 ALIGN="RIGHT"><A NAME="intro">1 - Introduction to FLTK</A></H1>
C++ graphical user interface toolkit for X (UNIX&reg;), OpenGL&reg;, and
Microsoft&reg; Windows&reg; NT 4.0, 95, or 98. It was originally developed by <P>The Fast Light Tool Kit (&quot;FLTK&quot;, pronounced
Mr. Bill Spitzak and is currently maintained by a small group of &quot;fulltick&quot;) is a LGPL'd C++ graphical user interface
developers across the world with a central repository in the US. toolkit for X (UNIX&reg;), OpenGL&reg;, and Microsoft&reg;
Windows&reg; NT 4.0, 95, or 98. It was originally developed by
Mr. Bill Spitzak and is currently maintained by a small group
of developers across the world with a central repository in the
US.</P>
<H2>History of FLTK</H2> <H2>History of FLTK</H2>
It has always been Bill's belief that the GUI API of all modern
systems is much too high level. Toolkits (even FL) are <I>not</I> what <P>It has always been Bill's belief that the GUI API of all modern
should be provided and documented as part of an operating system. The systems is much too high level. Toolkits (even FL) are <I>not</I> what
should be provided and documented as part of an operating system. The
system only has to provide arbitrary shaped but featureless windows, a system only has to provide arbitrary shaped but featureless windows, a
powerful set of graphics drawing calls, and a simple <I>unalterable</I> powerful set of graphics drawing calls, and a simple <I>unalterable</I>
method of delivering events to the owners of the windows. NeXT (if method of delivering events to the owners of the windows. NeXT (if
you ignored NextStep) provided this, but they chose to hide it and you ignored NextStep) provided this, but they chose to hide it and
tried to push their own baroque toolkit instead... tried to push their own baroque toolkit instead...</P>
<P>Many of the ideas in FLTK were developed on a NeXT (but <I>not</I>
using NextStep) in 1987 in a C toolkit Bill called &quot;views&quot;. Here he <P>Many of the ideas in FLTK were developed on a NeXT (but
came up with passing events downward in the tree and having the handle <I>not</I> using NextStep) in 1987 in a C toolkit Bill called
routine return a value indicating the used the event, and the &quot;views&quot;. Here he came up with passing events downward
table-driven menus. In general he was trying to prove that complex UI in the tree and having the handle routine return a value
ideas could be entirely implemented in a user space toolkit, with no indicating the used the event, and the table-driven menus. In
knowledge or support by the system. </P> general he was trying to prove that complex UI ideas could be
<P>After going to film school for a few years, Bill worked at Sun entirely implemented in a user space toolkit, with no knowledge
Microsystems on the (doomed) NeWS project. Here he found an even or support by the system.</P>
better and cleaner windowing system, and he reimplemented &quot;views&quot; atop
that. NeWS did have an unnecessarily complex method of delivering <P>After going to film school for a few years, Bill worked at
events which hurt it. But the designers did admit that perhaps the Sun Microsystems on the (doomed) NeWS project. Here he found an
user could write just as good of a button as they could, and officially even better and cleaner windowing system, and he reimplemented
exposed the lower level interface. </P> &quot;views&quot; atop that. NeWS did have an unnecessarily
<P>With the death of NeWS Bill realized that he would have to live with complex method of delivering events which hurt it. But the
X. The biggest problem with X is the &quot;window manager&quot;, which means designers did admit that perhaps the user could write just as
that the toolkit can no longer control the window borders or drag the good of a button as they could, and officially exposed the
window around. </P> lower level interface.</P>
<P>At Digital Domain Bill discovered another toolkit, &quot;Forms&quot;. Forms
was similar to his work, but provided many more widgets, since it was <P>With the death of NeWS Bill realized that he would have to
used in many real applications, rather then as theoretical work. He live with X. The biggest problem with X is the &quot;window
decided to use Forms, except he integrated his table-driven menus into manager&quot;, which means that the toolkit can no longer
it. Several very large programs were created using this version of control the window borders or drag the window around.</P>
Forms. </P>
<P>The need to switch to OpenGL and GLX, portability, and a desire to <P>At Digital Domain Bill discovered another toolkit,
use C++ subclassing required a rewrite of Forms. This produced the &quot;Forms&quot;. Forms was similar to his work, but provided
first version of FLTK. The conversion to C++ required so many changes many more widgets, since it was used in many real applications,
it made it impossible to recompile any Forms objects. Since it was rather then as theoretical work. He decided to use Forms, except
incompatible anyway, Bill decided to incorporate his older ideas as he integrated his table-driven menus into it. Several very large
much as possible by simplifying the lower level interface and the event programs were created using this version of Forms.</P>
passing mechanisim. </P>
<P>Bill received permission to release it for free on the Internet, <P>The need to switch to OpenGL and GLX, portability, and a
with the GNU general public license. Response from Internet users desire to use C++ subclassing required a rewrite of Forms.
indicated that the Linux market dwarfed the SGI and high-speed GL This produced the first version of FLTK. The conversion to C++
market, so he rewrote it to use X for all drawing, greatly speeding it required so many changes it made it impossible to recompile any
up on these machines. That is the version you have now. </P> Forms objects. Since it was incompatible anyway, Bill decided
<P>Digital Domain has since withdrawn support for FLTK. While Bill is to incorporate his older ideas as much as possible by
no longer able to actively develop it, he still contributes to FLTK in simplifying the lower level interface and the event passing
his free time and is a part of the FLTK development team. </P> mechanisim.</P>
<P>Bill received permission to release it for free on the
Internet, with the GNU general public license. Response from
Internet users indicated that the Linux market dwarfed the SGI
and high-speed GL market, so he rewrote it to use X for all
drawing, greatly speeding it up on these machines. That is the
version you have now.</P>
<P>Digital Domain has since withdrawn support for FLTK. While
Bill is no longer able to actively develop it, he still
contributes to FLTK in his free time and is a part of the FLTK
development team.</P>
<H2>Features</H2> <H2>Features</H2>
FLTK was designed to be statically linked. This was done by splitting
it into many small objects and desigining it so that functions that are <P>FLTK was designed to be statically linked. This was done by
not used do not have pointers to them in the parts that are used, and splitting it into many small objects and designing it so that
thus do not get linked in. This allows you to make an easy-to-install functions that are not used do not have pointers to them in the
program, or to modify FLTK to the exact requirements of your parts that are used, and thus do not get linked in. This allows
application, without worrying about bloat. FLTK works fine as a shared you to make an easy-to-install program or to modify FLTK to
library, though, and has started being included on Linux distributions. the exact requirements of your application without worrying
<P>Here are some of the core features unique to FLTK: </P> about bloat. FLTK works fine as a shared library, though, and
is now included with several Linux distributions.</P>
<P>Here are some of the core features unique to FLTK:</P>
<UL> <UL>
<LI>sizeof(Fl_Widget) == 40 to 48.</LI>
<LI>The &quot;core&quot; (the &quot;hello&quot; program compiled &amp; linked with a static <LI>sizeof(Fl_Widget) == 64 to 92.</LI>
FLTK library using gcc on a 486 and then stripped) is 110K.</LI>
<LI>The FLUID program (which includes every widget) is 372k. <LI>The &quot;core&quot; (the &quot;hello&quot; program
<LI>Written directly atop Xlib (or WIN32) for maximum speed, and compiled &amp; linked with a static FLTK library using
carefully optimized for code size and performance.</LI> gcc on a 486 and then stripped) is 114K.</LI>
<LI>Precise low-level compatability between the X11 and WIN32 version
(only about 10% of the code is different).</LI> <LI>The FLUID program (which includes every widget) is
<LI>Interactive user interface builder program. Output is 538k.</LI>
human-readable and editable C++ source code.</LI>
<LI>Support for X11 overlay hardware (emulation if none and under <LI>Written directly atop Xlib (or WIN32) for maximum
WIN32.)</LI> speed, and carefully optimized for code size and
<LI>Very small &amp; fast portable 2-D drawing library to hide Xlib and performance.</LI>
WIN32.</LI>
<LI>OpenGL/Mesa drawing area widget.</LI> <LI>Precise low-level compatability between the X11 and
<LI>Support for OpenGL overlay hardware on both X11 and WIN32. WIN32 version (only about 10% of the code is
Emulation if none.</LI> different).</LI>
<LI>Text input fields with Emacs key bindings, X cut &amp; paste, and
foreign letter compose!</LI> <LI>Interactive user interface builder program. Output is
<LI>Compatibility header file for the GLUT library.</LI> human-readable and editable C++ source code.</LI>
<LI>Compatibility header file for the XForms library.</LI>
<LI>Much too much to list here...</LI> <LI>Support for overlay hardware, with emulation if none
is available.</LI>
<LI>Very small &amp; fast portable 2-D drawing library
to hide Xlib and WIN32.</LI>
<LI>OpenGL/Mesa drawing area widget.</LI>
<LI>Support for OpenGL overlay hardware on both X11 and
WIN32, with emulation if none is available.</LI>
<LI>Text widgets with Emacs key bindings, X cut &amp;
paste, and foreign letter compose!</LI>
<LI>Compatibility header file for the GLUT library.</LI>
<LI>Compatibility header file for the XForms library.</LI>
</UL> </UL>
<H2>Licensing</H2> <H2>Licensing</H2>
FLTK comes with complete free source code. FLTK is available under the
terms of the <A href="license.html">GNU Library General Public License</A>. <P>FLTK comes with complete free source code. FLTK is available
Contrary to popular belief, it can be used in commercial software! under the terms of the <A href="license.html">GNU Library
(Even Bill Gates could use it.) General Public License</A> with ammendments that allow for
static linking. Contrary to popular belief, it can be used in
commercial software - even Bill Gates could use it!</P>
<H2>What Does &quot;FLTK&quot; Mean?</H2> <H2>What Does &quot;FLTK&quot; Mean?</H2>
FLTK was originally designed to be compatible with the Forms Library
written for SGI machines. In that library all the functions and <P>FLTK was originally designed to be compatible with the Forms
structures started with &quot;fl_&quot;. This naming was extended to all new Library written for SGI machines. In that library all the
methods and widgets in the C++ library, and this prefix was taken as functions and structures started with &quot;fl_&quot;. This
the name of the library. It is almost impossible to search for &quot;FL&quot; on naming was extended to all new methods and widgets in the C++
the Internet, due to the fact that it is also the abbreviation for library, and this prefix was taken as the name of the library.
Florida. After much debating and searching for a new name for the It is almost impossible to search for &quot;FL&quot; on the
toolkit, which was already in use by several people, Bill came up with Internet, due to the fact that it is also the abbreviation for
&quot;FLTK&quot;, and even a bogus excuse that it stands for &quot;The Fast Light Tool Florida. After much debating and searching for a new name for
Kit&quot;. the toolkit, which was already in use by several people, Bill
came up with &quot;FLTK&quot;, including a bogus excuse that it
stands for &quot;The Fast Light Toolkit&quot;.</P>
<H2>Building and Installing FLTK Under UNIX</H2> <H2>Building and Installing FLTK Under UNIX</H2>
In most cases you can just type &quot;make&quot;. This will run configure with
the default of no options and then compile everything. <P>In most cases you can just type &quot;make&quot;. This will
<P>FLTK uses GNU autoconf to configure itself for your UNIX platform. run configure with the default of no options and then compile
The main things that the configure script will look for are the X11 and everything.</P>
OpenGL (or Mesa) header and library files. If these cannot be
found in the standard include/library locations you'll need to define the <P>FLTK uses GNU autoconf to configure itself for your UNIX
<tt>CFLAGS</tt>, <tt>CXXFLAGS</tt>, and <tt>LDFLAGS</tt> environment platform. The main things that the configure script will look
variables. For the Bourne and Korn shells you'd use:</P> for are the X11 and OpenGL (or Mesa) header and library files.
If these cannot be found in the standard include/library
locations you'll need to define the <tt>CFLAGS</tt>,
<tt>CXXFLAGS</tt>, and <tt>LDFLAGS</tt> environment variables.
For the Bourne and Korn shells you'd use:</P>
<UL><PRE> <UL><PRE>
CFLAGS=-I<I>includedir</I>; export CFLAGS CFLAGS=-I<I>includedir</I>; export CFLAGS
CXXFLAGS=-I<I>includedir</I>; export CXXFLAGS CXXFLAGS=-I<I>includedir</I>; export CXXFLAGS
LDFLAGS=-L<I>libdir</I>; export LDFLAGS LDFLAGS=-L<I>libdir</I>; export LDFLAGS
</PRE></UL> </PRE></UL>
For C shell and tcsh, use:
<P>For C shell and tcsh, use:</P>
<UL><PRE> <UL><PRE>
setenv CFLAGS "-I<I>includedir</I>" setenv CFLAGS "-I<I>includedir</I>"
setenv CXXFLAGS "-I<I>includedir</I>" setenv CXXFLAGS "-I<I>includedir</I>"
setenv LDFLAGS "-L<I>libdir</I>" setenv LDFLAGS "-L<I>libdir</I>"
</PRE></UL> </PRE></UL>
By default configure will look for a C++ compiler named <tt>CC</tt>, <tt>c++</tt>,
<tt>g++</tt>, or <tt>gcc</tt> in that order. To use another compiler you need <P>By default configure will look for a C++ compiler named
to set the <tt>CXX</tt> environment variable: <tt>CC</tt>, <tt>c++</tt>, <tt>g++</tt>, or <tt>gcc</tt> in that
order. To use another compiler you need to set the <tt>CXX</tt>
environment variable:</P>
<UL><PRE> <UL><PRE>
CXX=xlC; export xlC CXX=xlC; export CXX
setenv CXX "xlC" setenv CXX "xlC"
</PRE></UL> </PRE></UL>
The <tt>CC</tt> environment variable can also be used to override the
default C compiler (<tt>cc</tt> or <tt>gcc</tt>), which is used for a <P>The <tt>CC</tt> environment variable can also be used to
few FLTK source files. override the default C compiler (<tt>cc</tt> or <tt>gcc</tt>),
<P>You can run configure yourself to get the exact setup you need. Type which is used for a few FLTK source files.</P>
&quot;./configure &lt;options&gt;&quot;, where options are: </P>
<P>You can run configure yourself to get the exact setup you
need. Type &quot;./configure &lt;options&gt;&quot;, where
options are:</P>
<DL> <DL>
<DT>--enable-debug</DT>
<DD>Enable debugging code &amp; symbols</DD> <DT>--enable-debug</DT>
<DT>--enable-shared</DT> <DD>Enable debugging code &amp; symbols</DD>
<DD>Enable generation of shared libraries</DD>
<DT>--bindir=/path</DT> <DT>--enable-shared</DT>
<DD>Set the location for executables [default = /usr/local/bin]</DD> <DD>Enable generation of shared libraries</DD>
<DT>--libdir=/path</DT>
<DD>Set the location for libraries [default = /usr/local/lib]</DD> <DT>--bindir=/path</DT>
<DT>--includedir=/path</DT> <DD>Set the location for executables [default = $prefix/bin]</DD>
<DD>Set the location for include files. [default = /usr/local/include]</DD>
<DT>--prefix=/dir</DT> <DT>--datadir=/path</DT>
<DD>Set the directory prefix for files [default = /usr/local]</DD> <DD>Set the location for data files. [default = $prefix/share]</DD>
<DT>--libdir=/path</DT>
<DD>Set the location for libraries [default = $prefix/lib]</DD>
<DT>--includedir=/path</DT>
<DD>Set the location for include files. [default = $prefix/include]</DD>
<DT>--mandir=/path</DT>
<DD>Set the location for man pages. [default = $prefix/man]</DD>
<DT>--prefix=/dir</DT>
<DD>Set the directory prefix for files [default = /usr/local]</DD>
</DL> </DL>
When the configure script is done you can just run the &quot;make&quot; command.
This will build the library, FLUID tool, and all of the test programs. <P>When the configure script is done you can just run the
<P>To install the library, become root and type &quot;make install&quot;. This &quot;make&quot; command. This will build the library, FLUID
will copy the &quot;fluid&quot; executable to &quot;bindir&quot;, the header files to tool, and all of the test programs.</P>
&quot;includedir&quot;, and the library files to &quot;libdir&quot;. </P>
<P>To install the library, become root and type &quot;make
install&quot;. This will copy the &quot;fluid&quot; executable
to &quot;bindir&quot;, the header files to
&quot;includedir&quot;, and the library files to
&quot;libdir&quot;.</P>
<H2>Building FLTK Under Microsoft Windows</H2> <H2>Building FLTK Under Microsoft Windows</H2>
There are two ways to build FLTK under Microsoft Windows. The first
is to use the Visual C++ 5.0 project files under the &quot;visualc&quot; <P>There are two ways to build FLTK under Microsoft Windows.
directory. Just open (or double-click on) the &quot;fltk.dsw&quot; file to get The first is to use the Visual C++ 5.0 project files under the
the whole shebang. &quot;visualc&quot; directory. Just open (or double-click on)
<P>The second method is to use a GNU-based development tool with the the &quot;fltk.dsw&quot; file to get the whole shebang.</P>
files in the &quot;makefiles&quot; directory. To build using one of these tools
simply copy the appropriate makeinclude and config files to the main <P>The second method is to use a GNU-based development tool with
directory and do a make: </P> the files in the &quot;makefiles&quot; directory. To build
<UL> using one of these tools simply copy the appropriate
<PRE> makeinclude and config files to the main directory and do a
make:</P>
<UL><PRE>
copy makefiles\Makefile.&lt;env&gt; Makefile copy makefiles\Makefile.&lt;env&gt; Makefile
make make
</PRE> </PRE></UL>
</UL>
<H3>Using the Visual C++ DLL Library</H3> <H3>Using the Visual C++ DLL Library</H3>
The &quot;fltkdll.dsp&quot; project file builds a DLL-version of the FLTK The &quot;fltkdll.dsp&quot; project file builds a DLL-version of the FLTK
library. Because of name mangling differences between PC compilers (even library. Because of name mangling differences between PC compilers (even
+75 -39
View File
@@ -2,65 +2,101 @@
<HEAD> <HEAD>
<META CONTENT="Written by Michael Sweet, Craig P. Earls, and Bill Spitzak" NAME="Author"> <META CONTENT="Written by Michael Sweet, Craig P. Earls, and Bill Spitzak" NAME="Author">
<META CONTENT="Copyright 1998-2001 by Bill Spitzak and Others." NAME="Copyright"> <META CONTENT="Copyright 1998-2001 by Bill Spitzak and Others." NAME="Copyright">
<META CONTENT="Revision 0" NAME="DocNumber"> <META CONTENT="Revision 1" NAME="DocNumber">
<TITLE>FLTK 1.1.0 Programming Manual</TITLE> <TITLE>FLTK 1.1.0 Programming Manual</TITLE>
</HEAD> </HEAD>
<BODY> <BODY>
<H1 ALIGN=RIGHT><A NAME=preface>Preface</A></H1> <H1 ALIGN=RIGHT><A NAME=preface>Preface</A></H1>
This manual describes the Fast Light Tool Kit (&quot;FLTK&quot;)
<P>This manual describes the Fast Light Tool Kit (&quot;FLTK&quot;)
version 1.1.0, a C++ Graphical User Interface version 1.1.0, a C++ Graphical User Interface
(&quot;GUI&quot;) toolkit for UNIX and Microsoft Windows. Each (&quot;GUI&quot;) toolkit for UNIX and Microsoft Windows. Each
of the chapters in this manual is designed as a tutorial for of the chapters in this manual is designed as a tutorial for
using FLTK, while the appendices provide a convenient reference using FLTK, while the appendices provide a convenient reference
for all FLTK widgets, functions, and operating system for all FLTK widgets, functions, and operating system
interfaces. interfaces.</P>
<H2>Organization</H2> <H2>Organization</H2>
This manual is organized into the following chapters and appendices:
<P>This manual is organized into the following chapters and appendices:</P>
<UL> <UL>
<LI><A HREF=intro.html#intro>Chapter 1 - Introduction to FLTK</A></LI>
<LI><A HREF=basics.html#basics>Chapter 2 - FLTK Basics</A></LI> <LI><A HREF="intro.html#intro">Chapter 1 - Introduction to FLTK</A></LI>
<LI><A HREF=common.html#common>Chapter 3 - Common Widgets and Attributes</A>
</LI> <LI><A HREF="basics.html#basics">Chapter 2 - FLTK Basics</A></LI>
<LI><A HREF=editor.html#editor>Chapter 4 - Designing a Simple Text
Editor</A></LI> <LI><A HREF="common.html#common">Chapter 3 - Common Widgets and Attributes</A></LI>
<LI><A HREF=drawing.html#drawing>Chapter 5 - Drawing Things in FLTK</A></LI>
<LI><A HREF=events.html#events>Chapter 6 - Handling Events</A></LI> <LI><A HREF="editor.html#editor">Chapter 4 - Designing a Simple Text
<LI><A HREF=subclassing.html#subclassing>Chapter 7 - Extending and Editor</A></LI>
Adding Widgets</A></LI>
<LI><A HREF=fluid.html#fluid>Chapter 8 - Programming With FLUID</A></LI> <LI><A HREF="drawing.html#drawing">Chapter 5 - Drawing Things in FLTK</A></LI>
<LI><A HREF=opengl.html#opengl>Chapter 9 - Using OpenGL</A></LI>
<LI><A HREF=widgets.html#widgets>Appendix A - Widget Reference</A></LI> <LI><A HREF="events.html#events">Chapter 6 - Handling Events</A></LI>
<LI><A HREF=functions.html#functions>Appendix B - Function Reference</A></LI>
<LI><A HREF=enumerations.html#enumerations>Appendix C - Enumeration <LI><A HREF="subclassing.html#subclassing">Chapter 7 - Extending and
Reference</A></LI> Adding Widgets</A></LI>
<LI><A HREF=glut.html#glut>Appendix D - GLUT Compatibility</A></LI>
<LI><A HREF=forms.html#forms>Appendix E - Forms Compatibility</A></LI> <LI><A HREF="opengl.html#opengl">Chapter 8 - Using OpenGL</A></LI>
<LI><A HREF=license.html#license>Appendix F - Operating System Issues</A>
</LI> <LI><A HREF="fluid.html#fluid">Chapter 9 - Programming With FLUID</A></LI>
<LI><A HREF=license.html#license>Appendix G - Software License</A></LI>
<LI><A HREF="widgets.html#widgets">Appendix A - Class Reference</A></LI>
<LI><A HREF="functions.html#functions">Appendix B - Function Reference</A></LI>
<LI><A HREF="enumerations.html#enumerations">Appendix C - Enumeration
Reference</A></LI>
<LI><A HREF="glut.html#glut">Appendix D - GLUT Compatibility</A></LI>
<LI><A HREF="forms.html#forms">Appendix E - Forms Compatibility</A></LI>
<LI><A HREF="license.html#license">Appendix F - Operating System Issues</A></LI>
<LI><A HREF="license.html#license">Appendix G - Software License</A></LI>
</UL> </UL>
<H2>Conventions</H2> <H2>Conventions</H2>
The following typeface conventions are used in this manual:
<P>The following typeface conventions are used in this manual:</P>
<UL> <UL>
<LI>Function and constant names are shown in <B><TT>bold courier type</TT> <LI>Function and constant names are shown in <B><TT>bold courier type</TT></B></LI>
</B></LI>
<LI>Code samples and commands are shown in <TT>regular courier type</TT></LI> <LI>Code samples and commands are shown in <TT>regular courier type</TT></LI>
</UL> </UL>
<H2>Abbreviations</H2> <H2>Abbreviations</H2>
The following abbreviations are used in this manual:
<P>The following abbreviations are used in this manual:</P>
<DL> <DL>
<DT>X11</DT>
<DD>The X Window System version 11.</DD> <DT>X11</DT>
<DT>Xlib</DT> <DD>The X Window System version 11.</DD>
<DD>The X Window System interface library.</DD>
<DT>WIN32</DT> <DT>Xlib</DT>
<DD>The Microsoft Windows 32-bit Application Programmer's Interface.</DD> <DD>The X Window System interface library.</DD>
<DT>WIN32</DT>
<DD>The Microsoft Windows 32-bit Application Programmer's Interface.</DD>
</DL> </DL>
<H2>Copyrights and Trademarks</H2> <H2>Copyrights and Trademarks</H2>
FLTK is Copyright 1998-2001 by Bill Spitzak and others. Use and
<P>FLTK is Copyright 1998-2001 by Bill Spitzak and others. Use and
distribution of FLTK is governed by the GNU Library General Public distribution of FLTK is governed by the GNU Library General Public
License, located in <A HREF=license.html#license>Appendix G</A>. License, located in <A HREF="license.html#license">Appendix G</A>.</P>
<P>UNIX is a registered trademark of the X Open Group, Inc. Microsoft <P>UNIX is a registered trademark of the X Open Group, Inc. Microsoft
and Windows are registered trademarks of Microsoft Corporation. OpenGL and Windows are registered trademarks of Microsoft Corporation. OpenGL
is a registered trademark of Silicon Graphics, Inc. </P> is a registered trademark of Silicon Graphics, Inc. </P>
</BODY></HTML>
</BODY>
</HTML>