summaryrefslogtreecommitdiff
path: root/FL/Fl_Help_View.H
diff options
context:
space:
mode:
authorFabien Costantini <fabien@onepost.net>2008-09-14 20:00:03 +0000
committerFabien Costantini <fabien@onepost.net>2008-09-14 20:00:03 +0000
commit6645d3cb6ab0ce5b2dbbeb31ad818cb41e44e10e (patch)
treefd047b16cb1b5151423f1895e86b5a94695bbf33 /FL/Fl_Help_View.H
parentf49e2a7af5b517124a855a8ab6380a74ad898a7f (diff)
Doxygen Documentation WP6 Done, Also completed the documentation of Help_View, Help_Dialog and cleaned up Preferences from ugly stars in comments and also removed redundant get/set text from methods doc. In this increment, we don't bother with the old dox format (comments in header). We have better things to do with our time (like about 40 mores files to doxyfy :-).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6243 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL/Fl_Help_View.H')
-rw-r--r--FL/Fl_Help_View.H44
1 files changed, 40 insertions, 4 deletions
diff --git a/FL/Fl_Help_View.H b/FL/Fl_Help_View.H
index 22613874f..a6986efe3 100644
--- a/FL/Fl_Help_View.H
+++ b/FL/Fl_Help_View.H
@@ -90,10 +90,11 @@ struct Fl_Help_Target
int y; // Y offset of target
};
-//
-// Fl_Help_View class...
-//
-
+/**
+ The Fl_Help_View widget displays HTML text. Most HTML 2.0
+ elements are supported, as well as a primitive implementation of tables.
+ GIF, JPEG, and PNG images are displayed inline.
+*/
class FL_EXPORT Fl_Help_View : public Fl_Group //// Help viewer widget
{
enum { RIGHT = -1, CENTER, LEFT }; // Alignments
@@ -187,29 +188,64 @@ public:
Fl_Help_View(int xx, int yy, int ww, int hh, const char *l = 0);
~Fl_Help_View();
+ /** This method returns the current directory for the text in the buffer. */
const char *directory() const { if (directory_[0]) return (directory_);
else return ((const char *)0); }
+ /** This method returns the current filename for the text in the buffer. */
const char *filename() const { if (filename_[0]) return (filename_);
else return ((const char *)0); }
int find(const char *s, int p = 0);
+ /**
+ This method assigns a callback function to use when a link is
+ followed or a file is loaded (via
+ Fl_Help_View::load()) that requires a different
+ file or path. The callback function receives a pointer to the
+ Fl_Help_View widget and the URI or full pathname
+ for the file in question. It must return a pathname that can be
+ opened as a local file or NULL:</P>
+
+ <UL><PRE>
+ const char *fn(Fl_Widget *w, const char *uri);
+ </PRE></UL>
+
+ <P>The link function can be used to retrieve remote or virtual
+ documents, returning a temporary file that contains the actual
+ data. If the link function returns NULL, the value of
+ the Fl_Help_View widget will remain unchanged.</P>
+
+ <P>If the link callback cannot handle the URI scheme, it should
+ return the uri value unchanged or set the value() of the widget
+ before returning NULL.
+ */
void link(Fl_Help_Func *fn) { link_ = fn; }
int load(const char *f);
void resize(int,int,int,int);
+ /** Gets the size of the Help view */
int size() const { return (size_); }
void size(int W, int H) { Fl_Widget::size(W, H); }
+ /** Sets the default text color. */
void textcolor(Fl_Color c) { if (textcolor_ == defcolor_) textcolor_ = c; defcolor_ = c; }
+ /** Returns the current default text color. */
Fl_Color textcolor() const { return (defcolor_); }
+ /** Sets the default text font. */
void textfont(Fl_Font f) { textfont_ = f; format(); }
+ /** Returns the current default text font. */
Fl_Font textfont() const { return (textfont_); }
+ /** Sets the default text size. */
void textsize(Fl_Fontsize s) { textsize_ = s; format(); }
+ /** Gets the default text size. */
Fl_Fontsize textsize() const { return (textsize_); }
+ /** Returns the current document title, or NULL if there is no title. */
const char *title() { return (title_); }
void topline(const char *n);
void topline(int);
+ /** Returns the current top line in pixels. */
int topline() const { return (topline_); }
void leftline(int);
+ /** Gets the left position. */
int leftline() const { return (leftline_); }
void value(const char *v);
+ /** Returns the current buffer contents. */
const char *value() const { return (value_); }
void clear_selection();
void select_all();