FLTK 1.3.2

- Main Page
- Related Pages
- Modules
- Classes
- Files

- File List
- File Members

Fl_Scrollbar.H
1 //
2 // "$Id: Fl_Scrollbar.H 9116 2011-10-02 06:25:13Z matt $"
3 //
4 // Scroll bar header file for the Fast Light Tool Kit (FLTK).
5 //
6 // Copyright 1998-2010 by Bill Spitzak and others.
7 //
8 // This library is free software. Distribution and use rights are outlined in
9 // the file "COPYING" which should have been included with this file. If this
10 // file is missing or damaged, see the license at:
11 //
12 // http://www.fltk.org/COPYING.php
13 //
14 // Please report all bugs and problems on the following page:
15 //
16 // http://www.fltk.org/str.php
17 //
18
19 /* \file
20 Fl_Scrollbar widget . */
21
22 #ifndef Fl_Scrollbar_H
23 #define Fl_Scrollbar_H
24
25 #include "Fl_Slider.H"
26
43 class FL_EXPORT Fl_Scrollbar : public Fl_Slider {
44
45 int linesize_;
46 int pushed_;
47 static void timeout_cb(void*);
48 void increment_cb();
49 protected:
50 void draw();
51
52 public:
53
54 Fl_Scrollbar(int X,int Y,int W,int H, const char *L = 0);
55 ~Fl_Scrollbar();
56 int handle(int);
57
65 int value() const {return int(Fl_Slider::value());}
66
73 int value(int p) {return int(Fl_Slider::value((double)p));}
74
89 int value(int pos, int windowSize, int first, int total) {
90 return scrollvalue(pos, windowSize, first, total);
91 }
92
96 int linesize() const {return linesize_;}
97
103 void linesize(int i) {linesize_ = i;}
104
105 };
106
107 #endif
108
109 //
110 // End of "$Id: Fl_Scrollbar.H 9116 2011-10-02 06:25:13Z matt $".
111 //
Fl_Scrollbar::value
int value(int pos, int windowSize, int first, int total)
Sets the position, size and range of the slider in the scrollbar.
Definition: Fl_Scrollbar.H:89
Fl_Slider
The Fl_Slider widget contains a sliding knob inside a box.
Definition: Fl_Slider.H:61
Fl_Slider::scrollvalue
int scrollvalue(int pos, int size, int first, int total)
Sets the size and position of the sliding knob in the box.
Definition: Fl_Slider.cxx:86
Fl_Scrollbar::linesize
void linesize(int i)
This number controls how big the steps are that the arrow keys do.
Definition: Fl_Scrollbar.H:103
Fl_Scrollbar::linesize
int linesize() const
Get the size of step, in lines, that the arror keys move.
Definition: Fl_Scrollbar.H:96
Fl_Scrollbar::value
int value() const
Gets the integer value (position) of the slider in the scrollbar.
Definition: Fl_Scrollbar.H:65
Fl_Valuator::value
double value() const
Gets the floating point(double) value.
Definition: Fl_Valuator.H:122
Fl_Slider::draw
void draw()
Draws the widget.
Definition: Fl_Slider.cxx:213
Fl_Scrollbar
The Fl_Scrollbar widget displays a slider with arrow buttons at the ends of the scrollbar.
Definition: Fl_Scrollbar.H:43
Fl_Scrollbar::value
int value(int p)
Sets the value (position) of the slider in the scrollbar.
Definition: Fl_Scrollbar.H:73
- © 1998-2012 by Bill Spitzak and others.