source: NonGTP/glut/FLTK/include/fltk/Scrollbar.h @ 814

Revision 814, 1.6 KB checked in by gumbau, 18 years ago (diff)

Glut initial import used by Geometry modules

Line 
1//
2// "$Id: Scrollbar.h 2973 2003-04-20 03:17:51Z easysw $"
3//
4// Scrollbar, controls an integer position of a window of a given
5// size inside a data set of a given total size.
6//
7// Copyright 1998-2003 by Bill Spitzak and others.
8//
9// This library is free software; you can redistribute it and/or
10// modify it under the terms of the GNU Library General Public
11// License as published by the Free Software Foundation; either
12// version 2 of the License, or (at your option) any later version.
13//
14// This library is distributed in the hope that it will be useful,
15// but WITHOUT ANY WARRANTY; without even the implied warranty of
16// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17// Library General Public License for more details.
18//
19// You should have received a copy of the GNU Library General Public
20// License along with this library; if not, write to the Free Software
21// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
22// USA.
23//
24// Please report all bugs and problems to "fltk-bugs@fltk.org".
25//
26
27#ifndef fltk_Scrollbar_h
28#define fltk_Scrollbar_h
29
30#include "Slider.h"
31
32namespace fltk {
33
34class FL_API Scrollbar : public Slider {
35
36public:
37  Scrollbar(int x,int y,int w,int h, const char *l = 0);
38  static NamedStyle* default_style;
39
40  int value() {return int(Slider::value());}
41  int value(int position, int size, int top, int total);
42  int handle(int);
43
44  int pagesize() const {return pagesize_;}
45  void pagesize(int a) {pagesize_ = a;}
46
47protected:
48  void draw();
49
50private:
51  int pagesize_;
52  static void timeout_cb(void*);
53  void increment_cb();
54
55};
56
57}
58
59#endif
60
61//
62// End of "$Id: Scrollbar.h 2973 2003-04-20 03:17:51Z easysw $".
63//
Note: See TracBrowser for help on using the repository browser.