From 74bff0b300b7a44b92d0c41792657e04fbeaee0c Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Mon, 5 Nov 2001 01:07:34 +0000 Subject: Doco updates (more to come) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1681 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- documentation/FL.gif | Bin 1140 -> 6526 bytes documentation/fltk.book | 6 +- documentation/index.html | 157 +++++++++---------- documentation/intro.html | 367 +++++++++++++++++++++++++++------------------ documentation/preface.html | 114 +++++++++----- 5 files changed, 382 insertions(+), 262 deletions(-) (limited to 'documentation') diff --git a/documentation/FL.gif b/documentation/FL.gif index 7e542b8ae..f4fe8fb51 100644 Binary files a/documentation/FL.gif and b/documentation/FL.gif differ diff --git a/documentation/fltk.book b/documentation/fltk.book index e8d0dc22c..e56572c26 100644 --- a/documentation/fltk.book +++ b/documentation/fltk.book @@ -1,5 +1,5 @@ -#HTMLDOC 1.8.14 --t pdf13 -f fltk.pdf --book --toclevels 2 --no-numbered --toctitle "Table of Contents" --title --titleimage FL.gif --linkstyle underline --size Universal --left 1.00in --right 0.50in --top 0.50in --bottom 0.50in --header .t. --footer h.1 --tocheader .t. --tocfooter ..i --duplex --portrait --color --no-pscommands --compression=9 --jpeg=50 --fontsize 11.0 --fontspacing 1.2 --headingfont Helvetica --bodyfont Times --headfootsize 11.0 --headfootfont Helvetica --charset 8859-1 --links --no-truetype --pagemode outline --pagelayout single --firstpage c1 --pageeffect none --pageduration 10 --effectduration 1.0 --no-encryption --permissions all --owner-password "" --user-password "" --browserwidth 680 +#HTMLDOC 1.8.16 +-t pdf13 -f fltk.pdf --book --toclevels 2 --no-numbered --toctitle "Table of Contents" --title --titleimage FL.gif --linkstyle underline --size Universal --left 1.00in --right 0.50in --top 0.50in --bottom 0.50in --header .t. --footer h.1 --tocheader .t. --tocfooter ..i --duplex --portrait --color --no-pscommands --no-xrxcomments --compression=9 --jpeg=50 --fontsize 11.0 --fontspacing 1.2 --headingfont Helvetica --bodyfont Times --headfootsize 11.0 --headfootfont Helvetica --charset 8859-1 --links --no-truetype --pagemode outline --pagelayout single --firstpage c1 --pageeffect none --pageduration 10 --effectduration 1.0 --no-encryption --permissions all --owner-password "" --user-password "" --browserwidth 680 preface.html intro.html basics.html @@ -13,8 +13,8 @@ opengl.html widgets.html Fl_Adjuster.html Fl_Box.html -Fl_Browser.html Fl_Browser_.html +Fl_Browser.html Fl_Button.html Fl_Chart.html Fl_Check_Button.html diff --git a/documentation/index.html b/documentation/index.html index 404eead2a..2f27c7f71 100644 --- a/documentation/index.html +++ b/documentation/index.html @@ -1,93 +1,94 @@ - + + FLTK 1.1.0 Programming Manual - +
- - + +
FL -

FLTK 1.1.0 Programming Manual

-Revision 0 by Michael Sweet, Craig P. Earls, and Bill Spitzak
-Copyright 1998-2001 by Bill Spitzak and others.
-
+ FL +

FLTK 1.1.0 Programming Manual

+

Revision 1 by Michael Sweet, Craig P. Earls, and Bill Spitzak
+ Copyright 1998-2001 by Bill Spitzak and others.

