@ -48,7 +48,7 @@ browser is a lot of work or is inefficient, you may want to make a
@@ -48,7 +48,7 @@ browser is a lot of work or is inefficient, you may want to make a
@ -34,7 +34,7 @@ accessing image data or doing <TT>stat()</TT> on a file or doing some
@@ -34,7 +34,7 @@ accessing image data or doing <TT>stat()</TT> on a file or doing some
@ -229,7 +229,7 @@ It allows the <TT>Fl_Browser_</TT> to update its cache data as needed.
@@ -229,7 +229,7 @@ It allows the <TT>Fl_Browser_</TT> to update its cache data as needed.
<H4><ANAME="Fl_Browser_.item_draw">virtual void Fl_Browser_::item_draw(void *p, int x, int y, int w, int h)</A></H4>
<P>This method must be provided by the subclass to draw the item
<TT>p</TT> in the area indicated by <TT>x</TT>, <TT>y<TT>, <TT>w</TT>,
<TT>p</TT> in the area indicated by <TT>x</TT>, <TT>y</TT>, <TT>w</TT>,
and <TT>h</TT>.
@ -265,7 +265,7 @@ item <TT>p</TT> in pixels. Allow for two additional pixels for the list
@@ -265,7 +265,7 @@ item <TT>p</TT> in pixels. Allow for two additional pixels for the list
selection box. This method differs from
<AHREF="#Fl_Browser_.item_height"><TT>item_height</TT></A> in that it is only
called for selection and scrolling operations. The default implementation
calls <TT>item_height</T>.
calls <TT>item_height</TT>.
<H4><ANAME="Fl_Browser_.item_select">virtual void Fl_Browser_::item_select(void *p, int s=1)</A></H4>
@ -33,7 +33,7 @@ Alt</I> key so that the input field does not eat the event first as an <TT>
@@ -33,7 +33,7 @@ Alt</I> key so that the input field does not eat the event first as an <TT>
@ -31,7 +31,7 @@ This works pretty well if your graphics are double buffered, but not
@@ -31,7 +31,7 @@ This works pretty well if your graphics are double buffered, but not
@ -27,7 +27,7 @@ groups can also be used to control radio buttons or to enforce resize
@@ -27,7 +27,7 @@ groups can also be used to control radio buttons or to enforce resize
behavior.
<H3>Methods</H3>
<CENTER>
<TABLEwidth=90%>
<TABLEwidth=90%summary="Fl_Group methods.">
<TR><TDalign=leftvalign=top>
<UL>
<LI><Ahref=#Fl_Group.Fl_Group>Fl_Group</A></LI>
@ -138,8 +138,8 @@ dimensions of the box are scaled to the new size. Widgets outside the
@@ -138,8 +138,8 @@ dimensions of the box are scaled to the new size. Widgets outside the
box are moved.
<P>In these examples the gray area is the resizable:
@ -32,7 +32,7 @@ be "private": a dynamically allocated array managed by the Fl_Menu_.
@@ -32,7 +32,7 @@ be "private": a dynamically allocated array managed by the Fl_Menu_.
<H3>Methods</H3>
<CENTER>
<TABLEwidth=90%>
<TABLEwidth=90%summary="Fl_Menu_ methods.">
<TR><TDalign=leftvalign=top>
<UL>
<LI><Ahref=#Fl_Menu_.Fl_Menu_>Fl_Menu_</A></LI>
@ -131,7 +131,7 @@ that the new entry was placed at.</P>
@@ -131,7 +131,7 @@ that the new entry was placed at.</P>
<P>The return value is the index into the array that the entry was put. </P>
<h4>int Fl_Menu_::add(const char *)</A></H4>
<h4>int Fl_Menu_::add(const char *)</H4>
<P>The passed string is split at any '|' characters and then <TT>
add(s,0,0,0,0)</TT> is done with each section. This is often useful
A submenu title is identified by the bit <TT>FL_SUBMENU</TT> in the <TT>
flags</TT> field, and ends with a <TT>label()</TT> that is <TT>NULL</TT>.
@ -82,7 +82,7 @@ not access them directly to avoid compatibility problems with future
@@ -82,7 +82,7 @@ not access them directly to avoid compatibility problems with future
<P>In the above diagram each box surrounds an actual subclass. These
are further differentiated by setting the <Ahref=#Fl_Widget.type><TT>
type()</TT></A> of the widget to the symbolic value labeling the
@ -33,7 +33,7 @@ type(0)</TT>. For consistency the symbol <TT>FL_VERTICAL</TT> is
@@ -33,7 +33,7 @@ type(0)</TT>. For consistency the symbol <TT>FL_VERTICAL</TT> is
@ -31,7 +31,7 @@ even if they change the widget's appearance. It is up to the user code
@@ -31,7 +31,7 @@ even if they change the widget's appearance. It is up to the user code
@ -37,7 +37,7 @@ Fl::modal()</TT></A> is zero or equal to the window. <TT>Fl_Window</TT>
@@ -37,7 +37,7 @@ Fl::modal()</TT></A> is zero or equal to the window. <TT>Fl_Window</TT>
exit(0)</TT> if this is the last top-level window. </P>
@ -80,7 +80,7 @@ exit(0)</TT> if this is the last top-level window. </P>
@@ -80,7 +80,7 @@ exit(0)</TT> if this is the last top-level window. </P>
</TD></TR>
</TABLE>
</CENTER>
<H4><Aname=Fl_Window.Fl_Window>Fl_Window::Fl_Window(int w, int h, const char *title = 0)</H4>
<H4><Aname=Fl_Window.Fl_Window>Fl_Window::Fl_Window(int w, int h, const char *title = 0)</A></H4>
The first form of the constructor should be used for a "top-level" window
(that is, one that is not inside another window). It correctly sets
@ -95,7 +95,7 @@ plan to completely fill the window with children widgets you should
@@ -95,7 +95,7 @@ plan to completely fill the window with children widgets you should
change this to <TT>FL_NO_BOX</TT>. If you turn the window border off
you may want to change this to <TT>FL_UP_BOX</TT>. </P>
<h4>Fl_Window::Fl_Window(int x, int y, int w, int h, const char *title = 0)</A></H4>
<h4>Fl_Window::Fl_Window(int x, int y, int w, int h, const char *title = 0)</H4>
<P>The second form of the constructor is for creating child windows. It
leaves <tt>visible()</tt> set to true.
@ -258,7 +258,7 @@ debug and maintain!</B>
@@ -258,7 +258,7 @@ debug and maintain!</B>
@ -51,7 +51,7 @@ Restore the previous clip region. <I>You must call <TT>fl_pop_clip()</TT>
@@ -51,7 +51,7 @@ Restore the previous clip region. <I>You must call <TT>fl_pop_clip()</TT>
once for every time you call <TT>fl_clip()</TT>. If you return to
FLTK with the clip stack not empty unpredictable results occur.</I>
<H4>int fl_not_clipped(int x, int y, int w, int h)</H4>
Returns true if any of the rectangle intersects the current clip
Returns true if any of the rectangle intersects the current clip
region. If this returns false you don't have to draw the object. <I>
Under X this returns 2 if the rectangle is partially clipped, and 1 if
it is entirely inside the clip region</I>.
@ -230,7 +230,7 @@ holes should be drawn in the opposite direction of the outside.
@@ -230,7 +230,7 @@ holes should be drawn in the opposite direction of the outside.
<P><TT>fl_gap()</TT> should only be called between <TT>
fl_begin_complex_polygon()</TT> and <TT>fl_end_complex_polygon()</TT>.
To outline the polygon, use <TT>fl_begin_loop()</TT> and replace each <TT>
fl_gap()</TT> with <TT>fl_end_loop();fl_begin_loop()<TT>. </TT></TT></P>
fl_gap()</TT> with <TT>fl_end_loop();fl_begin_loop()</TT>.</P>
@ -122,7 +122,7 @@ and "replace all", "replace next", and "cancel" bu
@@ -122,7 +122,7 @@ and "replace all", "replace next", and "cancel" bu
are just <TT>Fl_Input</TT> widgets, the "replace all" and "cancel"
buttons are <TT>Fl_Button</TT> widgets, and the "replace next " button
is a <TT>Fl_Return_Button</TT> widget:
<PALIGN=CENTER><IMGsrc=./editor-replace.gif></P>
<PALIGN=CENTER><IMGsrc="editor-replace.gif"ALT="The search and replace dialog."></P>
<UL>
<PRE>
Fl_Window *replace_dlg = new Fl_Window(300, 105, "Replace");
@ -553,5 +553,5 @@ library. Also, the <TT>CC</TT> command may also be called <TT>gcc</TT>
@@ -553,5 +553,5 @@ library. Also, the <TT>CC</TT> command may also be called <TT>gcc</TT>
<P>Congratulations, you've just built your own text editor! </P>
<H2>The Final Product</H2>
The final editor window should look like the image on the next page.
The following color constants can be used to access the colors in the
FLTK standard color palette:
<UL>
@ -207,9 +207,9 @@ To get the closest color to a 8-bit set of R,G,B values use
@@ -207,9 +207,9 @@ To get the closest color to a 8-bit set of R,G,B values use
@ -29,7 +29,7 @@ These <TT>.cxx</TT> files must <TT>#include</TT> the <TT>.h</TT> file or they ca
@@ -29,7 +29,7 @@ These <TT>.cxx</TT> files must <TT>#include</TT> the <TT>.h</TT> file or they ca
#include</TT> the <TT>.cxx</TT> file so it still appears to be a single source
<P>Normally the FLUID file defines one or more functions or classes which
output C++ code. Each function defines a one or more FLTK
@ -113,7 +113,7 @@ simple tasks with it. This tutorial will show you how to generate a
@@ -113,7 +113,7 @@ simple tasks with it. This tutorial will show you how to generate a
complete user interface class with FLUID that is used for the CubeView
We will completely construct a window to display and control the
CubeView defined in the previous section using FLUID.
<h4><aname="def">Defining the CubeViewUI Class</a></h4>
<h4><aname="defui">Defining the CubeViewUI Class</a></h4>
Once you have started FLUID, the first step in defining a class is to
create a new class within FLUID using the <b>New->Code->Class</b>
menu item. Name the class "CubeViewUI" and leave the
subclass blank. We do not need any inheritance for this
window. You should see the new class declaration in the FLUID
browser window.
<palign=center><imgsrc="fluid1.gif"></p>
<palign=center><imgsrc="fluid1.gif"ALT="FLUID file for CubeView."></p>
<h4><aname="addcon">Adding the Class Constructor</a></h4>
Click on the CubeViewUI class in the FLUID window and add a new method
by selecting <b>New->Code->Function/Method.</b> The name of the
@ -352,7 +352,7 @@ None of these additions need be public. And they shouldn't be
@@ -352,7 +352,7 @@ None of these additions need be public. And they shouldn't be
unless you plan to expose them as part of the interface for
CubeViewUI.
<p>When you are finished you should have something like this:
<p>We will talk about the <tt>show()</tt> method that is highlighted
shortly.
<h4><aname="addcube">Adding the CubeView Widget</a></h4>
@ -373,7 +373,7 @@ Code:" field enter <tt>#include "CubeView.h"</tt>
@@ -373,7 +373,7 @@ Code:" field enter <tt>#include "CubeView.h"</tt>
CubeView as a member of CubeViewUI, so any public CubeView methods are
<p>Once the new method has been added, highlight its name and select
New->Code->Code. Enter the method's code in the code window.
@ -553,7 +553,7 @@ grid that all widgets snap to when you move and resize them, and for the
@@ -553,7 +553,7 @@ grid that all widgets snap to when you move and resize them, and for the
"snap" which is how far a widget has to be dragged from its original position
<P>The output filenames control the extensions or names of the files the are
generated by FLUID. If you check the "Include .h from .cxx" button the code
@ -617,7 +617,7 @@ to "visible" attributes (such as the color, label, box) are not undone
@@ -617,7 +617,7 @@ to "visible" attributes (such as the color, label, box) are not undone
by revert or cancel. Changes to code like the callbacks are undone,
however.
<!-- NEW PAGE -->
<TABLEcellpadding=0cellspacing=0width=100%>
<TABLEcellpadding=0cellspacing=0width=100%summary="columns of text">
<P>Many widgets will work, and draw faster, with a "frame" instead of a
@ -918,7 +918,7 @@ to select the appropriate language and message file.
@@ -918,7 +918,7 @@ to select the appropriate language and message file.
"GNU gettext" from the "Use" chooser. Two new input fields will then
appear to control the include file and function/macro name to use when
retrieving the localized label strings.
<PALIGN="CENTER"><IMGSRC="fluid-gettext.gif"></P>
<PALIGN="CENTER"><IMGSRC="fluid-gettext.gif"ALT="I18N using FLUID."></P>
<P>The "#include" field controls the header file to include for I18N; by
default this is <TT><libintl.h></TT>, the standard I18N file for
GNU gettext.
@ -934,7 +934,7 @@ need to call <TT>setlocale()</TT> to select the appropriate language.
@@ -934,7 +934,7 @@ need to call <TT>setlocale()</TT> to select the appropriate language.
"POSIX catgets" from the "Use" chooser. Three new input fields will then
appear to control the include file, catalog file, and set number for
retrieving the localized label strings.
<PALIGN="CENTER"><IMGSRC="fluid-catgets.gif"></P>
<PALIGN="CENTER"><IMGSRC="fluid-catgets.gif"ALT="I18N using FLUID"></P>
<P>The "#include" field controls the header file to include for I18N; by
default this is <TT><nl_types.h></TT>, the standard I18N file for
@ -68,7 +68,6 @@ all occurances of "->fdui" and edit to use "->user_data()&q
@@ -68,7 +68,6 @@ all occurances of "->fdui" and edit to use "->user_data()&q
<P>The prototype for the functions passed to <TT>fl_add_timeout()</TT>
and <TT>fl_set_idle_callback()</TT> callback are different. </P>
<P><B>All the following XForms calls are missing:</B></P>
@ -51,12 +51,12 @@ Displays a printf-style message in a pop-up box with an "OK" button,
@@ -51,12 +51,12 @@ Displays a printf-style message in a pop-up box with an "OK" button,
waits for the user to hit the button. The message will wrap to fit the
window, or may be many lines by putting <tt>\n</tt> characters into it.
@ -66,7 +66,7 @@ hit a button. The return value is 1 if the user hits Yes, 0 if they
@@ -66,7 +66,7 @@ hit a button. The return value is 1 if the user hits Yes, 0 if they
pick No. The enter key is a shortcut for Yes and ESC is a shortcut
@ -78,7 +78,7 @@ the enter key is a shortcut for button 1. Notice the buttons are
@@ -78,7 +78,7 @@ the enter key is a shortcut for button 1. Notice the buttons are
positioned "backwards" You can hide buttons by passing
@ -89,7 +89,7 @@ returned pointer is only valid until the next time <tt>fl_input()</tt>
@@ -89,7 +89,7 @@ returned pointer is only valid until the next time <tt>fl_input()</tt>
is called</I>. Due to back-compatability, the arguments to any printf
commands in the label are after the default value.
@ -119,7 +119,7 @@ unique features, the major one being that the Tab key completes
@@ -119,7 +119,7 @@ unique features, the major one being that the Tab key completes
filenames like it does in Emacs or tcsh, and the list always shows all
@ -129,7 +129,7 @@ not work. If you do <TT>show()</TT> the window, call <TT>make_current()</TT>
@@ -129,7 +129,7 @@ not work. If you do <TT>show()</TT> the window, call <TT>make_current()</TT>
<H3>Members</H3>
The <TT>Fl_Glut_Window</TT> class contains several public members that can
be altered directly:
<CENTER><TABLEWIDTH="80%"BORDER">
<CENTER><TABLEWIDTH="80%"BORDER="1"ALT="Fl_Glut_Window public members.">
@ -146,8 +146,9 @@ purpose that is entirely well-defined independent of the application.
@@ -146,8 +146,9 @@ purpose that is entirely well-defined independent of the application.
function or table used by this function must be optional: if the
application does not supply it, the square root function must still
compute square roots.) </P>
</BLOCKQUOTE> These requirements apply to the modified work as a whole.
If identifiable sections of that work are not derived from the
</BLOCKQUOTE>
<P>These requirements apply to the modified work as a whole.
If identifiable sections of that work are not derived from the
Library, and can be reasonably considered independent and separate
works in themselves, then this License, and its terms, do not apply to
those sections when you distribute them as separate works. But when
@ -246,14 +247,15 @@ access to copy from a designated place, offer equivalent access to
@@ -246,14 +247,15 @@ access to copy from a designated place, offer equivalent access to
copy the above specified materials from the same place. </P>
<P><STRONG>d)</STRONG> Verify that the user has already received a copy
of these materials or that you have already sent this user a copy. </P>
</BLOCKQUOTE> For an executable, the required form of the "work that
</BLOCKQUOTE>
<P>For an executable, the required form of the "work that
uses the Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the source code distributed need not include anything that is normally
distributed (in either source or binary form) with the major components
(compiler, kernel, and so on) of the operating system on which the
executable runs, unless that component itself accompanies the
executable.</P>
executable.</P>
<P>It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot