The HelpApp
widget provides a simple web browser application,
complete with bookmarks, proxy support, and so forth. The flsurf
application included with the distribution demonstrates how to use it.
The HelpApp
widget is composed of several windows and control
widgets. The HTML viewing portion is handled by the HelpView
widget, while file selection is handled by the FileChooser
widget.
HTTP access to files is handled by the CUPS HTTP functions. Currently only a single file is cached, so any navigation results in a reload.
The source for flsurf
is shown below:
#include "HelpApp.h" #include <FL/x.H> int // O - Exit status main(int argc, // I - Number of command-line arguments char *argv[]) // I - Command-line arguments { HelpApp *app; // Help application fl_open_display(); app = new HelpApp; if (argc >= 2) app->load(argv[1]); app->show(); Fl::run(); delete app; return (0); }