+
- + +
- +
-This software is provided under the terms of the GNU Library General -Public License. -This software is provided under the terms of the GNU Library General + Public License.
- + +
- - + +
-Preface -
-
-1 - Introduction to FLTK -
-
-2 - FLTK Basics -
-
-3 - Common Widgets and Attributes - -4 - Designing a Simple Text Editor -
-
-5 - Drawing Things in FLTK -
-
-6 - Handling Events - -7 - Adding and Extending -Widgets -
-8 - Programming with FLUID - -9 - Using OpenGL -
-
-A - Widget Reference -
-
-B - Function Reference -
-
-C - FLTK Enumerations.H - -
-
-D - GLUT Compatibility - -E - Forms Compatibility -
-
-F - Operating System Issues -
-
-G - Software License -
Preface +
+
+ 1 - Introduction to FLTK +
+
+ 2 - FLTK Basics +
+
+ 3 - Common Widgets and Attributes + + 4 - Designing a Simple Text Editor +
+
+ 5 - Drawing Things in FLTK +
+
+ 6 - Handling Events + + 7 - Adding and Extending + Widgets +
+ 8 - Using OpenGL +
+
+ 9 - Programming with FLUID + + A - Class Reference +
+
+ B - Function Reference +
+
+ C - FLTK Enumerations.H + +
+
+ D - GLUT Compatibility + + E - Forms Compatibility +
+
+ F - Operating System Issues +
+
+ G - Software License +
diff --git a/documentation/intro.html b/documentation/intro.html index 524dcb038..fe9d5fcac 100644 --- a/documentation/intro.html +++ b/documentation/intro.html @@ -1,173 +1,256 @@ - -

1 - Introduction to FLTK

-The Fast Light Tool Kit ("FLTK", pronounced "fulltick") is a LGPL'd -C++ graphical user interface toolkit for X (UNIX®), OpenGL®, and -Microsoft® Windows® 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. + + +

1 - Introduction to FLTK

+ +

The Fast Light Tool Kit ("FLTK", pronounced +"fulltick") is a LGPL'd C++ graphical user interface +toolkit for X (UNIX®), OpenGL®, and Microsoft® +Windows® 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.

+

History of FLTK

-It has always been Bill's belief that the GUI API of all modern -systems is much too high level. Toolkits (even FL) are not what -should be provided and documented as part of an operating system. The + +

It has always been Bill's belief that the GUI API of all modern +systems is much too high level. Toolkits (even FL) are not 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 unalterable -method of delivering events to the owners of the windows. NeXT (if +method of delivering events to the owners of the windows. NeXT (if you ignored NextStep) provided this, but they chose to hide it and -tried to push their own baroque toolkit instead... -

Many of the ideas in FLTK were developed on a NeXT (but not -using NextStep) in 1987 in a C toolkit Bill called "views". 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 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.

-

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 "views" 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.

-

With the death of NeWS Bill realized that he would have to live with -X. The biggest problem with X is the "window manager", which means -that the toolkit can no longer control the window borders or drag the -window around.

-

At Digital Domain Bill discovered another toolkit, "Forms". 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 programs were created using this version of -Forms.

-

The need to switch to OpenGL and GLX, portability, and a desire to -use C++ subclassing required a rewrite of Forms. This produced the -first version of FLTK. The conversion to C++ required so many changes -it made it impossible to recompile any Forms objects. Since it was -incompatible anyway, Bill decided to incorporate his older ideas as -much as possible by simplifying the lower level interface and the event -passing mechanisim.

-

Bill received permission to release it for free on the Internet, -with the GNU general public license. Response from Internet users -indicated that the Linux market dwarfed the SGI and high-speed GL -market, so he rewrote it to use X for all drawing, greatly speeding it -up on these machines. That is the version you have now.

-

Digital Domain has since withdrawn support for FLTK. While Bill is -no longer able to actively develop it, he still contributes to FLTK in -his free time and is a part of the FLTK development team.

+tried to push their own baroque toolkit instead...

+ +

Many of the ideas in FLTK were developed on a NeXT (but +not using NextStep) in 1987 in a C toolkit Bill called +"views". 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 +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.

+ +

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 +"views" 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.

+ +

With the death of NeWS Bill realized that he would have to +live with X. The biggest problem with X is the "window +manager", which means that the toolkit can no longer +control the window borders or drag the window around.

+ +

At Digital Domain Bill discovered another toolkit, +"Forms". 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 +programs were created using this version of Forms.

+ +

The need to switch to OpenGL and GLX, portability, and a +desire to use C++ subclassing required a rewrite of Forms. +This produced the first version of FLTK. The conversion to C++ +required so many changes it made it impossible to recompile any +Forms objects. Since it was incompatible anyway, Bill decided +to incorporate his older ideas as much as possible by +simplifying the lower level interface and the event passing +mechanisim.

+ +

