From 0e6e2393bfc7eeaa47b8a2ebd6c2023f560d7a90 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Fri, 28 Apr 2000 18:15:26 +0000 Subject: Typos reported by Alexander Mai Fl_Browser_ docos finished. Added Fl_Group::init_sizes() description. Added links for common widgets in chapter 3 (?) Fixed formatting problems in subclassing and FLUID chapters. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1100 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- documentation/Fl_Browser.html | 10 + documentation/Fl_Browser_.html | 403 +++++++++++++++++++++++++++++++++------- documentation/Fl_Chart.html | 2 +- documentation/Fl_Group.html | 11 +- documentation/Fl_Input.html | 4 +- documentation/basics.html | 31 ++-- documentation/common.html | 46 ++--- documentation/drawing.html | 2 +- documentation/editor.html | 2 +- documentation/enumerations.html | 13 +- documentation/events.html | 23 ++- documentation/fluid.html | 56 +++--- documentation/functions.html | 11 +- documentation/intro.html | 34 ++-- documentation/license.html | 12 +- documentation/subclassing.html | 6 +- 16 files changed, 493 insertions(+), 173 deletions(-) (limited to 'documentation') diff --git a/documentation/Fl_Browser.html b/documentation/Fl_Browser.html index 26207eebf..6d34ea4c9 100644 --- a/documentation/Fl_Browser.html +++ b/documentation/Fl_Browser.html @@ -50,31 +50,41 @@ subclass of Fl_Browser_.

+ + + + +
diff --git a/documentation/Fl_Browser_.html b/documentation/Fl_Browser_.html index ad5c4ef1e..14aa12a73 100644 --- a/documentation/Fl_Browser_.html +++ b/documentation/Fl_Browser_.html @@ -1,6 +1,6 @@
-

class Fl_Browser_

+

class Fl_Browser_


Class Hierarchy

Description

This widget displays simple charts and is provided for Forms compatibility. +

Methods

@@ -115,5 +116,4 @@ proportionate slice in the circle.
Each sample value is drawn as a vertical line.
The second form of type() sets the chart type to t. -
diff --git a/documentation/Fl_Group.html b/documentation/Fl_Group.html index 2f75c46ed..ee8930c85 100644 --- a/documentation/Fl_Group.html +++ b/documentation/Fl_Group.html @@ -50,10 +50,11 @@ behavior. selection.
@@ -77,6 +78,14 @@ that it is destroyed last. The widget is removed from it's current group (if any) and then added to the end of this group. +

void Fl_Group::init_sizes()

+ +The Fl_Group widget keeps track of the original widget sizes and +positions when resizing occurs so that if you resize a window back to its +original size the widgets will be in the correct places. If you rearrange +the widgets in your group, call this method to register the new arrangement +with the Fl_Group that contains them. +

void Fl_Group::insert(Fl_Widget &w, int n)

The widget is removed from it's current group (if any) and then diff --git a/documentation/Fl_Input.html b/documentation/Fl_Input.html index 56d751184..8e5a248d0 100644 --- a/documentation/Fl_Input.html +++ b/documentation/Fl_Input.html @@ -73,8 +73,8 @@ expected.
RightCtrl or -
Compose
-Start a compose-character +
Compose
Start +a compose-character sequence. The next one or two keys typed define the character to insert (see table that follows.) diff --git a/documentation/basics.html b/documentation/basics.html index b31186dc7..9d48c5751 100644 --- a/documentation/basics.html +++ b/documentation/basics.html @@ -65,8 +65,8 @@ better and can be used with the "optimized for speed" setting.

program must include a header file for each FLTK class it uses. Listing 1 shows a simple "Hello, World!" program that uses FLTK to display the window. - +

Fl::event_button() Values

+ +

The following constants define the button numbers for FL_PUSH and +FL_RELEASE events: + +

    +
  • FL_LEFT_MOUSE - the left mouse button +
  • FL_MIDDLE_MOUSE - the middle mouse button +
  • FL_RIGHT_MOUSE - the right mouse button +
+

Fl::event_key() Values

The following constants define the non-ASCII keys on the keyboard for FL_KEYBOARD and FL_SHORTCUT events: @@ -180,7 +191,7 @@ In addition there are two inline functions to allow you to select grays or colors from the FLTK colormap:

Fl_Color fl_gray_ramp(int i) -
Returs a gray color. Returns black for zero, returns white for +
Returns a gray color. Returns black for zero, returns white for FL_NUM_GRAY (which is 24) minus 1. To get the closest to an 8-bit gray value 'I' use fl_gray_ramp(I*FL_NUM_GRAY/256) diff --git a/documentation/events.html b/documentation/events.html index 502be762f..12072d73a 100644 --- a/documentation/events.html +++ b/documentation/events.html @@ -3,16 +3,23 @@ This chapter discusses the FLTK event model and how to handle events in your program or widget.

The FLTK Event Model

