diff options
| -rw-r--r-- | FL/Fl_Help_Dialog.H | 2 | ||||
| -rw-r--r-- | src/Fl_Help_Dialog.cxx | 5 | ||||
| -rw-r--r-- | src/Fl_Help_Dialog.fl | 13 | ||||
| -rw-r--r-- | src/Fl_Help_Dialog_Dox.cxx | 11 |
4 files changed, 19 insertions, 12 deletions
diff --git a/FL/Fl_Help_Dialog.H b/FL/Fl_Help_Dialog.H index 9e44c2e3d..67c3e9f87 100644 --- a/FL/Fl_Help_Dialog.H +++ b/FL/Fl_Help_Dialog.H @@ -67,7 +67,7 @@ public: ~Fl_Help_Dialog(); int h(); void hide(); - void load(const char *f); + int load(const char *f); void position(int xx, int yy); void resize(int xx, int yy, int ww, int hh); void show(); diff --git a/src/Fl_Help_Dialog.cxx b/src/Fl_Help_Dialog.cxx index c3396f2f9..7e016e2d3 100644 --- a/src/Fl_Help_Dialog.cxx +++ b/src/Fl_Help_Dialog.cxx @@ -221,10 +221,11 @@ void Fl_Help_Dialog::hide() { window_->hide(); } -void Fl_Help_Dialog::load(const char *f) { +int Fl_Help_Dialog::load(const char *f) { view_->set_changed(); - view_->load(f); + int ret = view_->load(f); window_->label(view_->title()); + return ret; } void Fl_Help_Dialog::position(int xx, int yy) { diff --git a/src/Fl_Help_Dialog.fl b/src/Fl_Help_Dialog.fl index 2eb8efebc..66462a904 100644 --- a/src/Fl_Help_Dialog.fl +++ b/src/Fl_Help_Dialog.fl @@ -29,7 +29,7 @@ comment {// } {in_source in_header } -decl {\#include <FL/Fl_Shared_Image.H>} {selected private local +decl {\#include <FL/Fl_Shared_Image.H>} {private local } decl {\#include "flstring.h"} {private local @@ -50,8 +50,7 @@ class FL_EXPORT Fl_Help_Dialog {open } decl {int find_pos_;} {private local } - Function {Fl_Help_Dialog()} {open - } { + Function {Fl_Help_Dialog()} {} { Fl_Window window_ { label {Help Dialog} open private xywh {398 64 530 385} type Double hide resizable size_range {260 150 0 0} @@ -190,11 +189,13 @@ fl_register_images();} {} } { code {window_->hide();} {} } - Function {load(const char *f)} {return_type void + Function {load(const char *f)} {open return_type int } { code {view_->set_changed(); -view_->load(f); -window_->label(view_->title());} {} +int ret = view_->load(f); +window_->label(view_->title()); +return ret;} {selected + } } Function {position(int xx, int yy)} {return_type void } { diff --git a/src/Fl_Help_Dialog_Dox.cxx b/src/Fl_Help_Dialog_Dox.cxx index f0d6c7c14..aa88f30a6 100644 --- a/src/Fl_Help_Dialog_Dox.cxx +++ b/src/Fl_Help_Dialog_Dox.cxx @@ -40,9 +40,14 @@ /** \fn void Fl_Help_Dialog::hide() Hides the Fl_Help_Dialog window.*/ -/** \fn void Fl_Help_Dialog::load(const char *f) - Loads the specified HTML file into the Fl_Help_View widget. - The filename can also contain a target name ("filename.html#target"). +/** \fn int Fl_Help_Dialog::load(const char *f) + \brief Loads the specified HTML file into the Fl_Help_View widget. + The filename can also contain a target name ("filename.html#target"). Always + use forward slashes as path deliminators, MSWindows-style backslashes are not + supported here + \param[in] f the name and path of an HTML file + \return 0 on success, -1 on error + \see Fl_Help_View::load(), fl_load_uri() */ /** \fn void Fl_Help_Dialog::position(int x, int y) |
