Doco updates.

Remove unneeded files from the makefiles directory.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1735 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Michael R Sweet 2001-11-26 21:40:14 +00:00
parent c93c134710
commit ecd2c821be
13 changed files with 835 additions and 1261 deletions

View File

@ -78,6 +78,7 @@ CHANGES IN FLTK 1.1.0b6
old FL_PATH_MAX size.
- fl_file_chooser() and fl_dir_chooser() now return a
relative path.
- Fl_Help_View now supports all ampersand escapes.
CHANGES IN FLTK 1.1.0b5

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_Button.H,v 1.5.2.3.2.1 2001/10/29 03:44:31 easysw Exp $"
// "$Id: Fl_Button.H,v 1.5.2.3.2.2 2001/11/26 21:40:14 easysw Exp $"
//
// Button header file for the Fast Light Tool Kit (FLTK).
//
@ -31,6 +31,7 @@
#endif
// values for type()
#define FL_NORMAL_BUTTON 0
#define FL_TOGGLE_BUTTON 1
#define FL_RADIO_BUTTON (FL_RESERVED_TYPE+2)
#define FL_HIDDEN_BUTTON 3 // for Forms compatability
@ -71,5 +72,5 @@ public:
#endif
//
// End of "$Id: Fl_Button.H,v 1.5.2.3.2.1 2001/10/29 03:44:31 easysw Exp $".
// End of "$Id: Fl_Button.H,v 1.5.2.3.2.2 2001/11/26 21:40:14 easysw Exp $".
//

View File

@ -1,70 +1,18 @@
<HTML><BODY>
<HTML>
<BODY>
<H1 ALIGN=RIGHT><A NAME=basics>2 - FLTK Basics</A></H1>
This chapter will teach you the basics of compiling programs that use
FLTK.
<H2>Naming</H2>
All public symbols in FLTK start with the characters 'F' and 'L':
<UL>
<LI>Functions are either <TT>Fl::foo()</TT> or <TT>fl_foo()</TT>. </LI>
<LI>Class and type names are capitalized: <TT>Fl_Foo</TT>. </LI>
<LI><A href=enumerations.html#Enumerations>Constants and enumerations</A>
are uppercase: <TT>FL_FOO</TT>. </LI>
<LI>All header files start with <TT>&lt;FL/...&gt;</TT>. </LI>
</UL>
<H2>Header Files</H2>
The proper way to include FLTK header files is:
<UL>
<PRE>
#include &lt;FL/Fl_xyz.H&gt;
</PRE>
</UL>
<B>Microsoft Windows developers please note:</B> case *is* significant
under other operating systems, and the C standard uses the forward
slash (/) to separate directories. <i>Do not do any of the following:</i>
<UL>
<PRE>
#include &lt;FL\Fl_xyz.H&gt;
#include &lt;fl/fl_xyz.h&gt;
#include &lt;Fl/fl_xyz.h&gt;
</PRE>
</UL>
<H2>Compiling Programs with Standard Compilers</H2>
Under UNIX (and under Microsoft Windows when using the GNU development
tools) you will probably need to tell the compiler where to find the
header files. This is usually done using the <TT>-I</TT> option:
<UL>
<PRE>
CC -I/usr/local/include ...
gcc -I/usr/local/include ...
</PRE>
</UL>
Similarly, when linking your application you will need to tell the
compiler to use the FLTK library:
<UL>
<PRE>
CC ... -L/usr/local/lib -lfltk -lXext -lX11 -lm
gcc ... -L/usr/local/lib -lfltk -lXext -lX11 -lm
</PRE>
</UL>
<H2>Compiling Programs with Microsoft Visual C++</H2>
In Visual C++ you will need to tell the compiler where to find the
FLTK header files. This can be done by selecting &quot;Settings&quot; from the
&quot;Project&quot; menu and then changing the &quot;Preprocessor&quot; settings under the
&quot;C/C++&quot; tab. You will also need to add the FLTK and WinSock (WSOCK32.LIB)
libraries to the &quot;Link&quot; settings.
<P>You can build your Microsoft Windows applications as Console or
WIN32 applications. If you want to use the standard C <TT>main()</TT>
function as the entry point, FLTK includes a <TT>WinMain()</TT>
function that will call your <TT>main()</TT> function for you. </P>
<P><I>Note: The Visual C++ 5.0 optimizer is known to cause problems with
many programs. We only recommend using the &quot;Favor Small Code&quot;
optimization setting.</I> The Visual C++ 6.0 optimizer seems to be much
better and can be used with the "optimized for speed" setting.</P>
<P>This chapter teaches you the basics of compiling programs
that use FLTK.</P>
<H2>Writing Your First FLTK Program</H2>
All programs must include the file <TT>&lt;FL/Fl.H&gt;</TT>. In addition the
program must include a header file for each FLTK class it uses.
Listing 1 shows a simple &quot;Hello, World!&quot; program that uses FLTK to
display the window.
<P>All programs must include the file <TT>&lt;FL/Fl.H&gt;</TT>.
In addition the program must include a header file for each
FLTK class it uses. Listing 1 shows a simple &quot;Hello,
World!&quot; program that uses FLTK to display the window.</P>
<UL>
<P><I>Listing 1 - &quot;hello.cxx&quot;</I>
<PRE>
@ -83,111 +31,256 @@ int main(int argc, char **argv) {
window-&gt;show(argc, argv);
return Fl::run();
}
</PRE>
</UL>
After including the required header files, the program then creates a
window:
<UL>
<PRE>
</PRE></UL>
<P>After including the required header files, the program then creates a
window:</P>
<UL><PRE>
Fl_Window *window = new <A href=Fl_Window.html#Fl_Window>Fl_Window</A>(300,180);
</PRE>
</UL>
and a box with the &quot;Hello, World!&quot; string in it:
<UL>
<PRE>
</PRE></UL>
<P>and a box with the &quot;Hello, World!&quot; string in it:</P>
<UL><PRE>
Fl_Box *box = new <A href=Fl_Box.html#Fl_Box>Fl_Box</A>(20,40,260,100,&quot;Hello, World!&quot;);
</PRE>
</UL>
Next, we set the type of box and the size, font, and style of the label:
<UL>
<PRE>
</PRE></UL>
<P>Next, we set the type of box and the size, font, and style of the label:</P>
<UL><PRE>
box-&gt;box(FL_UP_BOX);
box-&gt;<A href=Fl_Widget.html#Fl_Widget.labelsize>labelsize</A>(36);
box-&gt;<A href=Fl_Widget.html#Fl_Widget.labelfont>labelfont</A>(FL_BOLD+FL_ITALIC);
box-&gt;<A href=Fl_Widget.html#Fl_Widget.labeltype>labeltype</A>(FL_SHADOW_LABEL);
</PRE>
</UL>
Finally, we show the window and enter the FLTK event loop:
<UL>
<PRE>
</PRE></UL>
<P>Finally, we show the window and enter the FLTK event loop:</P>
<UL><PRE>
window-&gt;<A href=Fl_Group.html#Fl_Group.end>end</A>();
window-&gt;<A href=Fl_Window.html#Fl_Window.show>show</A>(argc, argv);
return <A href=functions.html#run>Fl::run</A>();
</PRE>
</UL>
The resulting program will display the window below. You can quit the
program by closing the window or pressing the ESCape key.
<P ALIGN=CENTER><IMG src="hello.C.gif" alt="Hello, World! Window"></P>
</PRE></UL>
<P>The resulting program will display the window in Figure 2-1.
You can quit the program by closing the window or pressing the
<KBD>ESC</KBD>ape key.</P>
<P ALIGN="CENTER"><IMG src="hello.C.gif" alt="Hello, World! Window"><BR>
<I>Figure 2-1: The Hello, World! Window</I></P>
<H3>Creating the Widgets</H3>
The widgets are created using the C++ <TT>new</TT> operator. For
most widgets the arguments to the constructor are:
<UL>
<PRE>
<P>The widgets are created using the C++ <TT>new</TT> operator. For
most widgets the arguments to the constructor are:</P>
<UL><PRE>
Fl_Widget(x, y, width, height, label)
</PRE>
</UL>
<P>The <TT>x</TT> and <TT>y</TT> parameters determine where the widget
or window is placed on the screen. In FLTK the top left corner of the
window or screen is the origin (i.e. x = 0, y = 0) and the units are in
pixels. </P>
<P>The <TT>width</TT> and <TT>height</TT> parameters determine the size
of the widget or window in pixels. The maximum widget size is
typically governed by the underlying window system or hardware. </P>
<p><tt>label</tt> is a pointer to a character string to label the
widget with or <tt>NULL</tt>. If not specified the label defaults to
<tt>NULL</tt>. The label string must be in static storage such as a
string constant because FLTK does not make a copy of it - it just uses
the pointer.
</PRE></UL>
<P>The <TT>x</TT> and <TT>y</TT> parameters determine where the
widget or window is placed on the screen. In FLTK the top left
corner of the window or screen is the origin (i.e. x = 0, y =
0) and the units are in pixels.</P>
<P>The <TT>width</TT> and <TT>height</TT> parameters determine
the size of the widget or window in pixels. The maximum widget
size is typically governed by the underlying window system or
hardware.</P>
<P><tt>label</tt> is a pointer to a character string to label
the widget with or <tt>NULL</tt>. If not specified the label
defaults to <tt>NULL</tt>. The label string must be in static
storage such as a string constant because FLTK does not make a
copy of it - it just uses the pointer.</P>
<H3>Get/Set Methods</H3>
<tt>box-&gt;box(FL_UP_BOX)</tt> sets the type of box the
Fl_Box draws, changing it from the default of <tt>FL_NO_BOX</tt>, which means
that no box is drawn. In our &quot;Hello, World!&quot; example we use <TT>
FL_UP_BOX</TT>, which means that a raised button border will be drawn
around the widget. You can learn more about boxtypes in <A href="common.html#boytypes">
Chapter 3</A>.
<p>You could examine the boxtype in by doing
<tt>box->box()</tt>. Fltk uses method name overloading to make
short names for get/set methods. A "set" method is always of the form
"void&nbsp;name(type)", and a "get" method is always of the form
"type&nbsp;name()&nbsp;const".
<P><tt>box-&gt;box(FL_UP_BOX)</tt> sets the type of box the
Fl_Box draws, changing it from the default of
<tt>FL_NO_BOX</tt>, which means that no box is drawn. In our
&quot;Hello, World!&quot; example we use <TT>FL_UP_BOX</TT>,
which means that a raised button border will be drawn around
the widget. You can learn more about boxtypes in
<A href="common.html#boytypes">Chapter 3</A>.</P>
<P>You could examine the boxtype in by doing
<tt>box->box()</tt>. FLTK uses method name overloading to make
short names for get/set methods. A "set" method is always of
the form "void&nbsp;name(type)", and a "get" method is always
of the form "type&nbsp;name()&nbsp;const".</P>
<H3>Redrawing After Changing Attributes</H3>
<p>Almost all of the set/get pairs are very fast, short inline
functions and thus very efficient. However, <i>the "set" methods do
not call <TT>redraw()</TT></i> - you have to call it yourself. This greatly
reduces code size and execution time. The only common exception is
<tt>value()</tt> which calls <TT>redraw()</TT> if necessary.
<P>Almost all of the set/get pairs are very fast, short inline
functions and thus very efficient. However, <i>the "set"
methods do not call <TT>redraw()</TT></i> - you have to call it
yourself. This greatly reduces code size and execution time.
The only common exception is <tt>value()</tt> which calls
<TT>redraw()</TT> if necessary.</P>
<H3>Labels</H3>
All widgets support labels. In the case of window widgets, the label
is used for the label in the title bar. Our example program calls the <A href=Fl_Widget.html#Fl_Widget.labelfont>
<TT>labelfont</TT></A>, <A href=Fl_Widget.html#Fl_Widget.labelsize><TT>
labelsize</TT></A>, and <A href=Fl_Widget.html#Fl_Widget.labeltype><TT>
labeltype</TT></A> methods.
<P>The <TT>labelfont</TT> method sets the typeface and style that is
used for the label, which for this example we are using <TT>FL_BOLD</TT>
and <TT>FL_ITALIC</TT>. You can also specify typefaces directly. </P>
<P>The <TT>labelsize</TT> method sets the height of the font in pixels. </P>
<P>The <TT>labeltype</TT> method sets the type of label. FLTK supports
normal, embossed, shadowed, symbol, and image labels internally, and
more types can be added as desired. </P>
<P>A complete list of all label options can be found in <A href=common.html#labels>
Chapter 3</A>. </P>
<P>All widgets support labels. In the case of window widgets,
the label is used for the label in the title bar. Our example
program calls the <A href=Fl_Widget.html#Fl_Widget.labelfont>
<TT>labelfont</TT></A>,
<A href=Fl_Widget.html#Fl_Widget.labelsize><TT> labelsize</TT></A>,
and <A href=Fl_Widget.html#Fl_Widget.labeltype><TT>labeltype</TT></A>
methods.</P>
<P>The <TT>labelfont</TT> method sets the typeface and style
that is used for the label, which for this example we are using
<TT>FL_BOLD</TT> and <TT>FL_ITALIC</TT>. You can also specify
typefaces directly. </P> <P>The <TT>labelsize</TT> method sets
the height of the font in pixels. </P> <P>The <TT>labeltype</TT>
method sets the type of label. FLTK supports normal, embossed,
and shadowed labels internally, and more types can be added as
desired.</P>
<P>A complete list of all label options can be found in
<A href="common.html#labels">Chapter 3</A>.</P>
<H3>Showing the Window</H3>
The <TT>show()</TT> method shows the widget or window. For windows
<P>The <TT>show()</TT> method shows the widget or window. For windows
you can also provide the command-line arguments to allow users to
customize the appearance, size, and position of your windows.
customize the appearance, size, and position of your windows.</P>
<H3>The Main Event Loop</H3>
FLTK provides the <A href=functions.html#run><TT>Fl:run()</TT></A>
method to enter a standard event processing loop. This is equivalent
to the following code:
<UL>
<PRE>
<P>All FLTK applications (and most GUI applications in general)
are based on a simple event processing model. User actions such
as mouse movement, button clicks, and keyboard activity generate
events that are sent to an application. The application may then
ignore the events or respond to the user, typically by redrawing
a button in the "down" position, adding the text to an input
field, and so forth.</P>
<P>FLTK also supports idle, timer, and file pseudo-events that
cause a function to be called when they occur. Idle functions
are called when no user input is present and no timers or files
need to be handled - in short, when the application is not doing
anything. Idle callbacks are often used to update a 3D display
or do other background processing.</P>
<P>Timer functions are called after a specific amount of time
has expired. They can be used to pop up a progress dialog after
a certain amount of time or do other things that need to happen
at more-or-less regular intervals. FLTK timers are not 100%
accurate, so they should not be used to measure time intervals,
for example.</P>
<P>File functions are called when data is ready to read or
write, or when an error condition occurs on a file. They are
most often used to monitor network connections (sockets) for
data-driven displays.</P>
<P>FLTK applications must periodically check
(<TT>Fl::check()</TT>) or wait (<TT>Fl::wait()</TT>) for events
or use the <A href="functions.html#run"><TT>Fl:run()</TT></A>
method to enter a standard event processing loop. Calling
<TT>Fl::run()</TT> is equivalent to the following code:</P>
<UL><PRE>
while (Fl::wait());
</PRE>
</PRE></UL>
<P><TT>Fl::run()</TT> does not return until all of the windows
under FLTK control are closed by the user or your program.</P>
<H2>Compiling Programs with Standard Compilers</H2>
<P>Under UNIX (and under Microsoft Windows when using the GNU development
tools) you will probably need to tell the compiler where to find the
header files. This is usually done using the <TT>-I</TT> option:</P>
<UL><PRE>
CC -I/usr/local/include ...
gcc -I/usr/local/include ...
</PRE></UL>
<P>The <TT>fltk-config</TT> script included with FLTK can be
used to get the options that are required by your compiler:</P>
<UL><PRE>
CC `fltk-config --cxxflags` ...
</PRE></UL>
<P>Similarly, when linking your application you will need to tell the
compiler to use the FLTK library:</P>
<UL><PRE>
CC ... -L/usr/local/lib -lfltk -lXext -lX11 -lm
gcc ... -L/usr/local/lib -lfltk -lXext -lX11 -lm
</PRE></UL>
<P>The <TT>fltk-config</TT> script included with FLTK can be
used to get the options that are required by your linker:</P>
<UL><PRE>
CC ... `fltk-config --ldflags`
</PRE></UL>
<H2>Compiling Programs with Microsoft Visual C++</H2>
<P>In Visual C++ you will need to tell the compiler where to
find the FLTK header files. This can be done by selecting
&quot;Settings&quot; from the &quot;Project&quot; menu and then
changing the &quot;Preprocessor&quot; settings under the
&quot;C/C++&quot; tab. You will also need to add the FLTK and
WinSock (WSOCK32.LIB) libraries to the &quot;Link&quot;
settings.</P>
<P>You can build your Microsoft Windows applications as Console or
WIN32 applications. If you want to use the standard C <TT>main()</TT>
function as the entry point, FLTK includes a <TT>WinMain()</TT>
function that will call your <TT>main()</TT> function for you.</P>
<P><I>Note: The Visual C++ 5.0 optimizer is known to cause problems with
many programs. We only recommend using the &quot;Favor Small Code&quot;
optimization setting.</I> The Visual C++ 6.0 optimizer seems to be much
better and can be used with the "optimized for speed" setting.</P>
<H2>Naming</H2>
<P>All public symbols in FLTK start with the characters 'F' and 'L':</P>
<UL>
<LI>Functions are either <TT>Fl::foo()</TT> or
<TT>fl_foo()</TT>.</LI>
<LI>Class and type names are capitalized:
<TT>Fl_Foo</TT>.</LI>
<LI><A href="enumerations.html">Constants and
enumerations</A> are uppercase: <TT>FL_FOO</TT>.</LI>
<LI>All header files start with <TT>&lt;FL/...&gt;</TT>.
</LI>
</UL>
<TT>Fl::run()</TT> does not return until all of the windows under FLTK
control are closed by the user or your program.
<H2>Header Files</H2>
<P>The proper way to include FLTK header files is:</P>
<UL><PRE>
#include &lt;FL/Fl_xyz.H&gt;
</PRE></UL>
<P><B>Microsoft Windows developers please note:</B> case *is*
significant under other operating systems, and the C standard
uses the forward slash (/) to separate directories. <i>Do not
use any of the following include lines:</i></P>
<UL><PRE>
#include &lt;FL\Fl_xyz.H&gt;
#include &lt;fl/fl_xyz.h&gt;
#include &lt;Fl/fl_xyz.h&gt;
</PRE></UL>
</BODY>
</HTML>