- Events are identified by the integer argument passed to the -Fl_Widget::handle() virtual method. Other information -about the most recent event is stored in static locations and acquired -by calling the Fl::event_*() methods. -This static information remains valid until the next event is read from -window system (i.e. it is ok to look at it outside of the handle() - method). + +

Every time a user moves the mouse pointer, clicks a button, or presses +a key, an event is generated and sent to your application. Events can also +come from other programs like the window manager. + +

Events are identified by the integer argument passed to the + Fl_Widget::handle() virtual +method. Other information about the most recent event is stored in +static locations and acquired by calling the Fl::event_*() methods. This static +information remains valid until the next event is read from window +system (i.e. it is ok to look at it outside of the handle() +method). +

Mouse Events

FL_PUSH

- A mouse button has gone down with the mouse pointing at this widget. +A mouse button has gone down with the mouse pointing at this widget. You can find out what button by calling Fl::event_button(). You find out the mouse position by calling Fl::event_x() and diff --git a/documentation/fluid.html b/documentation/fluid.html index ebd60af3f..b4a4cc2cd 100644 --- a/documentation/fluid.html +++ b/documentation/fluid.html @@ -1,24 +1,36 @@

8 - Programming with FLUID

- This chapter shows how to use the Fast Light User-Interface Designer + +This chapter shows how to use the Fast Light User-Interface Designer ("FLUID") to create your GUIs. +

What is FLUID?

- The Fast Light User Interface Designer, or FLUID, is a graphical + +

The Fast Light User Interface Designer, or FLUID, is a graphical editor that is used to produce FLTK source code. +

FLUID edits and saves its state in .fl files. These files are text, and you can (with care) edit them in a text editor, perhaps to get some special effects.

+

FLUID can "compile" the .fl file into a .cxx and a .h file. The .cxx file defines all the objects from the .fl file and the .h file declares all the global ones.

+ +

FLUID also supports localization (Internationalization) +of label strings using message files and the GNU gettext or POSIX catgets +interfaces. +

A simple program can be made by putting all your code (including a main() function) into the .fl file and thus making the .cxx file a single source file to compile. Most programs are more complex than this, so you write other .cxx files that call the FLUID functions. - These .cxx files must #include the .h file or they can +These .cxx files must #include the .h file or they can #include the .cxx file so it still appears to be a single source file. +

+

Normally the FLUID file defines one or more functions or classes which output C++ code. Each function defines a one or more FLTK windows, and all the widgets that go inside those windows.

@@ -61,7 +73,7 @@ save-as to write it to a file). Changing the colors may be useful to see what your interface will look at if the user calls it with the same switches.

In the current version, if you don't go into the background (with -'&' then you will be able to abort FLUID by typing ^C on the terminal. It +'&') then you will be able to abort FLUID by typing ^C on the terminal. It will exit immediately, losing any changes.

Running FLUID Under Microsoft Windows

To run FLUID under WIN32, double-click on the FLUID.exe file. @@ -81,7 +93,7 @@ code. In a makefile you can use a line like this:
     my_panels.h my_panels.cxx: my_panels.fl
    -	FLUID -c my_panels.fl
    +	fluid -c my_panels.fl
     
Some versions of make will accept rules like this to allow all .fl @@ -90,16 +102,16 @@ files found to be compiled:
 .SUFFIXES: .fl .cxx .h
 .fl.h .fl.cxx:
-	FLUID -c $<
+	fluid -c $<
 

A Short Tutorial

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

@@ -524,10 +536,6 @@ to reorder functions, classes, and windows within functions.

Edit/Later (F3)

Moves all of the selected widgets one later in order among the children of their parent (if possible). -

- - - - - -

Edit/Group (F7)

Creates a new Fl_Group and make all the currently selected widgets children of it. @@ -539,14 +547,13 @@ selection. This makes it easier to see box borders and how the layout looks. The overlays will be forced back on if you change the selection.

Edit/Preferences (Alt+p)

+ Displays the preferences panel. The alignment preferences control the 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 to actually change. -
+ +

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 @@ -600,9 +607,7 @@ the widgets more accurately, especially when setting the box type. for the fields. In this case the value for one of the widgets is shown. But if you change this value, all of the selected widgets are changed to the new value. - - - + + + +
Hitting "OK" makes the changes permanent. Selecting a different +

Hitting "OK" makes the changes permanent. Selecting a different widget also makes the changes permanent. FLUID checks for simple syntax errors such as mismatched parenthesis in any code before saving any text. @@ -611,6 +616,10 @@ the panel or hit OK. However in the current version of FLUID, changes 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. + + + + -

Widget Attributes

Name (text field)

Name of a variable to declare, and to store a pointer to this @@ -620,13 +629,16 @@ blank then no variable is created. etc. This will cause FLUID to declare an array of pointers. The array is big enough that the highest number found can be stored. All widgets that in the array must be the same type.

-

Type (upper-right pulldown menu)

Some classes have subtypes that modify their appearance or behavior. You pick the subtype off of this menu.

Box (pulldown menu)

