diff options
| author | engelsman <engelsman> | 2009-03-14 11:46:43 +0000 |
|---|---|---|
| committer | engelsman <engelsman> | 2009-03-14 11:46:43 +0000 |
| commit | 26c355b6a083e8fe1599705c69130db49b2a565d (patch) | |
| tree | fd0df2354ce3f27c2636bc8866eb9e519a4b1693 /FL/Fl_Scrollbar.H | |
| parent | 039a9be3f5f05677ff850f8b73466abaab664d8b (diff) | |
updated Fl_Slider and Fl_Scrollbar documentation (STR #2156 - part 2)
converted html tags to doxygen
rationalised doxygen comments
renamed Fl_Slider::scrollvalue() and Fl_Scrollbar::value() parameters
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6683 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL/Fl_Scrollbar.H')
| -rw-r--r-- | FL/Fl_Scrollbar.H | 55 |
1 files changed, 29 insertions, 26 deletions
diff --git a/FL/Fl_Scrollbar.H b/FL/Fl_Scrollbar.H index f6dbb566b..61c04e190 100644 --- a/FL/Fl_Scrollbar.H +++ b/FL/Fl_Scrollbar.H @@ -34,18 +34,20 @@ #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 - \image latex scrollbar.eps "Fl_Scrollbar" width=4cm + 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). + + 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. + + \image html scrollbar.gif + \image latex scrollbar.eps "Fl_Scrollbar" width=4cm */ class FL_EXPORT Fl_Scrollbar : public Fl_Slider { @@ -58,30 +60,32 @@ protected: public: - Fl_Scrollbar(int x,int y,int w,int h, const char *l = 0); + Fl_Scrollbar(int X,int Y,int W,int H, const char *L = 0); ~Fl_Scrollbar(); int handle(int); /** Gets the integer value (position) of the slider in the scrollbar. You can get the floating point value with Fl_Slider::value(). + \see Fl_Scrollbar::value(int p) - \see Fl_Scrollbar::value(int p, int s, int top, int total) + \see Fl_Scrollbar::value(int pos, int size, int first, int total) */ int value() const {return int(Fl_Slider::value());} /** Sets the value (position) of the slider in the scrollbar. + \see Fl_Scrollbar::value() - \see Fl_Scrollbar::value(int p, int s, int top, int total) + \see Fl_Scrollbar::value(int pos, int size, int first, int total) */ int value(int p) {return int(Fl_Slider::value((double)p));} /** Sets the position, size and range of the slider in the scrollbar. - \param[in] p position, first line displayed - \param[in] s window size, number of lines displayed - \param[in] top number of first line + \param[in] pos position, first line displayed + \param[in] size window size, number of lines displayed + \param[in] first number of first line \param[in] total total number of lines You should call this every time your window changes size, your data @@ -89,21 +93,20 @@ public: to a callback from this scrollbar). All necessary calls to redraw() are done. - Calls Fl_Slider::scrollvalue(int p, int s, int top, int total). + Calls Fl_Slider::scrollvalue(int pos, int size, int first, int total). */ - int value(int p, int s, int top, int total) { - return scrollvalue(p, s, top, total); + int value(int pos, int size, int first, int total) { + return scrollvalue(pos, size, first, 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. + Get the size of step, in lines, that the arror keys move. */ 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() + 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;} |