View File

@ -1,326 +1,515 @@
<HTML><BODY>
<HTML>
<BODY>
<H1 ALIGN=RIGHT><A NAME=common>3 - Common Widgets and Attributes</A></H1>
This chapter describes many of the widgets that are provided with FLTK
and covers how to query and set the standard attributes.
<P>This chapter describes many of the widgets that are provided
with FLTK and covers how to query and set the standard
attributes.</P>
<H2>Buttons</H2>
FLTK provides many types of buttons:
<P>FLTK provides many types of buttons:</P>
<UL>
<LI><A HREF="Fl_Button.html"><TT>Fl_Button</TT></A> - A standard push button. </LI>
<LI><A HREF="Fl_Check_Button.html"><TT>Fl_Check_Button</TT></A> - A button with a check box. </LI>
<LI><A HREF="Fl_Light_Button.html"><TT>Fl_Light_Button</TT></A> - A push button with a light. </LI>
<LI><A HREF="Fl_Repeat_Button.html"><TT>Fl_Repeat_Button</TT></A> - A push button that repeats when held. </LI>
<LI><A HREF="Fl_Return_Button.html"><TT>Fl_Return_Button</TT></A> - A push button that is activated by the
Enter key. </LI>
<LI><A HREF="Fl_Round_Button.html"><TT>Fl_Round_Button</TT></A> - A button with a check circle. </LI>
<LI><A HREF="Fl_Button.html"><TT>Fl_Button</TT></A> - A
standard push button.</LI>
<LI><A HREF="Fl_Check_Button.html"><TT>Fl_Check_Button</TT></A> -
A button with a check box.</LI>
<LI><A HREF="Fl_Light_Button.html"><TT>Fl_Light_Button</TT></A> -
A push button with a light.</LI>
<LI><A HREF="Fl_Repeat_Button.html"><TT>Fl_Repeat_Button</TT></A> -
A push button that repeats when held.</LI>
<LI><A HREF="Fl_Return_Button.html"><TT>Fl_Return_Button</TT></A> -
A push button that is activated by the <KBD>Enter</KBD> key.</LI>
<LI><A HREF="Fl_Round_Button.html"><TT>Fl_Round_Button</TT></A> -
A button with a radio circle.</LI>
</UL>
<P ALIGN=CENTER><IMG SRC="buttons.gif" ALT="FLTK Buttons">
<P>For all of these buttons you just need to include the corresponding <TT>
&lt;FL/Fl_xyz_Button.H&gt;</TT> header file. The constructor takes the
bounding box of the button and optionally a label string:
<UL>
<PRE>
<P ALIGN="CENTER"><IMG SRC="buttons.gif" ALT="FLTK Buttons"><BR>
Figure 3-1: FLTK Button Widgets</P>
<P>All of these buttons just need the corresponding
<TT>&lt;FL/Fl_xyz_Button.H&gt;</TT> header file. The constructor
takes the bounding box of the button and optionally a label
string:</P>
<UL><PRE>
Fl_Button *button = new Fl_Button(x, y, width, height, &quot;label&quot;);
Fl_Light_Button *lbutton = new Fl_Light_Button(x, y, width, height);
Fl_Round_Button *rbutton = new Fl_Round_Button(x, y, width, height, &quot;label&quot;);
</PRE>
</UL>
Each button has an associated <A href=Fl_Button.html#Fl_Button.type><TT>
type()</TT></A> which allows it to behave as a push button, toggle
button, or radio button:
<UL>
<PRE>
button-&gt;type(0);
</PRE></UL>
<P>Each button has an associated
<A href="Fl_Button.html#Fl_Button.type"><TT>type()</TT></A>
which allows it to behave as a push button, toggle button, or
radio button:</P>
<UL><PRE>
button-&gt;type(FL_NORMAL_BUTTON);
lbutton-&gt;type(FL_TOGGLE_BUTTON);
rbutton-&gt;type(FL_RADIO_BUTTON);
</PRE>
</UL>
For toggle and radio buttons, the <A href=Fl_Button.html#Fl_Button.value>
<TT>value()</TT></A> method returns the current button state (0 = off,
1 = on). The <A href="Fl_Button.html#Fl_Button.set"><TT>set()</TT></A> and <A href="Fl_Button.html#Fl_Button.clear">
<TT>clear()</TT></A> methods can be used on toggle buttons to turn a
toggle button on or off, respectively. Radio buttons can be turned on
with the <A href="Fl_Button.html#Fl_Button.setonly"><TT>setonly()</TT></A> method; this
will also turn off other radio buttons in the same group.
</PRE></UL>
<P>For toggle and radio buttons, the
<A href="Fl_Button.html#Fl_Button.value"><TT>value()</TT></A>
method returns the current button state (0 = off, 1 = on). The
<A href="Fl_Button.html#Fl_Button.set"><TT>set()</TT></A> and
<A href="Fl_Button.html#Fl_Button.clear"><TT>clear()</TT></A>
methods can be used on toggle buttons to turn a toggle button
on or off, respectively. Radio buttons can be turned on with
the
<A href="Fl_Button.html#Fl_Button.setonly"><TT>setonly()</TT></A>
method; this will also turn off other radio buttons in the same
group.</P>
<H2>Text</H2>
FLTK provides several text widgets for displaying and receiving text:
<P>FLTK provides several text widgets for displaying and receiving text:</P>
<UL>
<LI><A HREF="Fl_Input.html"><TT>Fl_Input</TT></A> - A standard one-line text input field. </LI>
<LI><A HREF="Fl_Output.html"><TT>Fl_Output</TT></A> - A standard one-line text output field. </LI>
<LI><A HREF="Fl_Multiline_Input.html"><TT>Fl_Multiline_Input</TT></A> - A standard multi-line text input
field. </LI>
<LI><A HREF="Fl_Multiline_Output.html"><TT>Fl_Multiline_Output</TT></A> - A standard multi-line text output
field. </LI>
<LI><A HREF="Fl_Input.html"><TT>Fl_Input</TT></A> - A
one-line text input field.</LI>
<LI><A HREF="Fl_Output.html"><TT>Fl_Output</TT></A> - A
one-line text output field.</LI>
<LI><A HREF="Fl_Multiline_Input.html"><TT>Fl_Multiline_Input</TT></A>
- A multi-line text input field. </LI>
<LI><A HREF="Fl_Multiline_Output.html"><TT>Fl_Multiline_Output</TT></A>
- A multi-line text output field.</LI>
<LI><A HREF="Fl_Text_Display.html"><TT>Fl_Text_Display</TT></A>
- A multi-line text display widget.</LI>
<LI><A HREF="Fl_Text_Editor.html"><TT>Fl_Text_Editor</TT></A> -
A multi-line text editing widget. </LI>
<LI><A HREF="Fl_Help_View.html"><TT>Fl_Help_View</TT></A> - A
HTML text display widget.</LI>
</UL>
The <TT>Fl_Output</TT> and <TT>Fl_Multiline_Output</TT> widgets allow
the user to copy text from the output field but not change it.
<P>The <A href=Fl_Input.html#Fl_Input.value><TT>value()</TT></A> method
is used to get or set the string that is displayed: </P>
<UL>
<PRE>
<P>The <TT>Fl_Output</TT> and <TT>Fl_Multiline_Output</TT>
widgets allow the user to copy text from the output field but
not change it.</P>
<P>The <A href="Fl_Input.html#Fl_Input.value"><TT>value()</TT></A>
method is used to get or set the string that is displayed:</P>
<UL><PRE>
Fl_Input *input = new Fl_Input(x, y, width, height, &quot;label&quot;);
input-&gt;value(&quot;Now is the time for all good men...&quot;);
</PRE>
</UL>
<p>The string is copied to the widget's own storage when you set the
<tt>value()</tt> of the widget.
</PRE></UL>
<P>The string is copied to the widget's own storage when you set
the <tt>value()</tt> of the widget.</P>
<P>The <TT>Fl_Text_Display</TT> and <TT>Fl_Text_Editor</TT>
widgets use an associated <TT>Fl_Text_Buffer</TT> class for the
value, instead of a simple string.</P>
<H2>Valuators</H2>
Unlike text widgets, valuators keep track of numbers instead of
strings. FLTK provides the following valuators:
<P>Unlike text widgets, valuators keep track of numbers instead of
strings. FLTK provides the following valuators:</P>
<UL>
<LI><A HREF="Fl_Counter.html"><TT>Fl_Counter</TT></A> - A widget with arrow buttons that shows the
current value. </LI>
<LI><A HREF="Fl_Dial.html"><TT>Fl_Dial</TT></A> - A round knob. </LI>
<LI><A HREF="Fl_Roller.html"><TT>Fl_Roller</TT></A> - An SGI-like dolly widget. </LI>
<LI><A HREF="Fl_Scrollbar.html"><TT>Fl_Scrollbar</TT></A> - A standard scrollbar widget. </LI>
<LI><A HREF="Fl_Slider.html"><TT>Fl_Slider</TT></A> - A scrollbar with a knob. </LI>
<LI><A HREF="Fl_Value_Slider.html"><TT>Fl_Value_Slider</TT></A> - A slider that shows the current value. </LI>
<LI><A HREF="Fl_Counter.html"><TT>Fl_Counter</TT></A> - A widget with arrow buttons that shows the
current value. </LI>
<LI><A HREF="Fl_Dial.html"><TT>Fl_Dial</TT></A> - A round knob. </LI>
<LI><A HREF="Fl_Roller.html"><TT>Fl_Roller</TT></A> - An SGI-like dolly widget. </LI>
<LI><A HREF="Fl_Scrollbar.html"><TT>Fl_Scrollbar</TT></A> - A standard scrollbar widget. </LI>
<LI><A HREF="Fl_Slider.html"><TT>Fl_Slider</TT></A> - A scrollbar with a knob. </LI>
<LI><A HREF="Fl_Value_Slider.html"><TT>Fl_Value_Slider</TT></A> - A slider that shows the current value. </LI>
</UL>
<P ALIGN=CENTER><IMG SRC="valuators.gif" ALT="FLTK Valuators"></P>
The <A href=Fl_Valuator.html#Fl_Valuator.value><TT>value()</TT></A>
method gets and sets the current value of the widget. The <A href=Fl_Valuator.html#Fl_Valuator.minimum>
<TT>minimum()</TT></A> and <A href=Fl_Valuator.html#Fl_Valuator.maximum><TT>
maximum()</TT></A> methods set the range of values that are reported by
the widget.
<P ALIGN="CENTER"><IMG SRC="valuators.gif" ALT="FLTK Valuators"><BR>
<I>Figure 3-2: FLTK valuator widgets</I></P>
<P>The <A href="Fl_Valuator.html#Fl_Valuator.value"><TT>value()</TT></A>
method gets and sets the current value of the widget. The
<A href="Fl_Valuator.html#Fl_Valuator.minimum"><TT>minimum()</TT></A>
and <A href="Fl_Valuator.html#Fl_Valuator.maximum"><TT>maximum()</TT></A>
methods set the range of values that are reported by the
widget.</P>
<H2>Groups</H2>
The <TT>Fl_Group</TT> widget class is used as a general purpose
&quot;container&quot; widget. Besides grouping radio buttons, the groups are
used to encapsulate windows, tabs, and scrolled windows. The following
group classes are available with FLTK:
<P>The <TT>Fl_Group</TT> widget class is used as a general
purpose &quot;container&quot; widget. Besides grouping radio
buttons, the groups are used to encapsulate windows, tabs, and
scrolled windows. The following group classes are available
with FLTK:</P>
<UL>
<LI><A HREF="Fl_Double_Window.html"><TT>Fl_Double_Window</TT></A> - A double-buffered window on the screen. </LI>
<LI><A HREF="Fl_Gl_Window.html"><TT>Fl_Gl_Window</TT></A> - An OpenGL window on the screen. </LI>
<LI><A HREF="Fl_Group.html"><TT>Fl_Group</TT></A> - The base container class; can be used to group
any widgets together. </LI>
<LI><A HREF="Fl_Scroll.html"><TT>Fl_Scroll</TT></A> - A scrolled window area. </LI>
<LI><A HREF="Fl_Tabs.html"><TT>Fl_Tabs</TT></A> - Displays child widgets as tabs. </LI>
<LI><A HREF="Fl_Window.html"><TT>Fl_Window</TT></A> - A window on the screen. </LI>
<LI><A HREF="Fl_Double_Window.html"><TT>Fl_Double_Window</TT></A> - A double-buffered window on the screen. </LI>
<LI><A HREF="Fl_Gl_Window.html"><TT>Fl_Gl_Window</TT></A> - An OpenGL window on the screen. </LI>
<LI><A HREF="Fl_Group.html"><TT>Fl_Group</TT></A> - The base container class; can be used to group
any widgets together. </LI>
<LI><A HREF="Fl_Packed.html"><TT>Fl_Pack</TT></A> - A collection of widgets that are packed into the group area.</LI>
<LI><A HREF="Fl_Scroll.html"><TT>Fl_Scroll</TT></A> - A scrolled window area. </LI>
<LI><A HREF="Fl_Tabs.html"><TT>Fl_Tabs</TT></A> - Displays child widgets as tabs. </LI>
<LI><A HREF="Fl_Tile.html"><TT>Fl_Tile</TT></A> - A tiled window area.</LI>
<LI><A HREF="Fl_Window.html"><TT>Fl_Window</TT></A> - A window on the screen. </LI>
</UL>
<H2>Setting the Size and Position of Widgets</H2>
The size and position of widgets is usually set when you create them.
You can access them with the <tt>x()</tt>, <tt>y()</tt>, <tt>w()</tt>,
and <tt>h()</tt> methods.
<p>You can change the size and position by using the <TT>position()</TT>, <TT>
resize()</TT>, and <TT>size()</TT> methods:
<UL>
<PRE>
<P>The size and position of widgets is usually set when you
create them. You can access them with the <tt>x()</tt>,
<tt>y()</tt>, <tt>w()</tt>, and <tt>h()</tt> methods.</P>
<P>You can change the size and position by using the
<TT>position()</TT>, <TT> resize()</TT>, and <TT>size()</TT>
methods:</P>
<UL><PRE>
button-&gt;position(x, y);
group-&gt;resize(x, y, width, height);
window-&gt;size(width, height);
</PRE>
</UL>
If you change a widget's size or position after it is displayed you
will have to call <tt>redraw()</tt> on the widget's parent.
<H2><A NAME=colors>Colors</A></H2>
FLTK stores the colors of widgets as an 8-bit number that is an index
into a color palette of 256 colors. This is <i>not</i> the X or WIN32
colormap, but instead is an internal table with fixed contents.
<p>There are symbols for naming some of the more common colors:
</PRE></UL>
<P>If you change a widget's size or position after it is
displayed you will have to call <tt>redraw()</tt> on the
widget's parent.</P>
<H2><A NAME="colors">Colors</A></H2>
<P>FLTK stores the colors of widgets as an 32-bit unsigned
number that is either an index into a color palette of 256
colors or a 24-bit RGB color. The color palette is <i>not</i>
the X or WIN32 colormap, but instead is an internal table with
fixed contents.</P>
<P>There are symbols for naming some of the more common colors:</P>
<UL>
<LI><TT>FL_BLACK</TT> (this is the default label color)</LI>
<LI><TT>FL_RED</TT></LI>
<LI><TT>FL_GREEN</TT></LI>
<LI><TT>FL_YELLOW</TT></LI>
<LI><TT>FL_BLUE</TT></LI>
<LI><TT>FL_MAGENTA</TT></LI>
<LI><TT>FL_CYAN</TT></LI>
<LI><TT>FL_WHITE</TT> (this is the default background color of text widgets)</LI>
<LI><TT>FL_GRAY</TT> (this is the default background color of most widgets)</LI>
<LI><TT>FL_BLACK</TT> (this is the default label color)</LI>
<LI><TT>FL_RED</TT></LI>
<LI><TT>FL_GREEN</TT></LI>
<LI><TT>FL_YELLOW</TT></LI>
<LI><TT>FL_BLUE</TT></LI>
<LI><TT>FL_MAGENTA</TT></LI>
<LI><TT>FL_CYAN</TT></LI>
<LI><TT>FL_WHITE</TT> (this is the default background color of text widgets)</LI>
<LI><TT>FL_GRAY</TT> (this is the default background color of most widgets)</LI>
</UL>
The widget color can be set using the <TT>color()</TT> method:
<UL>
<PRE>
<P>RGB colors can be set using the <A HREF="drawing.html#fl_rgb_color"><TT>fl_rgb_color()</TT></A>
function:</P>
<UL><PRE>
Fl_Color c = fl_rgb_color(85, 170, 255);
</PRE></UL>
<P>The widget color is set using the <TT>color()</TT> method:</P>
<UL><PRE>
button-&gt;color(FL_RED);
</PRE>
</UL>
Similarly, the label color can be set using the <TT>labelcolor()</TT>
method:
<UL>
<PRE>
</PRE></UL>
<P>Similarly, the label color is set using the <TT>labelcolor()</TT>
method:</P>
<UL><PRE>
button-&gt;labelcolor(FL_WHITE);
</PRE>
</UL>
<H2><A NAME=boxtypes>Box Types</A></H2>
<P>The type <TT>Fl_Boxtype</TT> stored and returned in <A href=Fl_Widget.html#Fl_Widget.box>
<TT>Fl_Widget::box()</TT></A> is an enumeration defined in <A href=enumerations.html#enumerations>
<TT>&lt;Enumerations.H&gt;</TT></A>:
<P ALIGN=CENTER><IMG src="boxtypes.gif" ALT="FLTK Box Types"></P>
</PRE></UL>
<H2><A NAME="boxtypes">Box Types</A></H2>
<P>The type <TT>Fl_Boxtype</TT> stored and returned in
<A href="Fl_Widget.html#Fl_Widget.box"><TT>Fl_Widget::box()</TT></A>
is an enumeration defined in <A href="enumerations.html#enumerations"><TT>&lt;Enumerations.H&gt;</TT></A>.
Figure 3-3 shows the standard box types included with FLTK.</P>
<P ALIGN="CENTER"><IMG src="boxtypes.gif" ALT="FLTK Box Types"><BR>
<I>Figure 3-3: FLTK box types</I></P>
<P><TT>FL_NO_BOX</TT> means nothing is drawn at all, so whatever is
already on the screen remains. The <TT>FL_..._FRAME</TT> types only
draw their edges, leaving the interior unchanged. In the above diagram
the blue color is the area that is not drawn by the box. </P>
<H3>Making your own Boxtypes</H3>
<i>Warning: this interface may change in future versions of fltk!</i>
<p>You can define your own boxtypes by making a small function that draws
the box and adding it to the table of boxtypes.
already on the screen remains. The <TT>FL_..._FRAME</TT> types only
draw their edges, leaving the interior unchanged. The blue color in
Figure 3-3 is the area that is not drawn by the frame types.</P>
<H3>Making Your Own Boxtypes</H3>
<P>You can define your own boxtypes by making a small function that draws
the box and adding it to the table of boxtypes.</P>
<CENTER><TABLE WIDTH="80%" BORDER="1" CELLPADDING="5" CELLSPACING="0" BGCOLOR="#cccccc">
<TR>
<TD><B>Note:</B>
<P>This interface has changed in FLTK 2.0!</P>
</TD>
</TR>
</TABLE></CENTER>
<H4>The Drawing Function</H4>
The drawing function is passed the bounding box and background color
for the widget:
<UL>
<PRE>
<P>The drawing function is passed the bounding box and background color
for the widget:</P>
<UL><PRE>
void xyz_draw(int x, int y, int w, int h, Fl_Color c) {
...
}
</PRE>
</UL>
A simple drawing function might fill a rectangle with the given color
and then draw a black outline:
<UL>
<PRE>
</PRE></UL>
<P>A simple drawing function might fill a rectangle with the
given color and then draw a black outline:</P>
<UL><PRE>
void xyz_draw(int x, int y, int w, int h, Fl_Color c) {
fl_color(c);
fl_rectf(x, y, w, h);
fl_color(FL_BLACK);
fl_rect(x, y, w, h);
}
</PRE>
</UL>
</PRE></UL>
<H4>Adding Your Box Type</H4>
The <TT>Fl::set_boxtype()</TT> method adds or replaces the specified
box type:
<UL>
<PRE>
<P>The <TT>Fl::set_boxtype()</TT> method adds or replaces the
specified box type:</P>
<UL><PRE>
#define XYZ_BOX FL_FREE_BOXTYPE
Fl::set_boxtype(XYZ_BOX, xyz_draw, 1, 1, 2, 2);
</PRE>
</UL>
The last 4 arguments to <TT>Fl::set_boxtype()</TT> are the offsets for
the bounding box that should be subtracted when drawing the label
inside the box.
<H2><A NAME=labels>Labels and Label Types</A></H2>
The <TT>label()</TT>, <TT>align()</TT>, <TT>labelfont()</TT>, <TT>
labelsize()</TT>, and <TT>labeltype()</TT> methods control the labeling
of widgets.
</PRE></UL>
<P>The last 4 arguments to <TT>Fl::set_boxtype()</TT> are the
offsets for the x, y, width, and height values that should be
subtracted when drawing the label inside the box.</P>
<H2><A NAME="labels">Labels and Label Types</A></H2>
<P>The <TT>label()</TT>, <TT>align()</TT>, <TT>labelfont()</TT>,
<TT>labelsize()</TT>, <TT>labeltype()</TT>, <TT>image()</TT>, and
<TT>deimage()</TT> methods control the labeling of widgets.</P>
<H3>label()</H3>
The <TT>label()</TT> method sets the string that is displayed for the
label. For the <TT>FL_SYMBOL_LABEL</TT> and image label types the
string contains the actual symbol or image data.
<P>The <TT>label()</TT> method sets the string that is displayed
for the label. Symbols can be included with the label string by
escaping them using the "@" symbol - "@@" displays a single at
sign. Figure 3-4 shows the available symbols.</P>
<P ALIGN="CENTER"><IMG src="symbols.gif" ALT="FLTK Symbols"><BR>
<I>Figure 3-4: FLTK label symbols</I></P>
<P>The @ sign may also be followed by the following optional
&quot;formatting&quot; characters, in this order:</P>
<UL>
<LI>'#' forces square scaling, rather than distortion to
the widget's shape.</LI>
<LI>+[1-9] or -[1-9] tweaks the scaling a little bigger
or smaller.</LI>
<LI>[1-9] - rotates by a multiple of 45 degrees. '6'
does nothing, the others point in the direction of
that key on a numeric keypad.</LI>
</UL>
<H3>align()</H3>
The <TT>align()</TT> method positions the label. The following
constants are defined (they may be OR'd together as needed):
<P>The <TT>align()</TT> method positions the label. The following
constants are defined and may be OR'd together as needed:</P>
<UL>
<LI><TT>FL_ALIGN_CENTER</TT> - center the label in the widget. </LI>
<LI><TT>FL_ALIGN_TOP</TT> - align the label at the top of the widget. </LI>
<LI><TT>FL_ALIGN_BOTTOM</TT> - align the label at the bottom of the
widget. </LI>
<LI><TT>FL_ALIGN_LEFT</TT> - align the label to the left of the widget. </LI>
<LI><TT>FL_ALIGN_RIGHT</TT> - align the label to the right of the
widget. </LI>
<LI><TT>FL_ALIGN_INSIDE</TT> - align the label inside the widget. </LI>
<LI><TT>FL_ALIGN_CLIP</TT> - clip the label to the widget's bounding
box. </LI>
<LI><TT>FL_ALIGN_WRAP</TT> - wrap the label text as needed. </LI>
<LI><TT>FL_ALIGN_CENTER</TT> - center the label in the widget.</LI>
<LI><TT>FL_ALIGN_TOP</TT> - align the label at the top of the widget.</LI>
<LI><TT>FL_ALIGN_BOTTOM</TT> - align the label at the bottom of the
widget.</LI>
<LI><TT>FL_ALIGN_LEFT</TT> - align the label to the left of the widget.</LI>
<LI><TT>FL_ALIGN_RIGHT</TT> - align the label to the right of the
widget.</LI>
<LI><TT>FL_ALIGN_INSIDE</TT> - align the label inside the widget.</LI>
<LI><TT>FL_ALIGN_CLIP</TT> - clip the label to the widget's bounding
box.</LI>
<LI><TT>FL_ALIGN_WRAP</TT> - wrap the label text as needed.</LI>
<LI><TT>FL_TEXT_OVER_IMAGE</TT> - show the label text over the image.</LI>
<LI><TT>FL_IMAGE_OVER_TEXT</TT> - show the label image over the text (default).</LI>
</UL>
<H3><A NAME="labeltypes">labeltype()</A></H3>
The <TT>labeltype()</TT> method sets the type of the label. The
following standard label types are included:
<P>The <TT>labeltype()</TT> method sets the type of the label. The
following standard label types are included:</P>
<UL>
<LI><TT>FL_NORMAL_LABEL</TT> - draws the text. </LI>
<LI><TT>FL_NO_LABEL</TT> - does nothing </LI>
<LI><TT>FL_SYMBOL_LABEL</TT> - draws &quot;@xyz&quot; labels, see &quot;<A href=#symbols>
Symbol Labels</A>&quot; </LI>
<LI><TT>FL_SHADOW_LABEL</TT> - draws a drop shadow under the text </LI>
<LI><TT>FL_ENGRAVED_LABEL</TT> - draws edges as though the text is
engraved </LI>
<LI><TT>FL_EMBOSSED_LABEL</TT> - draws edges as thought the text is
raised </LI>
<LI><TT>FL_NORMAL_LABEL</TT> - draws the text.</LI>
<LI><TT>FL_NO_LABEL</TT> - does nothing.</LI>
<LI><TT>FL_SHADOW_LABEL</TT> - draws a drop shadow under
the text.</LI>
<LI><TT>FL_ENGRAVED_LABEL</TT> - draws edges as though
the text is engraved.</LI>
<LI><TT>FL_EMBOSSED_LABEL</TT> - draws edges as thought
the text is raised.</LI>
<LI><TT>FL_ICON_LABEL</TT> - draws the icon associated
with the text.</LI>
</UL>
To make bitmaps or pixmaps you use a method on the <A href=drawing.html#Fl_Bitmap>
<TT>Fl_Bitmap</TT></A> or <A href=drawing.html#Fl_Pixmap><TT>Fl_Pixmap</TT>
</A> objects.
<H3>image() and deimage()</H3>
<P>The <TT>image()</TT> and <TT>deimage()</TT> methods set an image that
will be displayed with the widget. The <TT>deimage()</TT> method sets the
image that is shown when the widget is inactive, while the <TT>image()</TT>
method sets the image that is shown when the widget is active.</P>
<P>To make an image you use a subclass of
<A HREF="drawing.html#Fl_Image"><TT>Fl_Image</TT></A>.</P>
<H4>Making Your Own Label Types</H4>
<i>Warning: this interface is changing in FLTK 2.0!</i>
<p>Label types are actually indexes into a table of functions that draw
them. The primary purpose of this is to let you reuse the <TT>label()</TT>
pointer as a pointer to arbitrary data such as a bitmap or pixmap. You
can also use this to draw the labels in ways inaccessible through the <TT>
fl_font</TT> mechanisim (e.g. <TT>FL_ENGRAVED_LABEL</TT>) or with
program-generated letters or symbology.
<P>Label types are actually indexes into a table of functions
that draw them. The primary purpose of this is to use this to
draw the labels in ways inaccessible through the
<TT>fl_font</TT> mechanisim (e.g. <TT>FL_ENGRAVED_LABEL</TT>) or
with program-generated letters or symbology.</P>
<CENTER><TABLE WIDTH="80%" BORDER="1" CELLPADDING="5" CELLSPACING="0" BGCOLOR="#cccccc">
<TR>
<TD><B>Note:</B>
<P>This interface has changed in FLTK 2.0!</P>
</TD>
</TR>
</TABLE></CENTER>
<H5>Label Type Functions</H5>
To setup your own label type you will need to write two functions to
draw and measure the label. The draw function is called with a pointer
to a <TT>Fl_Label</TT> structure containing the
label information, the bounding box for the label, and the label
alignment:
<UL>
<PRE>
<P>To setup your own label type you will need to write two
functions: one to draw and one to measure the label. The draw
function is called with a pointer to a <TT>Fl_Label</TT>
structure containing the label information, the bounding box for
the label, and the label alignment:</P>
<UL><PRE>
void xyz_draw(Fl_Label *label, int x, int y, int w, int h, Fl_Align align) {
...
}
</PRE>
</UL>
The label should be drawn <I>inside</I> this bounding box, even if <TT>
FL_ALIGN_INSIDE</TT> is not enabled. The function is not called if the
label value is <TT>NULL</TT>.
<P>The measure function is called with a pointer to a <TT>Fl_Label</TT>
structure and references to the width and height: </P>
<UL>
<PRE>
</PRE></UL>
<P>The label should be drawn <I>inside</I> this bounding box,
even if <TT>FL_ALIGN_INSIDE</TT> is not enabled. The function
is not called if the label value is <TT>NULL</TT>.</P>
<P>The measure function is called with a pointer to a
<TT>Fl_Label</TT> structure and references to the width and
height:</P>
<UL><PRE>
void xyz_measure(Fl_Label *label, int &amp;w, int &amp;h) {
...
}
</PRE>
</UL>
It should measure the size of the label and set <TT>w</TT> and <TT>h</TT>
to the size it will occupy.
</PRE></UL>
<P>The function should measure the size of the label and set
<TT>w</TT> and <TT>h</TT> to the size it will occupy.</P>
<H5>Adding Your Label Type</H5>
The <TT>Fl::set_labeltype</TT> method creates a label type using your
draw and measure functions:
<UL>
<PRE>
<P>The <TT>Fl::set_labeltype</TT> method creates a label type
using your draw and measure functions:</P>
<UL><PRE>
#define XYZ_LABEL FL_FREE_LABELTYPE
Fl::set_labeltype(XYZ_LABEL, xyz_draw, xyz_measure);
</PRE>
</UL>
The label type number <TT>n</TT> can be any integer value starting at
the constant <TT>FL_FREE_LABELTYPE</TT>. Once you have added the label
type you can use the <TT>labeltype()</TT> method to select your label
type.
</PRE></UL>
<P>The label type number <TT>n</TT> can be any integer value
starting at the constant <TT>FL_FREE_LABELTYPE</TT>. Once you
have added the label type you can use the <TT>labeltype()</TT>
method to select your label type.</P>
<P>The <TT>Fl::set_labeltype</TT> method can also be used to overload
an existing label type such as <TT>FL_NORMAL_LABEL</TT>. </P>
<H4><A name=symbols>Symbol Labels</A></H4>
<P>The <TT>FL_SYMBOL_LABEL</TT> label type uses the <TT>label()</TT>
string to look up a small drawing procedure in a hash table. For
historical reasons the string always starts with '@'; if it starts with
something else (or the symbol is not found) the label is drawn
normally:
<CENTER><IMG src="symbols.gif" ALT="FLTK Symbols"></CENTER>
<P>The @ sign may be followed by the following optional &quot;formatting&quot;
characters, in this order:
<UL>
<LI>'#' forces square scaling, rather than distortion to the widget's
shape. </LI>
<LI>+[1-9] or -[1-9] tweaks the scaling a little bigger or smaller. </LI>
<LI>[1-9] - rotates by a multiple of 45 degrees. '6' does nothing,
the others point in the direction of that key on a numeric keypad. </LI>
</UL>
an existing label type such as <TT>FL_NORMAL_LABEL</TT>.</P>
<H2>Callbacks</H2>
Callbacks are functions that are called when the value of a widget
changes. A callback function is sent a <TT>Fl_Widget</TT> pointer of
the widget that changed and optionally a pointer to data of some sort:
<UL>
<PRE>
<P>Callbacks are functions that are called when the value of a
widget changes. A callback function is sent a <TT>Fl_Widget</TT>
pointer of the widget that changed and a pointer to data that
you provide:</P>
<UL><PRE>
void xyz_callback(Fl_Widget *w, void *data) {
...
}
</PRE>
</UL>
The <TT>callback()</TT> method sets the callback function for a
widget. You can optionally pass a pointer to some data needed for the
callback:
<UL>
<PRE>
</PRE></UL>
<P>The <TT>callback()</TT> method sets the callback function for a
widget. You can optionally pass a pointer to some data needed for the
callback:</P>
<UL><PRE>
int xyz_data;
button-&gt;callback(xyz_callback, data);
</PRE>
</UL>
Normally callbacks are performed only when the value of the widget
changes. You can change this using the <A href=Fl_Widget.html#Fl_Widget.when>
<TT>when()</TT></A> method:
<UL>
<PRE>
button-&gt;callback(xyz_callback, &amp;xyz_data);
</PRE></UL>
<P>Normally callbacks are performed only when the value of the
widget changes. You can change this using the
<A href="Fl_Widget.html#Fl_Widget.when"><TT>when()</TT></A>
method:</P>
<UL><PRE>
button-&gt;when(FL_WHEN_NEVER);
button-&gt;when(FL_WHEN_CHANGED);
button-&gt;when(FL_WHEN_RELEASE);
@ -328,24 +517,60 @@ button-&gt;when(FL_WHEN_RELEASE_ALWAYS);
button-&gt;when(FL_WHEN_ENTER_KEY);
button-&gt;when(FL_WHEN_ENTER_KEY_ALWAYS);
button-&gt;when(FL_WHEN_CHANGED | FL_WHEN_NOT_CHANGED);
</PRE>
</UL>
</PRE></UL>
<CENTER><TABLE WIDTH="80%" BORDER="1" CELLPADDING="5" CELLSPACING="0" BGCOLOR="#cccccc">
<TR>
<TD><B>Hint:</B>
<P>Many programmers new to FLTK or C++ try to use a
non-static class method instead of a static class method
or function for their callback. Since callbacks are done
outside a C++ class, the <TT>this</TT> pointer is not
initialized for class methods.</P>
<P>To work around this problem, define a static method
in your class that accepts a pointer to the class, and
then have the static method call the class method(s) as
needed. The data pointer you provide to the
<TT>callback()</TT> method of the widget can be a
pointer to the instance of your class.</P>
<UL><PRE>
class foo {
void my_callback(Widget *);
static void my_static_callback(Widget *w, foo *f) { f->my_callback(w); }
...
}
...
w->callback(my_static_callback, this);
</PRE></UL>
</TD>
</TR>
</TABLE></CENTER>
<H2>Shortcuts</H2>
Shortcuts are key sequences that activate widgets (usually buttons or
menu items). The <TT>shortcut()</TT> method sets the shortcut for a
widget:
<UL>
<PRE>
<P>Shortcuts are key sequences that activate widgets such as
buttons or menu items. The <TT>shortcut()</TT> method sets the
shortcut for a widget:</P>
<UL><PRE>
button-&gt;shortcut(FL_Enter);
button-&gt;shortcut(FL_SHIFT + 'b');
button-&gt;shortcut(FL_CTRL + 'b');
button-&gt;shortcut(FL_ALT + 'b');
button-&gt;shortcut(FL_CTRL + FL_ALT + 'b');
button-&gt;shortcut(0); // no shortcut
</PRE>
</UL>
The shortcut value is the key event value (the ASCII value or one of
the special keys like <a
href="enumerations.html#key_values"><TT>FL_Enter</TT></a>) combined
with any modifiers (like shift, alt, and control).
</BODY></HTML>
</PRE></UL>
<P>The shortcut value is the key event value - the ASCII value
or one of the special keys like
<a href="enumerations.html#key_values"><TT>FL_Enter</TT></a> -
combined with any modifiers like <KBD>Shift</KBD>,
<KBD>Alt</KBD>, and <KBD>Control</KBD>.</P>
</BODY>
</HTML>

View File

@ -1,43 +1,45 @@
<HTML>
<BODY>
<H1 ALIGN="RIGHT"><A NAME="intro">1 - Introduction to FLTK</A></H1>
<P>The Fast Light Tool Kit (&quot;FLTK&quot;, pronounced
&quot;fulltick&quot;) is a LGPL'd 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
Mr. Bill Spitzak and is currently maintained by a small group
of developers across the world with a central repository in the
US.</P>
Windows&reg;. Work is also underway to support FLTK under MacOS
X. 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>
<P>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
should be provided and documented as part of an operating system. The
system only has to provide arbitrary shaped but featureless windows, a
powerful set of graphics drawing calls, and a simple <I>unalterable</I>
method of delivering events to the owners of the windows. NeXT (if
you ignored NextStep) provided this, but they chose to hide it and
tried to push their own baroque toolkit instead...</P>
<P>It has always been Bill's belief that the GUI API of all
modern systems is much too high level. Toolkits (even FLTK) 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 powerful set of graphics
drawing calls, and a simple <I>unalterable</I> method of
delivering events to the owners of the windows. NeXT (if you
ignored NextStep) provided this, but they chose to hide it and
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 came up with passing events downward
in the tree and having the handle routine return a value
indicating the used the event, and the table-driven menus. In
indicating the used the event, and the table-driven menus. In
general he was trying to prove that complex UI ideas could be
entirely implemented in a user space toolkit, with no knowledge
or support by the system.</P>
<P>After going to film school for a few years, Bill worked at
Sun Microsystems on the (doomed) NeWS project. Here he found an
even better and cleaner windowing system, and he reimplemented
&quot;views&quot; atop that. NeWS did have an unnecessarily
Sun Microsystems on the (doomed) NeWS project. Here he found an
even better and cleaner windowing system, and he reimplemented
&quot;views&quot; atop that. NeWS did have an unnecessarily
complex method of delivering events which hurt it. But the
designers did admit that perhaps the user could write just as
good of a button as they could, and officially exposed the
lower level interface.</P>
good of a button as they could, and officially exposed the lower
level interface.</P>
<P>With the death of NeWS Bill realized that he would have to
live with X. The biggest problem with X is the &quot;window
@ -45,7 +47,7 @@ manager&quot;, which means that the toolkit can no longer
control the window borders or drag the window around.</P>
<P>At Digital Domain Bill discovered another toolkit,
&quot;Forms&quot;. Forms was similar to his work, but provided
&quot;Forms&quot;. Forms was similar to his work, but provided
many more widgets, since it was used in many real applications,
rather then as theoretical work. He decided to use Forms, except
he integrated his table-driven menus into it. Several very large
@ -101,8 +103,8 @@ is now included with several Linux distributions.</P>
performance.</LI>
<LI>Precise low-level compatability between the X11 and
WIN32 version (only about 10% of the code is
different).</LI>
WIN32 version - only about 10% of the code is
different.</LI>
<LI>Interactive user interface builder program. Output is
human-readable and editable C++ source code.</LI>
@ -235,13 +237,22 @@ to &quot;bindir&quot;, the header files to
<H2>Building FLTK Under Microsoft Windows</H2>
<P>There are two ways to build FLTK under Microsoft Windows.
<P>There are three ways to build FLTK under Microsoft Windows.
The first is to use the Visual C++ 5.0 project files under the
&quot;visualc&quot; directory. Just open (or double-click on)
the &quot;fltk.dsw&quot; file to get the whole shebang.</P>
<P>The second method is to use a GNU-based development tool with
the files in the &quot;makefiles&quot; directory. To build
<P>The second method is to use the <TT>configure</TT> script
included with the FLTK software; this has only been tested with
the CygWin tools:</P>
<UL><PRE>
sh configure --prefix=C:/FLTK
make
</PRE></UL>
<P>The final method is to use a GNU-based development tool with
the 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 directory and do a
make:</P>
@ -252,19 +263,23 @@ make
</PRE></UL>
<H3>Using the Visual C++ DLL Library</H3>
The &quot;fltkdll.dsp&quot; project file builds a DLL-version of the FLTK
library. Because of name mangling differences between PC compilers (even
between different versions of Visual C++!) you can only use the DLL that
is generated with the same version compiler that you built it with.
<P>When compiling an application or DLL that uses the FLTK DLL, you will need
to define the <tt>FL_DLL</tt> preprocessor symbol to get the correct linkage
commands embedded within the FLTK header files.
<P>The &quot;fltkdll.dsp&quot; project file builds a DLL-version
of the FLTK library. Because of name mangling differences
between PC compilers (even between different versions of Visual
C++!) you can only use the DLL that is generated with the same
version compiler that you built it with.</P>
<P>When compiling an application or DLL that uses the FLTK DLL,
you will need to define the <tt>FL_DLL</tt> preprocessor symbol
to get the correct linkage commands embedded within the FLTK
header files.</P>
<H2>Building FLTK Under OS/2</H2>
The current OS/2 build requires XFree86 for OS/2 to work. A native
Presentation Manager version has not been implemented yet (volunteers
are welcome!).
<P>The current OS/2 build requires XFree86 for OS/2 to work. A
native Presentation Manager version has not been implemented
yet (volunteers are welcome!).</P>
<p>The current set of Makefiles/configuration failes assumes that
EMX 0.9d and libExt
@ -274,18 +289,28 @@ is installed.
<P>To build the XFree86 version of FLTK for OS/2, copy the appropriate
makeinclude and config files to the main directory and do a make: </P>
<UL>
<PRE>
<UL><PRE>
copy makefiles\Makefile.os2x Makefile
make
</PRE>
</UL>
</PRE></UL>
<H2>Building FLTK Under MacOS X</H2>
<P>The current version of FLTK requires the XFree86 X server for
Darwin. Follow the instructions for building FLTK under
UNIX.</P>
<P>Future versions of FLTK will provide a Carbon-based window
interface, so XFree86 will no longer be required.</P>
<H2>Internet Resources</H2>
FLTK is available on the 'net in a bunch of locations:
<P>FLTK is available on the 'net in a bunch of locations:</P>
<DL>
<DT>WWW
<DD><A href="http://www.fltk.org">http://www.fltk.org</A>
<DD><A href="http://www.fltk.org/">http://www.fltk.org/</A>
<DT>FTP
<DD><A HREF="ftp://ftp.fltk.org/pub/fltk">California, USA (ftp.fltk.org)</A>
@ -299,18 +324,35 @@ FLTK is available on the 'net in a bunch of locations:
instructions below]
<DD><A href="mailto:fltk-bugs@fltk.org">fltk-bugs@fltk.org</A> [for
reporting bugs]
<DT>News</DT>
<DD><A HREF="news://news.easysw.com">news.easysw.com</A></DD>
</DL>
To send a message to the FLTK mailing list (&quot;fltk@fltk.org&quot;) you
must first join the list. Non-member submissions are blocked to avoid
problems with unsolicited email.
<P>To send a message to the FLTK mailing list
(&quot;fltk@fltk.org&quot;) you must first join the list.
Non-member submissions are blocked to avoid problems with
unsolicited email.</P>
<P>To join the FLTK mailing list, send a message to
&quot;majordomo@fltk.org&quot; with &quot;subscribe fltk&quot; in the message body. A
digest of this list is available by subscribing to the &quot;fltk-digest&quot;
mailing list. </P>
&quot;majordomo@fltk.org&quot; with &quot;subscribe fltk&quot;
in the message body. A digest of this list is available by
subscribing to the &quot;fltk-digest&quot; mailing list.</P>
<H2>Reporting Bugs</H2>
To report a bug in FLTK, send an email to &quot;fltk-bugs@fltk.org&quot;.
Please include the FLTK version, operating system &amp; version, and
compiler that you are using when describing the bug or problem.
<P>To report a bug in FLTK, send an email to
&quot;fltk-bugs@fltk.org&quot;. Please include the FLTK version,
operating system &amp; version, and compiler that you are using
when describing the bug or problem. We will be unable to provide
any kind of help without that basic information.</P>
<P>Bugs can also be reported to the "fltk.bugs" newsgroup or on the
SourceForge bug tracker pages.</P>
<P>For general support and questions, please use the FLTK mailing list
at &quot;fltk@fltk.org&quot;. </P>
</BODY></HTML>
at &quot;fltk@fltk.org&quot; or one of the newsgroups.</P>
</BODY>
</HTML>

View File

@ -56,7 +56,9 @@ interfaces.</P>
<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>
<LI><A HREF="migration.html">Appendix G - Migrating from FLTK 1.0.x to FLTK 1.1.x</A></LI>
<LI><A HREF="license.html#license">Appendix H - Software License</A></LI>
</UL>

View File

@ -1,96 +0,0 @@
#
# "$Id: Makefile.cygwin,v 1.1.2.2 2001/01/22 15:13:39 easysw Exp $"
#
# Top-level makefile for the Fast Light Tool Kit (FLTK).
#
# Copyright 1998-2001 by Bill Spitzak and others.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA.
#
# Please report all bugs and problems to "fltk-bugs@fltk.org".
#
# By default use a Un*x-style shell
#
# uncomment next line to use NT command shell
# SHELL=cmd.exe
#
# or uncomment next line to explicitly use a unix-compatible shell
# SHELL=sh.exe
#
# If we are using a Un*x-based make, make sure the environmental var is set
# set MAKE_MODE=unix
#
# By default, a Un*x style make is assumed, so towards the bottom of this
# file filenames are copied with 'cp' and use forward slashes throughout
# in filepaths.
#
# Changing to a Windows-based command line would require 'cp' replaced with
# a local equivalent ('copy' is OK) and potentially for forward-slashes in
# filepaths to be replaced by back-slashes.
all: makeinclude config.h
echo "=== making src ==="
touch src/makedepend
cd src ; $(MAKE)
echo "=== making fluid ==="
touch fluid/makedepend
cd fluid ; $(MAKE)
echo "=== making test ==="
touch test/makedepend
cd test ; $(MAKE)
install:
echo "=== installing src ==="
touch src/makedepend
cd src ; $(MAKE) install
echo "=== installing fluid ==="
touch fluid/makedepend
cd fluid ; $(MAKE) install
depend:
echo "=== making src dependencies ==="
touch src/makedepend
cd src ; $(MAKE) depend
echo "=== making fluid dependencies ==="
touch fluid/makedepend
cd fluid ; $(MAKE) depend
echo "=== making test dependencies ==="
touch test/makedepend
cd test ; $(MAKE) depend
clean:
-@ rm -f core config.cache *.o *.bck
echo "=== cleaning src ==="
touch src/makedepend
cd src ; $(MAKE) clean
echo "=== cleaning fluid ==="
touch fluid/makedepend
cd fluid ; $(MAKE) clean
echo "=== cleaning test ==="
touch test/makedepend
cd test ; $(MAKE) clean
config.h: makefiles/config.cygwin
cp $< $@
makeinclude: makefiles/makeinclude.cygwin
cp $< $@
#
# End of "$Id: Makefile.cygwin,v 1.1.2.2 2001/01/22 15:13:39 easysw Exp $".
#