Bill received permission to release it for free on the +Internet, with the GNU general public license. Response from +Internet users indicated that the Linux market dwarfed the SGI +and high-speed GL market, so he rewrote it to use X for all +drawing, greatly speeding it up on these machines. That is the +version you have now.

+ +

Digital Domain has since withdrawn support for FLTK. While +Bill is no longer able to actively develop it, he still +contributes to FLTK in his free time and is a part of the FLTK +development team.

+

Features

- FLTK was designed to be statically linked. This was done by splitting -it into many small objects and desigining it so that functions that are -not used do not have pointers to them in the parts that are used, and -thus do not get linked in. This allows you to make an easy-to-install -program, or to modify FLTK to the exact requirements of your -application, without worrying about bloat. FLTK works fine as a shared -library, though, and has started being included on Linux distributions. -

Here are some of the core features unique to FLTK:

+ +

FLTK was designed to be statically linked. This was done by +splitting it into many small objects and designing it so that +functions that are not used do not have pointers to them in the +parts that are used, and thus do not get linked in. This allows +you to make an easy-to-install program or to modify FLTK to +the exact requirements of your application without worrying +about bloat. FLTK works fine as a shared library, though, and +is now included with several Linux distributions.

+ +

Here are some of the core features unique to FLTK:

+ +

Licensing

- FLTK comes with complete free source code. FLTK is available under the -terms of the GNU Library General Public License. -Contrary to popular belief, it can be used in commercial software! -(Even Bill Gates could use it.) + +

FLTK comes with complete free source code. FLTK is available +under the terms of the GNU Library +General Public License with ammendments that allow for +static linking. Contrary to popular belief, it can be used in +commercial software - even Bill Gates could use it!

+

What Does "FLTK" Mean?

- FLTK was originally designed to be compatible with the Forms Library -written for SGI machines. In that library all the functions and -structures started with "fl_". This naming was extended to all new -methods and widgets in the C++ library, and this prefix was taken as -the name of the library. It is almost impossible to search for "FL" on -the Internet, due to the fact that it is also the abbreviation for -Florida. After much debating and searching for a new name for the -toolkit, which was already in use by several people, Bill came up with -"FLTK", and even a bogus excuse that it stands for "The Fast Light Tool -Kit". + +

FLTK was originally designed to be compatible with the Forms +Library written for SGI machines. In that library all the +functions and structures started with "fl_". This +naming was extended to all new methods and widgets in the C++ +library, and this prefix was taken as the name of the library. +It is almost impossible to search for "FL" on the +Internet, due to the fact that it is also the abbreviation for +Florida. After much debating and searching for a new name for +the toolkit, which was already in use by several people, Bill +came up with "FLTK", including a bogus excuse that it +stands for "The Fast Light Toolkit".

+

Building and Installing FLTK Under UNIX

-In most cases you can just type "make". This will run configure with -the default of no options and then compile everything. -

FLTK uses GNU autoconf to configure itself for your UNIX platform. -The main things that the configure script will look for are the X11 and -OpenGL (or Mesa) header and library files. If these cannot be -found in the standard include/library locations you'll need to define the -CFLAGS, CXXFLAGS, and LDFLAGS environment -variables. For the Bourne and Korn shells you'd use:

+ +

In most cases you can just type "make". This will +run configure with the default of no options and then compile +everything.

+ +

FLTK uses GNU autoconf to configure itself for your UNIX +platform. The main things that the configure script will look +for are the X11 and OpenGL (or Mesa) header and library files. +If these cannot be found in the standard include/library +locations you'll need to define the CFLAGS, +CXXFLAGS, and LDFLAGS environment variables. +For the Bourne and Korn shells you'd use:

+ -For C shell and tcsh, use: + +

For C shell and tcsh, use:

+ -By default configure will look for a C++ compiler named CC, c++, -g++, or gcc in that order. To use another compiler you need -to set the CXX environment variable: + +

By default configure will look for a C++ compiler named +CC, c++, g++, or gcc in that +order. To use another compiler you need to set the CXX +environment variable:

+ -The CC environment variable can also be used to override the -default C compiler (cc or gcc), which is used for a -few FLTK source files. -

You can run configure yourself to get the exact setup you need. Type -"./configure <options>", where options are:

+ +

The CC environment variable can also be used to +override the default C compiler (cc or gcc), +which is used for a few FLTK source files.

