Skip to content

Commit

Permalink
Working on the FLUID chapter, to do a new FLTK 1.1.0 beta release...
Browse files Browse the repository at this point in the history
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2007 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
  • Loading branch information
michaelrsweet committed Mar 22, 2002
1 parent 1a8da69 commit 285dd40
Show file tree
Hide file tree
Showing 12 changed files with 48 additions and 32 deletions.
80 changes: 48 additions & 32 deletions documentation/fluid.html
Expand Up @@ -68,50 +68,66 @@ <H2>Running FLUID Under UNIX</H2>
-fg color
-bg color
-bg2 color
-scheme schemename
</PRE>
</UL>
Changing the colors may be useful to see what your interface will look
at if the user calls it with the same switches.
<P>In the current version, if you don't go into the background (with
'&amp;') then you will be able to abort FLUID by typing ^C on the terminal. It
will exit immediately, losing any changes. </P>

<P>Changing the colors may be useful to see what your interface
will look at if the user calls it with the same switches.
Similarly, using "-scheme plastic" will show how the interface
will look using the "plastic" scheme.

<P>In the current version, if you don't put FLUID into the
background with '&amp;' then you will be able to abort FLUID by
typing <KBD>CTRL-C</KBD> on the terminal. It will exit
immediately, losing any changes. </P>

<H2>Running FLUID Under Microsoft Windows</H2>
To run FLUID under WIN32, double-click on the <I>FLUID.exe</I> file.
You can also run FLUID from the Command Prompt window (FLUID always
runs in the background under WIN32).

<P>To run FLUID under WIN32, double-click on the <I>FLUID.exe</I>
file. You can also run FLUID from the Command Prompt window.
FLUID always runs in the background under WIN32.

<H2>Compiling <TT>.fl</TT> files</H2>
FLUID can also be called as a command-line &quot;compiler&quot; to create the
<TT>.cxx</TT> and <TT>.h</TT> file from a <TT>.fl</TT> file. To do this type:

<P>FLUID can also be called as a command-line
&quot;compiler&quot; to create the <TT>.cxx</TT> and <TT>.h</TT>
file from a <TT>.fl</TT> file. To do this type:

<UL><PRE>
fluid -c <I>filename.fl</I>
</PRE></UL>
This will read the <TT>filename.fl</TT> file and write <I>filename.cxx</I> and <I>
filename.h</I>. The directory will be stripped, so they are written to
the current directory always. If there are any errors reading or
writing the files it will print the error and exit with a non-zero
code. In a makefile you can use a line like this:
<UL>
<PRE>

<P>This will read the <TT>filename.fl</TT> file and write
<I>filename.cxx</I> and <I> filename.h</I>. Any leading
directory on <TT>filename.fl</TT> will be stripped, so they are
always written to the current directory. If there are any errors
reading or writing the files, FLUID will print the error and
exit with a non-zero code. You can use the following lines in a
makefile to automate the creation of the source and header
files:

<UL><PRE>
my_panels.h my_panels.cxx: my_panels.fl
fluid -c my_panels.fl
</PRE>
</UL>
Some versions of make will accept rules like this to allow all <TT>.fl</TT>
files found to be compiled:
<UL>
<PRE>
</PRE></UL>

<P>Some versions of make will accept rules that allow all
<TT>.fl</TT> files found to be compiled:

<UL><PRE>
.SUFFIXES: .fl .cxx .h
.fl.h .fl.cxx:
fluid -c $&lt;
</PRE>
</UL>
</PRE></UL>

<H2>A Short Tutorial</H2>

FLUID is an amazingly powerful little program. However, this power
comes at a price as it is not always obvious how to accomplish seemingly
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
program provided with FLTK.
<P>FLUID is an amazingly powerful little program. However, this
power comes at a price as it is not always obvious how to
accomplish seemingly 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 program provided with FLTK.

<P ALIGN=CENTER><IMG SRC="cubeview.gif" ALT="CubeView demo."></P>

Expand Down Expand Up @@ -373,7 +389,7 @@ <h4><a name="addcube">Adding the CubeView Widget</a></h4>
CubeView as a member of CubeViewUI, so any public CubeView methods are
now available to CubeViewUI.

<p align=center><img src="fluid3.gif" ALT="CubeView methods."></p>
<p align=center><img src="fluid3-cxx.gif" ALT="CubeView methods."></p>

<h4><a name="defcall">Defining the Callbacks</a></h4>
Each of the widgets we defined before adding CubeView can have
Expand Down Expand Up @@ -636,7 +652,7 @@ <H4>Box (pulldown menu)</H4>
The boxtype to draw as a background for the widget.
</TD>
<TD>&nbsp;&nbsp;&nbsp;</TD>
<TD VALIGN=TOP WIDTH=378><IMG src="fluid_widget.gif" ALT="The FLUID widget dialog."></TD>
<TD VALIGN=TOP WIDTH=378><IMG src="fluid_widget_gui.gif" ALT="The FLUID widget dialog."></TD>
</TR>
</TABLE>
<P>Many widgets will work, and draw faster, with a &quot;frame&quot; instead of a
Expand Down
Binary file modified documentation/fluid1.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified documentation/fluid2.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added documentation/fluid3-cxx.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added documentation/fluid3-gui.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added documentation/fluid3-style.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed documentation/fluid3.gif
Binary file not shown.
Binary file modified documentation/fluid4.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed documentation/fluid_widget.gif
Binary file not shown.
Binary file added documentation/fluid_widget_cxx.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added documentation/fluid_widget_gui.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added documentation/fluid_widget_style.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 285dd40

Please sign in to comment.