View File

@ -1,96 +0,0 @@
#
# "$Id: Makefile.no-cygwin,v 1.1.2.2 2001/01/22 15:13:39 easysw Exp $"
#
# Top-level makefile for the Fast Light Tool Kit (FLTK).
#
# Copyright 1998-2001 by Bill Spitzak and others.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA.
#
# Please report all bugs and problems to "fltk-bugs@fltk.org".
#
# By default use a Un*x-style shell
#
# uncomment next line to use NT command shell
# SHELL=cmd.exe
#
# or uncomment next line to explicitly use a unix-compatible shell
# SHELL=sh.exe
#
# If we are using a Un*x-based make, make sure the environmental var is set
# set MAKE_MODE=unix
#
# By default, a Un*x style make is assumed, so towards the bottom of this
# file filenames are copied with 'cp' and use forward slashes throughout
# in filepaths.
#
# Changing to a Windows-based command line would require 'cp' replaced with
# a local equivalent ('copy' is OK) and potentially for forward-slashes in
# filepaths to be replaced by back-slashes.
all: makeinclude config.h
echo "=== making src ==="
touch src/makedepend
cd src ; $(MAKE)
echo "=== making fluid ==="
touch fluid/makedepend
cd fluid ; $(MAKE)
echo "=== making test ==="
touch test/makedepend
cd test ; $(MAKE)
install:
echo "=== installing src ==="
touch src/makedepend
cd src ; $(MAKE) install
echo "=== installing fluid ==="
touch fluid/makedepend
cd fluid ; $(MAKE) install
depend:
echo "=== making src dependencies ==="
touch src/makedepend
cd src ; $(MAKE) depend
echo "=== making fluid dependencies ==="
touch fluid/makedepend
cd fluid ; $(MAKE) depend
echo "=== making test dependencies ==="
touch test/makedepend
cd test ; $(MAKE) depend
clean:
-@ rm -f core config.cache *.o *.bck
echo "=== cleaning src ==="
touch src/makedepend
cd src ; $(MAKE) clean
echo "=== cleaning fluid ==="
touch fluid/makedepend
cd fluid ; $(MAKE) clean
echo "=== cleaning test ==="
touch test/makedepend
cd test ; $(MAKE) clean
config.h: makefiles/config.no-cygwin
cp $< $@
makeinclude: makefiles/makeinclude.no-cygwin
cp $< $@
#
# End of "$Id: Makefile.no-cygwin,v 1.1.2.2 2001/01/22 15:13:39 easysw Exp $".
#

View File

@ -1,24 +0,0 @@
#!/bin/sh
#
# aixmakesharedlib - a simple script for AIX shared lib creation from a
# non shared library
#
# Notes:
# - Should work for both AIX 3.2.x & 4.1.x
# - Copies original (non shared) lib to be lib.NS
# - May require slight modifications for different uses (this was written
# with the FL library in mind)
#
/bin/rm -f shr.o syms.exp
# create the exports list:
echo "#!" > syms.exp
dump -g $1 | egrep -e '[ \t]*[0-9]+' | sed 's/^[ \t]*[0-9][0-9]*[ \t]*[^ \t]//' | sed 's/^\.//' | sort | uniq >> syms.exp
xlC -o shr.o $1 -bM:SRE -bE:syms.exp -bnoentry -lc -lm -lX11
mv $1 $1.NS
ar ruv $1 shr.o syms.exp
/bin/rm -f shr.o syms.exp

View File

@ -1,187 +0,0 @@
/*
* "$Id: config.cygwin,v 1.1.2.3.2.2 2001/10/19 14:04:08 easysw Exp $"
*
* Configuration file for the Fast Light Tool Kit (FLTK).
*
* Copyright 1998-2001 by Bill Spitzak and others.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Please report all bugs and problems to "FLTK-bugs@fltk.org".
*/
/*
* Where to find the documentation files...
*/
#define FLTK_DOCDIR "C:/FLTK/DOC"
/*
* BORDER_WIDTH:
*
* Thickness of FL_UP_BOX and FL_DOWN_BOX. Current 1,2, and 3 are
* supported.
*
* 3 is the historic FLTK look.
* 2 is the default and looks like Microsoft Windows, KDE, and Qt.
* 1 is a plausible future evolution...
*
* Note that this may be simulated at runtime by redefining the boxtypes
* using Fl::set_boxtype().
*/
#define BORDER_WIDTH 2
/*
* HAVE_GL:
*
* Do you have OpenGL? Set this to 0 if you don't have or plan to use
* OpenGL, and FLTK will be smaller.
*
* In order to set to 1 you will need to obtain the OpenGL header and
* library files. Consult the README.win32 file for further details.
*/
#define HAVE_GL 0
/*
* USE_COLORMAP:
*
* Setting this to zero will save a good deal of code (especially for
* fl_draw_image), but FLTK will only work on TrueColor visuals.
*/
#define USE_COLORMAP 1
/*
* HAVE_XDBE:
*
* Do we have the X double-buffer extension?
*/
#define HAVE_XDBE 0
/*
* USE_XDBE:
*
* Actually try to use the double-buffer extension? Set this to zero
* disable use of XDBE without breaking the list_visuals program.
*/
#define USE_XDBE HAVE_XDBE
/*
* HAVE_OVERLAY:
*
* Use the X overlay extension? FLTK will try to use an overlay
* visual for Fl_Overlay_Window, the Gl_Window overlay, and for the
* menus. Setting this to zero will remove a substantial amount of
* code from FLTK. Overlays have only been tested on SGI servers!
*/
#define HAVE_OVERLAY 0
/*
* HAVE_GL_OVERLAY:
*
* It is possible your GL has an overlay even if X does not. If so,
* set this to 1.
*/
#define HAVE_GL_OVERLAY HAVE_OVERLAY
/*
* WORDS_BIGENDIAN:
*
* Byte order of your machine: 1 = big-endian, 0 = little-endian.
*/
#define WORDS_BIGENDIAN 0
/*
* U16, U32, U64:
*
* Types used by fl_draw_image. One of U32 or U64 must be defined.
* U16 is optional but FLTK will work better with it!
*/
#define U16 unsigned short
#define U32 unsigned
/* #undef U64 */
/*
* HAVE_DIRENT_H, HAVE_SYS_NDIR_H, HAVE_SYS_DIR_H, HAVE_NDIR_H, HAVE_SCANDIR:
*
* Where is <dirent.h> (used only by fl_file_chooser and scandir).
*/
#define HAVE_DIRENT_H 1
#define HAVE_SYS_NDIR_H 0
#define HAVE_SYS_DIR_H 0
#define HAVE_NDIR_H 0
#define HAVE_SCANDIR 1
/*
* Possibly missing sprintf-style functions:
*/
#define HAVE_VSNPRINTF 1
#define HAVE_SNPRINTF 1
#define HAVE_VSPRINTF 1
/*
* String functions...
*/
#define HAVE_STRCASECMP 1
/*
* HAVE_SYS_SELECT_H:
*
* Whether or not select() call has its own header file.
*/
#define HAVE_SYS_SELECT_H 0
/*
* HAVE_POLL:
*
* Use poll() if we don't have select().
*/
#define HAVE_POLL 0
/*
* Do we have various image libraries?
*/
#undef HAVE_LIBPNG
#undef HAVE_LIBZ
#undef HAVE_LIBJPEG
/*
* Do we have the png_xyz() functions?
*/
#undef HAVE_PNG_GET_VALID
#undef HAVE_PNG_SET_TRNS_TO_ALPHA
#undef HAVE_PNG_READ_DESTROY
/*
* End of "$Id: config.cygwin,v 1.1.2.3.2.2 2001/10/19 14:04:08 easysw Exp $".
*/

