2001-08-02 23:43:49 +04:00
|
|
|
//
|
2005-02-25 00:55:12 +03:00
|
|
|
// "$Id$"
|
2001-08-02 23:43:49 +04:00
|
|
|
//
|
2001-09-29 18:38:59 +04:00
|
|
|
// Fl_Help_Dialog test program.
|
2001-08-02 23:43:49 +04:00
|
|
|
//
|
2010-11-29 00:06:39 +03:00
|
|
|
// Copyright 1999-2010 by Easy Software Products.
|
2001-08-02 23:43:49 +04:00
|
|
|
//
|
2011-07-19 08:49:30 +04:00
|
|
|
// This library is free software. Distribution and use rights are outlined in
|
|
|
|
// the file "COPYING" which should have been included with this file. If this
|
|
|
|
// file is missing or damaged, see the license at:
|
|
|
|
//
|
|
|
|
// http://www.fltk.org/COPYING.php
|
2001-08-02 23:43:49 +04:00
|
|
|
//
|
2005-04-16 04:13:17 +04:00
|
|
|
// Please report all bugs and problems on the following page:
|
|
|
|
//
|
|
|
|
// http://www.fltk.org/str.php
|
2001-08-02 23:43:49 +04:00
|
|
|
//
|
|
|
|
// Contents:
|
|
|
|
//
|
|
|
|
// main() - Display the help GUI...
|
|
|
|
//
|
|
|
|
|
|
|
|
//
|
|
|
|
// Include necessary headers...
|
|
|
|
//
|
|
|
|
|
2001-09-29 18:38:59 +04:00
|
|
|
#include <FL/Fl_Help_Dialog.H>
|
2001-08-02 23:43:49 +04:00
|
|
|
|
|
|
|
//
|
|
|
|
// 'main()' - Display the help GUI...
|
|
|
|
//
|
|
|
|
|
|
|
|
int // O - Exit status
|
|
|
|
main(int argc, // I - Number of command-line arguments
|
|
|
|
char *argv[]) // I - Command-line arguments
|
|
|
|
{
|
2001-09-29 18:38:59 +04:00
|
|
|
Fl_Help_Dialog *help; // Help dialog
|
2001-08-02 23:43:49 +04:00
|
|
|
|
|
|
|
|
2001-09-29 18:38:59 +04:00
|
|
|
help = new Fl_Help_Dialog;
|
2001-08-02 23:43:49 +04:00
|
|
|
|
2011-01-04 03:53:13 +03:00
|
|
|
int argn = 1;
|
|
|
|
|
|
|
|
#ifdef USING_XCODE
|
|
|
|
|
2016-05-15 11:28:47 +03:00
|
|
|
char buf[2048];
|
|
|
|
strcpy(buf, argv[0]);
|
|
|
|
char *slash = strrchr(buf, '/');
|
|
|
|
if (slash)
|
|
|
|
strcpy(slash, "/../Resources/help-test.html");
|
|
|
|
help->load(buf);
|
2011-01-04 03:53:13 +03:00
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
if (argc <= argn)
|
2014-02-09 00:44:09 +04:00
|
|
|
help->load("help-test.html");
|
2001-08-02 23:43:49 +04:00
|
|
|
else
|
|
|
|
help->load(argv[1]);
|
2011-01-04 03:53:13 +03:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2004-07-27 00:52:52 +04:00
|
|
|
help->show(1, argv);
|
2001-08-02 23:43:49 +04:00
|
|
|
|
|
|
|
Fl::run();
|
|
|
|
|
|
|
|
delete help;
|
|
|
|
|
|
|
|
return (0);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//
|
2005-02-25 00:55:12 +03:00
|
|
|
// End of "$Id$".
|
2001-08-02 23:43:49 +04:00
|
|
|
//
|