From 9d81d971f7861da5f558ecd797cf0aa575288dc9 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Thu, 2 Aug 2001 19:43:49 +0000 Subject: Fl_HelpDialog and Fl_HelpView widgets. "help" demo. Minor doco updates. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1539 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- test/Makefile | 12 +++++++---- test/demo.menu | 1 + test/help.cxx | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 76 insertions(+), 4 deletions(-) create mode 100644 test/help.cxx (limited to 'test') diff --git a/test/Makefile b/test/Makefile index b32d59c55..da2f3b07d 100644 --- a/test/Makefile +++ b/test/Makefile @@ -1,5 +1,5 @@ # -# "$Id: Makefile,v 1.19.2.7.2.3 2001/08/02 18:15:44 easysw Exp $" +# "$Id: Makefile,v 1.19.2.7.2.4 2001/08/02 19:43:49 easysw Exp $" # # Test/example program makefile for the Fast Light Tool Kit (FLTK). # @@ -30,7 +30,7 @@ CPPFILES =\ color_chooser.cxx cube.cxx cursor.cxx curve.cxx demo.cxx \ doublebuffer.cxx editor.cxx file_chooser.cxx fonts.cxx \ forms.cxx fractals.cxx fullscreen.cxx gl_overlay.cxx \ - glpuzzle.cxx hello.cxx iconize.cxx image.cxx input.cxx \ + glpuzzle.cxx hello.cxx help.cxx iconize.cxx image.cxx input.cxx \ keyboard.cxx label.cxx list_visuals.cxx mandelbrot.cxx \ menubar.cxx message.cxx minimum.cxx navigation.cxx \ output.cxx overlay.cxx pixmap.cxx pixmap_browser.cxx \ @@ -42,7 +42,7 @@ CPPFILES =\ ALL = adjuster arc ask bitmap boxtype browser button buttons \ checkers clock colbrowser color_chooser cursor curve \ demo doublebuffer editor file_chooser fonts forms hello \ - iconize image input keyboard label list_visuals \ + help iconize image input keyboard label list_visuals \ mandelbrot menubar message minimum navigation output \ overlay pixmap pixmap_browser radio resizebox scroll \ subwindow symbols tabs tile valuators fast_slow resize \ @@ -70,6 +70,10 @@ include ../makeinclude $(ALL): ../lib/$(LIBNAME) # Programs needing special instructions... +help: help.cxx + echo Compiling and linking $@... + echo $(CXX) -I.. $(CXXFLAGS) help.cxx -o $@ $(LINKFLTK) $(LDLIBS) $(IMAGELIBS) + $(CXX) -I.. $(CXXFLAGS) help.cxx -o $@ $(LINKFLTK) $(LDLIBS) $(IMAGELIBS) keyboard: keyboard.cxx keyboard_ui.cxx echo Compiling and linking $@... $(CXX) -I.. $(CXXFLAGS) keyboard.cxx $(LINKFLTK) $(LDLIBS) -o $@ @@ -124,5 +128,5 @@ install: @echo Nothing to install in test directory. # -# End of "$Id: Makefile,v 1.19.2.7.2.3 2001/08/02 18:15:44 easysw Exp $". +# End of "$Id: Makefile,v 1.19.2.7.2.4 2001/08/02 19:43:49 easysw Exp $". # diff --git a/test/demo.menu b/test/demo.menu index ae377e4ca..caf2282a7 100644 --- a/test/demo.menu +++ b/test/demo.menu @@ -64,6 +64,7 @@ @o:file chooser:file_chooser @o:XForms Emulation:forms @o:fonts:fonts + @o:HelpDialog:help @main:Tutorial\nfrom\nManual:@j @j:ask\n(modified):ask diff --git a/test/help.cxx b/test/help.cxx new file mode 100644 index 000000000..04a0be6c1 --- /dev/null +++ b/test/help.cxx @@ -0,0 +1,67 @@ +// +// "$Id: help.cxx,v 1.1.2.1 2001/08/02 19:43:49 easysw Exp $" +// +// Fl_HelpDialog test program. +// +// Copyright 1999-2001 by Easy Software Products. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems to "fltk-bugs@fltk.org". +// +// Contents: +// +// main() - Display the help GUI... +// + +// +// Include necessary headers... +// + +#include + + +// +// 'main()' - Display the help GUI... +// + +int // O - Exit status +main(int argc, // I - Number of command-line arguments + char *argv[]) // I - Command-line arguments +{ + Fl_HelpDialog *help; // Help dialog + + + help = new Fl_HelpDialog; + + if (argc < 2) + help->load("../documentation/index.html"); + else + help->load(argv[1]); + + help->show(); + + Fl::run(); + + delete help; + + return (0); +} + + +// +// End of "$Id: help.cxx,v 1.1.2.1 2001/08/02 19:43:49 easysw Exp $". +// -- cgit v1.2.3