View File

@ -1,187 +0,0 @@
/*
* "$Id: config.no-cygwin,v 1.1.2.3.2.2 2001/10/19 14:04:08 easysw Exp $"
*
* Configuration file for the Fast Light Tool Kit (FLTK).
*
* Copyright 1998-2001 by Bill Spitzak and others.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Please report all bugs and problems to "FLTK-bugs@fltk.org".
*/
/*
* Where to find the documentation files...
*/
#define FLTK_DOCDIR "C:/FLTK/DOC"
/*
* BORDER_WIDTH:
*
* Thickness of FL_UP_BOX and FL_DOWN_BOX. Current 1,2, and 3 are
* supported.
*
* 3 is the historic FLTK look.
* 2 is the default and looks like Microsoft Windows, KDE, and Qt.
* 1 is a plausible future evolution...
*
* Note that this may be simulated at runtime by redefining the boxtypes
* using Fl::set_boxtype().
*/
#define BORDER_WIDTH 2
/*
* HAVE_GL:
*
* Do you have OpenGL? Set this to 0 if you don't have or plan to use
* OpenGL, and FLTK will be smaller.
*
* In order to set to 1 you will need to obtain the OpenGL header and
* library files. Consult the README.win32 file for further details.
*/
#define HAVE_GL 0
/*
* USE_COLORMAP:
*
* Setting this to zero will save a good deal of code (especially for
* fl_draw_image), but FLTK will only work on TrueColor visuals.
*/
#define USE_COLORMAP 1
/*
* HAVE_XDBE:
*
* Do we have the X double-buffer extension?
*/
#define HAVE_XDBE 0
/*
* USE_XDBE:
*
* Actually try to use the double-buffer extension? Set this to zero
* disable use of XDBE without breaking the list_visuals program.
*/
#define USE_XDBE HAVE_XDBE
/*
* HAVE_OVERLAY:
*
* Use the X overlay extension? FLTK will try to use an overlay
* visual for Fl_Overlay_Window, the Gl_Window overlay, and for the
* menus. Setting this to zero will remove a substantial amount of
* code from FLTK. Overlays have only been tested on SGI servers!
*/
#define HAVE_OVERLAY 0
/*
* HAVE_GL_OVERLAY:
*
* It is possible your GL has an overlay even if X does not. If so,
* set this to 1.
*/
#define HAVE_GL_OVERLAY HAVE_OVERLAY
/*
* WORDS_BIGENDIAN:
*
* Byte order of your machine: 1 = big-endian, 0 = little-endian.
*/
#define WORDS_BIGENDIAN 0
/*
* U16, U32, U64:
*
* Types used by fl_draw_image. One of U32 or U64 must be defined.
* U16 is optional but FLTK will work better with it!
*/
#define U16 unsigned short
#define U32 unsigned
/* #undef U64 */
/*
* HAVE_DIRENT_H, HAVE_SYS_NDIR_H, HAVE_SYS_DIR_H, HAVE_NDIR_H, HAVE_SCANDIR:
*
* Where is <dirent.h> (used only by fl_file_chooser and scandir).
*/
#define HAVE_DIRENT_H 1
#define HAVE_SYS_NDIR_H 0
#define HAVE_SYS_DIR_H 0
#define HAVE_NDIR_H 0
#define HAVE_SCANDIR 0
/*
* Possibly missing sprintf-style functions:
*/
#define HAVE_VSNPRINTF 0
#define HAVE_SNPRINTF 0
#define HAVE_VSPRINTF 0
/*
* String functions...
*/
#define HAVE_STRCASECMP 1
/*
* HAVE_SYS_SELECT_H:
*
* Whether or not select() call has its own header file.
*/
#define HAVE_SYS_SELECT_H 0
/*
* HAVE_POLL:
*
* Use poll() if we don't have select().
*/
#define HAVE_POLL 0
/*
* Do we have various image libraries?
*/
#undef HAVE_LIBPNG
#undef HAVE_LIBZ
#undef HAVE_LIBJPEG
/*
* Do we have the png_xyz() functions?
*/
#undef HAVE_PNG_GET_VALID
#undef HAVE_PNG_SET_TRNS_TO_ALPHA
#undef HAVE_PNG_READ_DESTROY
/*
* End of "$Id: config.no-cygwin,v 1.1.2.3.2.2 2001/10/19 14:04:08 easysw Exp $".
*/