+ +

You can run configure yourself to get the exact setup you +need. Type "./configure <options>", where +options are:

+
-
--enable-debug
-
Enable debugging code & symbols
-
--enable-shared
-
Enable generation of shared libraries
-
--bindir=/path
-
Set the location for executables [default = /usr/local/bin]
-
--libdir=/path
-
Set the location for libraries [default = /usr/local/lib]
-
--includedir=/path
-
Set the location for include files. [default = /usr/local/include]
-
--prefix=/dir
-
Set the directory prefix for files [default = /usr/local]
+ +
--enable-debug
+
Enable debugging code & symbols
+ +
--enable-shared
+
Enable generation of shared libraries
+ +
--bindir=/path
+
Set the location for executables [default = $prefix/bin]
+ +
--datadir=/path
+
Set the location for data files. [default = $prefix/share]
+ +
--libdir=/path
+
Set the location for libraries [default = $prefix/lib]
+ +
--includedir=/path
+
Set the location for include files. [default = $prefix/include]
+ +
--mandir=/path
+
Set the location for man pages. [default = $prefix/man]
+ +
--prefix=/dir
+
Set the directory prefix for files [default = /usr/local]
+
- When the configure script is done you can just run the "make" command. -This will build the library, FLUID tool, and all of the test programs. -

To install the library, become root and type "make install". This -will copy the "fluid" executable to "bindir", the header files to -"includedir", and the library files to "libdir".

+ +

When the configure script is done you can just run the +"make" command. This will build the library, FLUID +tool, and all of the test programs.

+ +

To install the library, become root and type "make +install". This will copy the "fluid" executable +to "bindir", the header files to +"includedir", and the library files to +"libdir".

+

Building FLTK Under Microsoft Windows

-There are two ways to build FLTK under Microsoft Windows. The first -is to use the Visual C++ 5.0 project files under the "visualc" -directory. Just open (or double-click on) the "fltk.dsw" file to get -the whole shebang. -

The second method is to use a GNU-based development tool with the -files in the "makefiles" directory. To build using one of these tools -simply copy the appropriate makeinclude and config files to the main -directory and do a make:

- +

Using the Visual C++ DLL Library

The "fltkdll.dsp" project file builds a DLL-version of the FLTK library. Because of name mangling differences between PC compilers (even diff --git a/documentation/preface.html b/documentation/preface.html index 9635d16d8..a5ff66532 100644 --- a/documentation/preface.html +++ b/documentation/preface.html @@ -2,65 +2,101 @@ - + FLTK 1.1.0 Programming Manual +

Preface

-This manual describes the Fast Light Tool Kit ("FLTK") + +

This manual describes the Fast Light Tool Kit ("FLTK") version 1.1.0, a C++ Graphical User Interface ("GUI") toolkit for UNIX and Microsoft Windows. Each of the chapters in this manual is designed as a tutorial for using FLTK, while the appendices provide a convenient reference for all FLTK widgets, functions, and operating system -interfaces. +interfaces.

+

Organization

- This manual is organized into the following chapters and appendices: + +

This manual is organized into the following chapters and appendices:

+ +

Conventions

- The following typeface conventions are used in this manual: + +

The following typeface conventions are used in this manual:

+ +

Abbreviations

- The following abbreviations are used in this manual: + +

The following abbreviations are used in this manual:

+
-
X11
-
The X Window System version 11.
-
Xlib
-
The X Window System interface library.
-
WIN32
-
The Microsoft Windows 32-bit Application Programmer's Interface.
+ +
X11
+
The X Window System version 11.
+ +
Xlib
+
The X Window System interface library.
+ +
WIN32
+
The Microsoft Windows 32-bit Application Programmer's Interface.
+
+

Copyrights and Trademarks

- FLTK is Copyright 1998-2001 by Bill Spitzak and others. Use and + +

FLTK is Copyright 1998-2001 by Bill Spitzak and others. Use and distribution of FLTK is governed by the GNU Library General Public -License, located in Appendix G. +License, located in Appendix G.

+

UNIX is a registered trademark of the X Open Group, Inc. Microsoft and Windows are registered trademarks of Microsoft Corporation. OpenGL is a registered trademark of Silicon Graphics, Inc.

- + + + -- cgit v1.2.3