From b5f85fd9d681a5cbbbc022bf0b2b23ba7eeeb41b Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Wed, 10 Mar 1999 20:18:38 +0000 Subject: Changed PostScript output to Level 1 for maximum compatibility. Fixed some more typos and formatting problems. git-svn-id: file:///fltk/svn/fltk/trunk@415 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- documentation/Fl_Menu_Item.html | 21 +++-- documentation/Makefile | 6 +- documentation/events.html | 192 ++++++++++++++++++++-------------------- documentation/fluid.html | 170 ++++++++++++++++++++--------------- documentation/intro.html | 5 +- 5 files changed, 211 insertions(+), 183 deletions(-) diff --git a/documentation/Fl_Menu_Item.html b/documentation/Fl_Menu_Item.html index 3f1fc10fd..3ae3a389e 100644 --- a/documentation/Fl_Menu_Item.html +++ b/documentation/Fl_Menu_Item.html @@ -47,10 +47,8 @@ enum { // values for flags: }; - Typically menu items are statically defined; for example: - - -
-
+Typically menu items are statically defined; for example: 
+
     Fl_Menu_Item popup[] = {
       {"&alpha",   FL_ALT+'a', the_cb, (void*)1},
       {"&beta",    FL_ALT+'b', the_cb, (void*)2},
    @@ -69,15 +67,16 @@ Fl_Menu_Item popup[] = {
       {"check",    FL_ALT+'i', 0, 0, FL_MENU_TOGGLE|FL_MENU_VALUE},
       {"box",      FL_ALT+'i', 0, 0, FL_MENU_TOGGLE},
     {0}};
    -	
    -
- A submenu title is identified by the bit FL_SUBMENU in the -flags field, and ends with a label() that is NULL -. You can nest menus to any depth. A pointer to the first item in the + +produces: +

+ +A submenu title is identified by the bit FL_SUBMENU in the +flags field, and ends with a label() that is NULL. +You can nest menus to any depth. A pointer to the first item in the submenu can be treated as an Fl_Menu array itself. It is also possible to make seperate submenu arrays with FL_SUBMENU_POINTER - flags. +flags.

You should use the method functions to access structure members and not access them directly to avoid compatibility problems with future releases of FLTK.

diff --git a/documentation/Makefile b/documentation/Makefile index 155c938a0..87c5a2d23 100644 --- a/documentation/Makefile +++ b/documentation/Makefile @@ -1,5 +1,5 @@ # -# "$Id: Makefile,v 1.8 1999/02/22 22:17:48 mike Exp $" +# "$Id: Makefile,v 1.9 1999/03/10 20:18:37 mike Exp $" # # Documentation makefile for the Fast Light Tool Kit (FLTK). # @@ -134,7 +134,7 @@ fltk.d/index.html: $(HTMLFILES) fltk.ps: $(HTMLFILES) @echo "Generating PostScript documentation..." - @$(HTMLDOC) -f fltk.ps --jpeg --duplex --verbose --toclevels 2 --title FL.gif $(HTMLFILES) + @$(HTMLDOC) -f fltk.ps -t ps1 --duplex --verbose --toclevels 2 --title FL.gif $(HTMLFILES) fltk.pdf: $(HTMLFILES) @echo "Generating PDF documentation..." @@ -142,5 +142,5 @@ fltk.pdf: $(HTMLFILES) @$(HTMLDOC) -f fltk.pdf --jpeg --compression=9 --duplex --verbose --toclevels 2 --title FL.gif $(HTMLFILES) # -# End of "$Id: Makefile,v 1.8 1999/02/22 22:17:48 mike Exp $". +# End of "$Id: Makefile,v 1.9 1999/03/10 20:18:37 mike Exp $". # diff --git a/documentation/events.html b/documentation/events.html index 525087ff7..a7fcdb44c 100644 --- a/documentation/events.html +++ b/documentation/events.html @@ -192,132 +192,132 @@ calls XK_Multi_key. KeysChar - spnbsp - *° - A`À - D-Ð - a`à - d-ð + spnbsp + *° + A`À + D-Ð + a`à + d-ð - !¡ - +-± - A'Á - N~Ñ - a'á - n~ñ + !¡ + +-± + A'Á + N~Ñ + a'á + n~ñ - %¢ - 2² - A^Â - O`Ò - a^â - o`ò + %¢ + 2² + A^Â + O`Ò + a^â + o`ò - #£ - 3³ - A~Ã - O'Ó - a~ã - o'ó + #£ + 3³ + A~Ã + O'Ó + a~ã + o'ó - $¤ - '´ - A:Ä - O^Ô - a:ä - o^ô + $¤ + '´ + A:Ä + O^Ô + a:ä + o^ô - y=¥ - uµ - A*Å - O~Õ - a*å - o~õ + y=¥ + uµ + A*Å + O~Õ + a*å + o~õ - |¦ - p¶ - AEÆ - O:Ö - aeæ - o:ö + |¦ + p¶ + AEÆ + O:Ö + aeæ + o:ö - &§ - .· - C,Ç - x× - c,ç - -:÷ + &§ + .· + C,Ç + x× + c,ç + -:÷ - :¨ - ,¸ - E`È - O/Ø - e`è - o/ø + :¨ + ,¸ + E`È + O/Ø + e`è + o/ø - c© - 1¹ - E'É - U`Ù - e'é - u`ù + c© + 1¹ + E'É + U`Ù + e'é + u`ù - aª - oº - E^Ê - U'Ú - e^ê - u'ú + aª + oº + E^Ê + U'Ú + e^ê + u'ú - <<« - >>» - E:Ë - U^Û - e:ë - u^û + <<« + >>» + E:Ë + U^Û + e:ë + u^û - ~¬ - 14¼ - I`Ì - U:Ü - i`ì - u:ü + ~¬ + 14¼ + I`Ì + U:Ü + i`ì + u:ü - -­ - 12½ - I'Í - Y'Ý - i'í - y'ý + -­ + 12½ + I'Í + Y'Ý + i'í + y'ý - r® - 34¾ - I^Î - DDÞ - i^î - ddþ + r® + 34¾ + I^Î + DDÞ + i^î + ddþ - _¯ - ?¿ - I:Ï - ssß - i:ï - y:ÿ + _¯ + ?¿ + I:Ï + ssß + i:ï + y:ÿ diff --git a/documentation/fluid.html b/documentation/fluid.html index e2dfcbd7d..680598c3a 100644 --- a/documentation/fluid.html +++ b/documentation/fluid.html @@ -94,17 +94,16 @@ files found to be compiled:

A Short Tutorial

-FLUID is an amazingly powerful little program. However, -this power comes at a price, 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. -

- - - - - -
-The program shown to the right is called CubeView. The window you see -is of class CubeViewUI, and is completely generated by FLUID, including + +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 below. + +

+ +

The window is of class CubeViewUI, and is completely generated by FLUID, including class member functions. The central display of the cube is a separate subclass of Fl_Gl_Window called CubeView. CubeViewUI manages CubeView using callbacks from the various sliders and rollers to manipulate the @@ -120,10 +119,7 @@ classes. href="Fl_Gl_Window.html#Fl_Gl_Window">Fl_Gl_Window to suit your purposes. -

+

The CubeView Class

The CubeView class is a subclass of Fl_Gl_Window. It has methods for setting the zoom, the x and y pan, and the rotation angle @@ -216,42 +212,85 @@ CubeView::CubeView(int x,int y,int w,int h,const char *l) void CubeView::drawCube() { /* Draw a colored cube */ - glBegin(GL_LINE_LOOP); glColor4ub(CUBECOLOR); v3f(boxv0); - v3f(boxv1); v3f(boxv2); v3f(boxv3); glEnd(); - - glBegin(GL_LINE_LOOP); glColor4ub(CUBECOLOR); v3f(boxv5); - v3f(boxv4); v3f(boxv7); v3f(boxv6); glEnd(); +#define ALPHA 0.5 + glShadeModel(GL_FLAT); + + glBegin(GL_QUADS); + glColor4f(0.0, 0.0, 1.0, ALPHA); + glVertex3fv(boxv0); + glVertex3fv(boxv1); + glVertex3fv(boxv2); + glVertex3fv(boxv3); + + glColor4f(1.0, 1.0, 0.0, ALPHA); + glVertex3fv(boxv0); + glVertex3fv(boxv4); + glVertex3fv(boxv5); + glVertex3fv(boxv1); + + glColor4f(0.0, 1.0, 1.0, ALPHA); + glVertex3fv(boxv2); + glVertex3fv(boxv6); + glVertex3fv(boxv7); + glVertex3fv(boxv3); + + glColor4f(1.0, 0.0, 0.0, ALPHA); + glVertex3fv(boxv4); + glVertex3fv(boxv5); + glVertex3fv(boxv6); + glVertex3fv(boxv7); + + glColor4f(1.0, 0.0, 1.0, ALPHA); + glVertex3fv(boxv0); + glVertex3fv(boxv3); + glVertex3fv(boxv7); + glVertex3fv(boxv4); + + glColor4f(0.0, 1.0, 0.0, ALPHA); + glVertex3fv(boxv1); + glVertex3fv(boxv5); + glVertex3fv(boxv6); + glVertex3fv(boxv2); + glEnd(); + + glColor3f(1.0, 1.0, 1.0); + glBegin(GL_LINES); + glVertex3fv(boxv0); + glVertex3fv(boxv1); - glBegin(GL_LINE_LOOP); glColor4ub(CUBECOLOR); v3f(boxv0); - v3f(boxv4); v3f(boxv5); v3f(boxv1); glEnd(); + glVertex3fv(boxv1); + glVertex3fv(boxv2); - glBegin(GL_LINE_LOOP); glColor4ub(CUBECOLOR); v3f(boxv2); - v3f(boxv6); v3f(boxv7); v3f(boxv3); glEnd(); + glVertex3fv(boxv2); + glVertex3fv(boxv3); - glBegin(GL_LINE_LOOP); glColor4ub(CUBECOLOR); v3f(boxv0); - v3f(boxv3); v3f(boxv7); v3f(boxv4); glEnd(); + glVertex3fv(boxv3); + glVertex3fv(boxv0); - glBegin(GL_LINE_LOOP); glColor4ub(CUBECOLOR); v3f(boxv1); - v3f(boxv5); v3f(boxv6); v3f(boxv2); glEnd(); + glVertex3fv(boxv4); + glVertex3fv(boxv5); -#define ALPHA 128 - glBegin(GL_QUADS); glColor4ub( 0, 0, 255, ALPHA); v3f(boxv0); - v3f(boxv1); v3f(boxv2); v3f(boxv3); glEnd(); + glVertex3fv(boxv5); + glVertex3fv(boxv6); - glBegin(GL_QUADS); glColor4ub(255, 255, 0, ALPHA); v3f(boxv0); - v3f(boxv4); v3f(boxv5); v3f(boxv1); glEnd(); + glVertex3fv(boxv6); + glVertex3fv(boxv7); - glBegin(GL_QUADS); glColor4ub( 0, 255, 255, ALPHA); v3f(boxv2); - v3f(boxv6); v3f(boxv7); v3f(boxv3); glEnd(); + glVertex3fv(boxv7); + glVertex3fv(boxv4); - glBegin(GL_QUADS); glColor4ub(255, 0, 0, ALPHA); v3f(boxv4); - v3f(boxv5); v3f(boxv6); v3f(boxv7); glEnd(); + glVertex3fv(boxv0); + glVertex3fv(boxv4); - glBegin(GL_QUADS); glColor4ub(255, 0, 255, ALPHA); v3f(boxv0); - v3f(boxv3); v3f(boxv7); v3f(boxv4); glEnd(); + glVertex3fv(boxv1); + glVertex3fv(boxv5); - glBegin(GL_QUADS); glColor4ub( 0, 255, 0, ALPHA); v3f(boxv1); - v3f(boxv5); v3f(boxv6); v3f(boxv2); glEnd(); + glVertex3fv(boxv2); + glVertex3fv(boxv6); + + glVertex3fv(boxv3); + glVertex3fv(boxv7); + glEnd(); };//drawCube void CubeView::draw() { @@ -305,9 +344,7 @@ CubeViewUI.

We will talk about the show() method that is highlighted shortly.

Adding the CubeView Widget

- - - - - -
+ What we have is nice, but does little to show our cube. We have already defined the CubeView class and we would like to show it within the CubeViewUI. @@ -323,10 +360,9 @@ Code:" field enter #include "CubeView.h"

This #include is important, as we have just included CubeView as a member of CubeViewUI, so any public CubeView methods are now available to CubeViewUI. -

+ +

+

Defining the Callbacks

Each of the widgets we defined before adding CubeView can have callbacks that call CubeView methods. You can call an external @@ -345,9 +381,6 @@ more than one view change only redrawing once saves a lot of time. enter these callbacks. FLUID assumes you are smart enough not to refer to members or functions that don't exist.

Adding a Class Method

- - - - - -
You can add class methods within FLUID that have nothing to do with the GUI. An an example add a show function so that CubeViewUI can actually appear on the screen. @@ -356,12 +389,9 @@ appear on the screen. show(). We don't need a return value here, and since we will not be adding any widgets to this method FLUID will assign it a return type of void. +

Once the new method has been added, highlight its name and select New->Code->Code. Enter the method's code in the code window. -

Adding Constructor Initialization Code

If you need to add code to initialize class, for example setting @@ -488,9 +518,13 @@ 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. +children of it.

Edit/Ungroup (F8)

Deletes the parent group if all the children of a group are selected.

Edit/Overlays on/off (Alt+Shift+O)

@@ -499,21 +533,17 @@ 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 -file will include the header file automatically.

+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 +file will include the header file automatically.

New/Code/Function

Creates a new C function. You will be asked for a name for the @@ -550,28 +580,28 @@ which is described later in this chapter.

Help/About FLUID

Pops up a panel showing the version of FLUID.

The Widget Panel

- +
-
When you double-click on a widget or a set of widgets you will get the "widget attribute panel".

When you change attributes using this panel, the changes are reflected immediately in the window. It is useful to hit the "no overlay" button (or type Alt+Shift+O) to hide the red overlay so you can see -the widgets more accurately, especially when setting the box type.

+the widgets more accurately, especially when setting the box type.

If you have several widgets selected, they may have different values 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.

+widgets are changed to the new value.

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.

-
-"Revert" or "Cancel" put everything back to when you last brought up +saving any text. +

"Revert" or "Cancel" put everything back to when you last brought up 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 diff --git a/documentation/intro.html b/documentation/intro.html index b782090a5..1e827babf 100644 --- a/documentation/intro.html +++ b/documentation/intro.html @@ -65,9 +65,8 @@ library, though, and has started being included on Linux distributions.