View File

@ -1,100 +0,0 @@
#
# "$Id: makeinclude.cygwin,v 1.1.2.2.2.2 2001/10/27 03:33:25 easysw Exp $"
#
# Make include file for the Fast Light Tool Kit (FLTK).
#
# Copyright 1998-2001 by Bill Spitzak and others.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA.
#
# Please report all bugs and problems to "fltk-bugs@fltk.org".
#
# Notes:
#
# 1) Console windows appearing
#
# Consoles will not appear when run from a cygwin shell command line prompt
# but will cause an 'unnecessary' console to appear when run directly from
# windows (say explorer). It provides i/o for stdin/stdout for debugging
#
# To avoid this add "-mwindows" to LDLIBS and GLDLIBS below
#
# 2) Stripping the executable to reduce size
#
# An external program may be run to strip out any debug symbols:
# strip filename.exe
#
# Alternatively add -s option to LDLIBS and GLDLIBS below to strip all
# symbols. (or -S for stripping of debug symbols only). See 'ld' man page
# for other useful link-time options.
#
# The default is to leave -mwindows and the stripping off, so as to facilitate
# debugging. For release it may be appropriate to add these additional switches
prefix = /usr/local
exec_prefix = ${prefix}
bindir = ${exec_prefix}/bin
includedir = ${prefix}/include
libdir = ${exec_prefix}/lib
srcdir = .
# compiler names:
CXX = g++
CC = gcc
# flags for C++ compiler:
CFLAGS = -Wall -O2 -DWIN32
CXXFLAGS = -Wall -O2 -DWIN32
# program to make the archive:
LIBNAME = ../lib/libfltk.a
GLLIBNAME = ../lib/libfltk_gl.a
LIBCOMMAND = ar -ruv
RANLIB = ranlib
RM = del
DSONAME =
DSOCOMMAND = echo
# libraries to link with (in addition to default libs):
LDLIBS = -lgdi32 -lwsock32
GLDLIBS = -lglu32 -lopengl32 -lgdi32 -lwsock32
LINKFLTK =-L../lib -lfltk
LINKFLTKGL =-L../lib -lfltk_gl
IMAGELIBS =
# Be quiet when building...
.SILENT:
# Build commands and filename extensions...
.SUFFIXES: .c .cxx .h .fl .o
.cxx:
echo Compiling and linking $@...
$(CXX) -I.. $(CXXFLAGS) $< $(LINKFLTK) $(LDLIBS) -o $@
.c.o:
echo Compiling $@...
$(CC) -I.. $(CXXFLAGS) $< -c
.cxx.o:
echo Compiling $@...
$(CXX) -I.. $(CXXFLAGS) $< -c
#
# End of "$Id: makeinclude.cygwin,v 1.1.2.2.2.2 2001/10/27 03:33:25 easysw Exp $".
#