- The boxtype to draw as a background for the widget. +The boxtype to draw as a background for the widget. +
   

Many widgets will work, and draw faster, with a "frame" instead of a "box". A frame does not draw the colored interior, leaving whatever was already there visible. Be careful, as FLUID may draw this ok but diff --git a/documentation/functions.html b/documentation/functions.html index e0996deed..c875420e8 100644 --- a/documentation/functions.html +++ b/documentation/functions.html @@ -4,13 +4,14 @@ methods. For a description of the FLTK widgets, see Appendix A.

Functions

-

int fl_color_chooser(const char*, double +

int fl_color_chooser(const char *title, double &r, double &g, double &b) -
int fl_color_chooser(const char *, uchar &r, uchar &g, uchar &b)
+
int fl_color_chooser(const char *title, uchar &r, uchar &g, uchar &b)

- The double version takes RGB values in the range 0.0 to 1.0. The -uchar version takes RGB values in the range 0 to 255. -

+The double version takes RGB values in the range 0.0 to 1.0. The +uchar version takes RGB values in the range 0 to 255. The title +argument specifies the label (title) for the window. +

fl_color_chooser() pops up a window to let the user pick an arbitrary RGB color. They can pick the hue and saturation in the "hue box" on the left (hold down CTRL to just change the saturation), and diff --git a/documentation/intro.html b/documentation/intro.html index 19b9ca680..0d31c139e 100644 --- a/documentation/intro.html +++ b/documentation/intro.html @@ -191,25 +191,23 @@ make

Internet Resources

FLTK is available on the 'net in a bunch of locations:
-
WWW
-
http://www.fltk.org
-
FTP
-
ftp://ftp.fltk.org/pub/fltk -
-
ftp://ftp.easysw.com/pub/fltk -
-
-ftp://ftp.funet.fi/mirrors/ftp.easysw.com/pub/fltk
-
-ftp.northamerica.net/pub/ESP/fltk -
-
EMail
-
fltk@fltk.org [see -instructions below]
-
fltk-bugs@fltk.org [for -reporting bugs]
+
WWW +
http://www.fltk.org + +
FTP +
California, USA (ftp.fltk.org) +
Maryland, USA (ftp2.easysw.com) +
Espoo, Finland (ftp.funet.fi) +
Germany (linux.mathematik.tu-darmstadt.de) +
Austria (gd.tuwien.ac.at) + +
EMail
+
fltk@fltk.org [see + instructions below] +
fltk-bugs@fltk.org [for + reporting bugs]
- To send a message to the FLTK mailing list ("fltk@fltk.org") you +To send a message to the FLTK mailing list ("fltk@fltk.org") you must first join the list. Non-member submissions are blocked to avoid problems with unsolicited email.

To join the FLTK mailing list, send a message to diff --git a/documentation/license.html b/documentation/license.html index dcbeb2c90..330b26b24 100644 --- a/documentation/license.html +++ b/documentation/license.html @@ -1,6 +1,6 @@

G - Software License

-

GNU LIBRARY GENERAL PUBLIC LICENSE

+

GNU LIBRARY GENERAL PUBLIC LICENSE

Version 2, June 1991
Copyright (C) 1991 Free Software Foundation, Inc.
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA @@ -8,7 +8,7 @@ this license document, but changing it is not allowed.
[This is the first released version of the library GPL. It is numbered 2 because it goes with version 2 of the ordinary GPL.]

-

Preamble

+

Preamble

The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free @@ -83,8 +83,8 @@ former contains code derived from the library, while the latter only works together with the library.

Note that it is possible for a library to be covered by the ordinary General Public License rather than by this special one.

-

TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND -MODIFICATION

+

TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND +MODIFICATION

0. This License Agreement applies to any software library which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this @@ -352,7 +352,7 @@ Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.

-

NO WARRANTY

+

NO WARRANTY

15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT @@ -372,5 +372,5 @@ RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

-

END OF TERMS AND CONDITIONS

+

END OF TERMS AND CONDITIONS

diff --git a/documentation/subclassing.html b/documentation/subclassing.html index 6df01be99..5d061a1c1 100644 --- a/documentation/subclassing.html +++ b/documentation/subclassing.html @@ -361,7 +361,7 @@ should call this on all the children if your own damage is equal to FL_DAMAGE_CHILD. Nothing is done if the child is not visible() or if it is clipped.

Cut and Paste Support

- FLTK provides routines to cut and paste ASCII text (in the future this + FLTK provides routines to cut and paste 8-bit text (in the future this may be UTF-8) between applications: - It may be possible to cut/paste non-ASCII data by using +It may be possible to cut/paste non-text data by using Fl::add_handler().

Making a subclass of Fl_Window

- You may want your widget to be a subclass of Fl_Window. This +You may want your widget to be a subclass of Fl_Window. This can be useful if your widget wants to occupy an entire window, and can also be used to take advantage of system-provided clipping, or to work with a library that expects a system window ID to indicate where to -- cgit v1.2.3