diff --git a/documentation/Makefile b/documentation/Makefile index 2317b9f965e2dc050144e5e2a79022c7d4777645..fc37b9c07e17def7cd79a91f26dc86c4859b1686 100644 --- a/documentation/Makefile +++ b/documentation/Makefile @@ -1,5 +1,5 @@ # -# "$Id: Makefile,v 1.9.2.8 2001/01/22 15:13:38 easysw Exp $" +# "$Id: Makefile,v 1.9.2.9 2001/01/28 06:57:32 spitzak Exp $" # # Documentation makefile for the Fast Light Tool Kit (FLTK). # @@ -118,26 +118,40 @@ HTMLFILES = \ osissues.html \ license.html -all: fltk.ps fltk.pdf fltk.d/index.html +all: fltk.ps fltk.pdf clean: - rm -rf fltk.d rm -f fltk.ps rm -f fltk.pdf depend: -install: - -mkdir -p $(prefix)/share/doc/fltk - cp $(HTMLFILES) index.html $(prefix)/share/doc/fltk - cp *.gif *.jpg $(prefix)/share/doc/fltk - chmod 644 $(prefix)/share/doc/fltk/* +# According to FHS this should be: +# htmldir = $(prefix)/share/doc/html/en/fltk +# Possibly the "en/" can be removed, it is not clear. +# KDE uses "HTML" instead of "html", which is correct? +htmldir = $(prefix)/share/doc/fltk + +# According to FHS this should be: +# mandir = $(prefix)/share/man/en/man +# they say the "en/" is optional +mandir = $(prefix)/man/man -fltk.d/index.html: $(HTMLFILES) - echo "Generating HTML documentation..." - -mkdir fltk.d - -rm -f fltk.d/* - $(HTMLDOC) -d fltk.d -t html --verbose --toclevels 2 --bodycolor white --titleimage FL.gif $(HTMLFILES) +install: + -mkdir -p $(htmldir) + cp $(HTMLFILES) *.gif *.jpg index.html $(htmldir) + chmod 644 $(htmldir)/* + -mkdir -p $(mandir)1 + cp *.1 $(mandir)1 + -mkdir -p $(mandir)3 + cp *.3 $(mandir)3 + +# Base html files are now the readable ones, this is not done: +#fltk.d/index.html: $(HTMLFILES) +# echo "Generating HTML documentation..." +# -mkdir fltk.d +# -rm -f fltk.d/* +# $(HTMLDOC) -d fltk.d -t html --verbose --toclevels 2 --bodycolor white --titleimage FL.gif $(HTMLFILES) fltk.ps: $(HTMLFILES) echo "Generating PostScript documentation..." @@ -149,5 +163,5 @@ fltk.pdf: $(HTMLFILES) $(HTMLDOC) -f fltk.pdf --jpeg --compression=9 --duplex --verbose --toclevels 2 --titleimage FL.gif $(HTMLFILES) # -# End of "$Id: Makefile,v 1.9.2.8 2001/01/22 15:13:38 easysw Exp $". +# End of "$Id: Makefile,v 1.9.2.9 2001/01/28 06:57:32 spitzak Exp $". # diff --git a/documentation/fltk.3 b/documentation/fltk.3 new file mode 100644 index 0000000000000000000000000000000000000000..14995e78f5b3e5c3252af4c3a3907a4cb6819be4 --- /dev/null +++ b/documentation/fltk.3 @@ -0,0 +1,22 @@ +.TH fltk 1 "Fast Light Tool Kit" "27 January 2001" +.SH NAME +fltk \- the fast light Tool Kit +.sp +.SH SYNOPSIS + +The Fast Light Tool Kit ("FLTK", pronounced "fulltick") is a LGPL'd +C++ graphical user interface toolkit for X (UNIX(R)), OpenGL(R), and +Microsoft(R) Windows(R) 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. + +.SH SEE ALSO +.nf +FLTK Programming Manual +file:/usr/local/share/doc/fltk/index.html +.PP +http://www.fltk.org +.PP +.BR fluid (1) +.SH AUTHOR +Bill Spitzak and others. diff --git a/documentation/fluid.1 b/documentation/fluid.1 index 277dbea50900ad051d20ee78d789939d47cbd9ea..0b69440e9a6b9e17ba0c62a80b6220699bf8ad12 100644 --- a/documentation/fluid.1 +++ b/documentation/fluid.1 @@ -1,66 +1,27 @@ - - - -fluid(1) fluid(1) - - -NNAAMMEE - fluid - the fast light user-interface designer - - -SSYYNNOOPPSSIISS - fluid _[_-_c _[_-_o _c_o_d_e_-_f_i_l_e_n_a_m_e _-_h _h_e_a_d_e_r_-_f_i_l_e_n_a_m_e_]_] _[_f_i_l_e_n_a_m_e_._f_l_] - -DDEESSCCRRIIPPTTIIOONN - _f_l_u_i_d is an interactive GUI designer for FLTK. When run - with no arguments or with a filename, _f_l_u_i_d will display - the GUI hierarchy and any windows defined in the file. - Functions, classes, windows, and GUI components can be - manipulated as needed. - - When used with the _-_c option, _f_l_u_i_d will create the neces- - sary C++ header and code files in the current directory. - You can override the default extensions, filenames, and - directories using the _-_o and _-_h options. - -SSEEEE AALLSSOO - FLTK 1.0 Programming Manual, chapter 8. - -AAUUTTHHOORR - Bill Spitzak and others. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -4 March 1998 Fast Light Tool Kit 1 - - +.TH fluid 1 "Fast Light Tool Kit" "27 January 2001" +.SH NAME +fluid \- the fast light user-interface designer +.sp +.SH SYNOPSIS +.nf +fluid \fI[-c [-o code-filename -h header-filename]] [filename.fl]\fR +.fi +.SH DESCRIPTION +\fIfluid\fR is an interactive GUI designer for FLTK. When run with no arguments +or with a filename, \fIfluid\fR will display the GUI hierarchy and any windows +defined in the file. Functions, classes, windows, and GUI components can be +manipulated as needed. +.LP +When used with the \fI-c\fR option, \fIfluid\fR will create the necessary C++ +header and code files in the current directory. You can override the default +extensions, filenames, and directories using the \fI-o\fR and \fI-h\fR options. +.SH SEE ALSO +.nf +FLTK Programming Manual, chapter 8. +file:/usr/local/share/doc/fltk/fluid.html +.PP +http://www.fltk.org +.PP +.BR fltk (3) +.SH AUTHOR +Bill Spitzak and others. diff --git a/documentation/fluid.man b/documentation/fluid.man deleted file mode 100644 index 8f183aa04f01715e8c116fe05acfaf0958a87a32..0000000000000000000000000000000000000000 --- a/documentation/fluid.man +++ /dev/null @@ -1,21 +0,0 @@ -.TH fluid 1 "Fast Light Tool Kit" "4 March 1998" -.SH NAME -fluid \- the fast light user-interface designer -.sp -.SH SYNOPSIS -.nf -fluid \fI[-c [-o code-filename -h header-filename]] [filename.fl]\fR -.fi -.SH DESCRIPTION -\fIfluid\fR is an interactive GUI designer for FLTK. When run with no arguments -or with a filename, \fIfluid\fR will display the GUI hierarchy and any windows -defined in the file. Functions, classes, windows, and GUI components can be -manipulated as needed. -.LP -When used with the \fI-c\fR option, \fIfluid\fR will create the necessary C++ -header and code files in the current directory. You can override the default -extensions, filenames, and directories using the \fI-o\fR and \fI-h\fR options. -.SH SEE ALSO -FLTK 1.0 Programming Manual, chapter 8. -.SH AUTHOR -Bill Spitzak and others. diff --git a/fluid/fluid.cxx b/fluid/fluid.cxx index a3aa804c68ead50661dcd6a49650ec6d281b18ba..7fa063de7573ce7eaf400b9b60ccb111cedbfb94 100644 --- a/fluid/fluid.cxx +++ b/fluid/fluid.cxx @@ -1,5 +1,5 @@ // -// "$Id: fluid.cxx,v 1.15.2.10 2001/01/22 15:13:39 easysw Exp $" +// "$Id: fluid.cxx,v 1.15.2.11 2001/01/28 06:57:33 spitzak Exp $" // // FLUID main entry for the Fast Light Tool Kit (FLTK). // @@ -24,7 +24,7 @@ // const char *copyright = -"The FLTK user interface designer version 1.0\n" +"The FLTK user interface designer version 1.0.11\n" "Copyright 1998-2001 by Bill Spitzak and others.\n" "\n" "This library is free software; you can redistribute it and/or " @@ -465,5 +465,5 @@ int main(int argc,char **argv) { } // -// End of "$Id: fluid.cxx,v 1.15.2.10 2001/01/22 15:13:39 easysw Exp $". +// End of "$Id: fluid.cxx,v 1.15.2.11 2001/01/28 06:57:33 spitzak Exp $". // diff --git a/src/Fl_Input.cxx b/src/Fl_Input.cxx index 68a4b4ee6afdc6d7a1b4dcb2c8a36bf80ebfd256..c4950f4d925cbc724fc74b13e2ac128303f409ff 100644 --- a/src/Fl_Input.cxx +++ b/src/Fl_Input.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Input.cxx,v 1.10.2.14 2001/01/22 15:13:39 easysw Exp $" +// "$Id: Fl_Input.cxx,v 1.10.2.15 2001/01/28 06:57:33 spitzak Exp $" // // Input widget for the Fast Light Tool Kit (FLTK). // @@ -81,8 +81,9 @@ int Fl_Input::handle_key() { return 1; } - replace(position(), del ? position()-del : mark(), - Fl::event_text(), Fl::event_length()); + if (del || Fl::event_length()) + replace(position(), del ? position()-del : mark(), + Fl::event_text(), Fl::event_length()); return 1; } @@ -276,5 +277,5 @@ Fl_Input::Fl_Input(int x, int y, int w, int h, const char *l) } // -// End of "$Id: Fl_Input.cxx,v 1.10.2.14 2001/01/22 15:13:39 easysw Exp $". +// End of "$Id: Fl_Input.cxx,v 1.10.2.15 2001/01/28 06:57:33 spitzak Exp $". // diff --git a/src/fl_curve.cxx b/src/fl_curve.cxx index 6cb3ecd067b85ed6e13b39a26fbe9b7f899a5fbf..40b92d087be3cf7ff2f3fe2c7241e49348af91e8 100644 --- a/src/fl_curve.cxx +++ b/src/fl_curve.cxx @@ -1,9 +1,9 @@ // -// "$Id: fl_curve.cxx,v 1.4.2.3 2001/01/22 15:13:40 easysw Exp $" +// "$Id: fl_curve.cxx,v 1.4.2.4 2001/01/28 06:57:33 spitzak Exp $" // // Bezier curve functions for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2001 by Bill Spitzak and others. +// Copyright 1998-1999 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -20,7 +20,7 @@ // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 // USA. // -// Please report all bugs and problems to "fltk-bugs@fltk.org". +// Please report all bugs and problems to "fltk-bugs@easysw.com". // // Utility for drawing Bezier curves, adding the points to @@ -36,8 +36,13 @@ void fl_curve(double X0, double Y0, double X1, double Y1, double X2, double Y2, double X3, double Y3) { + double x = fl_transform_x(X0,Y0); double y = fl_transform_y(X0,Y0); + + // draw point 0: + fl_transformed_vertex(x,y); + double x1 = fl_transform_x(X1,Y1); double y1 = fl_transform_y(X1,Y1); double x2 = fl_transform_x(X2,Y2); @@ -45,55 +50,55 @@ void fl_curve(double X0, double Y0, double x3 = fl_transform_x(X3,Y3); double y3 = fl_transform_y(X3,Y3); - int n; { // find smaller size of bounding box - double lx = x; if (x1<lx) lx=x1; if (x2<lx) lx=x2; if (x3<lx) lx=x3; - double rx = x; if (x1>rx) rx=x1; if (x2>rx) rx=x2; if (x3>rx) rx=x3; - double ly = y; if (y1<ly) ly=y1; if (y2<ly) ly=y2; if (y3<ly) ly=y3; - double ry = y; if (y1>ry) ry=y1; if (y2>ry) ry=y2; if (y3>ry) ry=y3; - // calculate number of pieces to cut curve into: - n = int((rx-lx+ry-ly)/8); if (n < 3) n = 3; - } - double e = 1.0/n; + // find the area: + double a = fabs((x-x2)*(y3-y1)-(y-y2)*(x3-x1)); + double b = fabs((x-x3)*(y2-y1)-(y-y3)*(x2-x1)); + if (b > a) a = b; - // calculate the coefficients of 3rd order equation: - double xa = (x3-3*x2+3*x1-x); - double xb = 3*(x2-2*x1+x); - double xc = 3*(x1-x); - // calculate the forward differences: - double dx1 = ((xa*e+xb)*e+xc)*e; - double dx3 = 6*xa*e*e*e; - double dx2 = dx3 + 2*xb*e*e; + // use that to guess at the number of segments: + int n = int(sqrt(a)/4); + if (n > 1) { + if (n > 100) n = 100; // make huge curves not hang forever - // calculate the coefficients of 3rd order equation: - double ya = (y3-3*y2+3*y1-y); - double yb = 3*(y2-2*y1+y); - double yc = 3*(y1-y); - // calculate the forward differences: - double dy1 = ((ya*e+yb)*e+yc)*e; - double dy3 = 6*ya*e*e*e; - double dy2 = dy3 + 2*yb*e*e; + double e = 1.0/n; - // draw point 0: - fl_transformed_vertex(x,y); + // calculate the coefficients of 3rd order equation: + double xa = (x3-3*x2+3*x1-x); + double xb = 3*(x2-2*x1+x); + double xc = 3*(x1-x); + // calculate the forward differences: + double dx1 = ((xa*e+xb)*e+xc)*e; + double dx3 = 6*xa*e*e*e; + double dx2 = dx3 + 2*xb*e*e; - // draw points 1 .. n-2: - for (int m=2; m<n; m++) { - x += dx1; - dx1 += dx2; - dx2 += dx3; - y += dy1; - dy1 += dy2; - dy2 += dy3; - fl_transformed_vertex(x,y); - } + // calculate the coefficients of 3rd order equation: + double ya = (y3-3*y2+3*y1-y); + double yb = 3*(y2-2*y1+y); + double yc = 3*(y1-y); + // calculate the forward differences: + double dy1 = ((ya*e+yb)*e+yc)*e; + double dy3 = 6*ya*e*e*e; + double dy2 = dy3 + 2*yb*e*e; - // draw point n-1: - fl_transformed_vertex(x+dx1, y+dy1); + // draw points 1 .. n-2: + for (int m=2; m<n; m++) { + x += dx1; + dx1 += dx2; + dx2 += dx3; + y += dy1; + dy1 += dy2; + dy2 += dy3; + fl_transformed_vertex(x,y); + } + + // draw point n-1: + fl_transformed_vertex(x+dx1, y+dy1); + } // draw point n: fl_transformed_vertex(x3,y3); } // -// End of "$Id: fl_curve.cxx,v 1.4.2.3 2001/01/22 15:13:40 easysw Exp $". +// End of "$Id: fl_curve.cxx,v 1.4.2.4 2001/01/28 06:57:33 spitzak Exp $". //