View File

@ -1,100 +0,0 @@
#
# "$Id: makeinclude.no-cygwin,v 1.1.2.4.2.2 2001/10/27 03:33:25 easysw Exp $"
#
# Make include file for the Fast Light Tool Kit (FLTK).
#
# Copyright 1998-2001 by Bill Spitzak and others.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA.
#
# Please report all bugs and problems to "fltk-bugs@fltk.org".
#
# Notes:
#
# 1) Console windows appearing
#
# Consoles will not appear when run from a cygwin shell command line prompt
# but will cause an 'unnecessary' console to appear when run directly from
# windows (say explorer). It provides i/o for stdin/stdout for debugging
#
# To avoid this add "-mwindows" to LDLIBS and GLDLIBS below
#
# 2) Stripping the executable to reduce size
#
# An external program may be run to strip out any debug symbols:
# strip filename.exe
#
# Alternatively add -s option to LDLIBS and GLDLIBS below to strip all
# symbols. (or -S for stripping of debug symbols only). See 'ld' man page
# for other useful link-time options.
#
# The default is to leave -mwindows and the stripping off, so as to facilitate
# debugging. For release it may be appropriate to add these additional switches
prefix = /usr/local
exec_prefix = ${prefix}
bindir = ${exec_prefix}/bin
includedir = ${prefix}/include
libdir = ${exec_prefix}/lib
srcdir = .
# compiler names:
CXX = g++ -mno-cygwin
CC = gcc -mno-cygwin
# flags for C++ compiler:
CFLAGS = -Wall -O2 -DWIN32
CXXFLAGS = -Wall -O2 -DWIN32
# program to make the archive:
LIBNAME = ../lib/libfltk.a
GLLIBNAME = ../lib/libfltk_gl.a
LIBCOMMAND = ar -ruv
RM = del
RANLIB = ranlib
DSONAME =
DSOCOMMAND = echo
# libraries to link with (in addition to default libs):
LDLIBS = -lgdi32 -lwsock32
GLDLIBS = -lglu32 -lopengl32 -lgdi32 -lwsock32
LINKFLTK =-L../lib -lfltk
LINKFLTKGL =-L../lib -lfltk_gl
IMAGELIBS =
# Be quiet when building...
.SILENT:
# Build commands and filename extensions...
.SUFFIXES: .c .cxx .h .fl .o
.cxx:
echo Compiling and linking $@...
$(CXX) -I.. $(CXXFLAGS) $< $(LINKFLTK) $(LDLIBS) -o $@
.c.o:
echo Compiling $@...
$(CC) -I.. $(CXXFLAGS) $< -c
.cxx.o:
echo Compiling $@...
$(CXX) -I.. $(CXXFLAGS) $< -c
#
# End of "$Id: makeinclude.no-cygwin,v 1.1.2.4.2.2 2001/10/27 03:33:25 easysw Exp $".
#