diff options
| author | Fabien Costantini <fabien@onepost.net> | 2008-09-15 08:41:54 +0000 |
|---|---|---|
| committer | Fabien Costantini <fabien@onepost.net> | 2008-09-15 08:41:54 +0000 |
| commit | b9ca1333769f87c029430a9d14a7a9937d400f93 (patch) | |
| tree | 61b8043afc286a950b7624004ed549f84531fdb3 /FL/Fl_Scrollbar.H | |
| parent | fdcfef214e67b0b1162ef4098ba960efd7049523 (diff) | |
Doxygen documentation WP8 Done. Reserved WP9, WP10. Will now check WP3 from engelsman and integrates it.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6250 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL/Fl_Scrollbar.H')
| -rw-r--r-- | FL/Fl_Scrollbar.H | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/FL/Fl_Scrollbar.H b/FL/Fl_Scrollbar.H index 0d474ea0b..43fd7a752 100644 --- a/FL/Fl_Scrollbar.H +++ b/FL/Fl_Scrollbar.H @@ -30,6 +30,19 @@ #include "Fl_Slider.H" +/** + The Fl_Scrollbar widget displays a slider with arrow buttons + at the ends of the scrollbar. Clicking on the arrows move up/left and + down/right by linesize(). Scrollbars also accept + FL_SHORTCUT events: the arrows move by linesize(), and + vertical scrollbars take Page Up/Down (they move by the page size minus + linesize()) and Home/End (they jump to the top or bottom). + <P>Scrollbars have step(1) preset (they always return + integers). If desired you can set the step() to non-integer + values. You will then have to use casts to get at the floating-point + versions of value() from Fl_Slider. </P> + <P ALIGN=CENTER>\image html scrollbar.gif +*/ class FL_EXPORT Fl_Scrollbar : public Fl_Slider { int linesize_; @@ -45,11 +58,31 @@ public: ~Fl_Scrollbar(); int handle(int); + /** + The first form returns the integer value of the scrollbar. You can get + the floating point value with Fl_Slider::value(). The second + form sets value(), range(), and slider_size() + to make a variable-sized scrollbar. You should call this every time + your window changes size, your data changes size, or your scroll + position changes (even if in response to a callback from this + scrollbar). All necessary calls to redraw() are done. + */ int value() {return int(Fl_Slider::value());} + /** See int Fl_Scrollbar::value() */ int value(int p, int s, int top, int total) { return scrollvalue(p, s, top, total); } + /** + This number controls how big the steps are that the arrow keys do. In + addition page up/down move by the size last sent to value() + minus one linesize(). The default is 16. + */ int linesize() const {return linesize_;} + /** + This number controls how big the steps are that the arrow keys do. In + addition page up/down move by the size last sent to value() + minus one linesize(). The default is 16. + */ void linesize(int i) {linesize_ = i;} }; |
