FLTK 1.3.2
|
00001 // 00002 // "$Id$" 00003 // 00004 // Scroll bar header file for the Fast Light Tool Kit (FLTK). 00005 // 00006 // Copyright 1998-2010 by Bill Spitzak and others. 00007 // 00008 // This library is free software. Distribution and use rights are outlined in 00009 // the file "COPYING" which should have been included with this file. If this 00010 // file is missing or damaged, see the license at: 00011 // 00012 // http://www.fltk.org/COPYING.php 00013 // 00014 // Please report all bugs and problems on the following page: 00015 // 00016 // http://www.fltk.org/str.php 00017 // 00018 00019 /* \file 00020 Fl_Scrollbar widget . */ 00021 00022 #ifndef Fl_Scrollbar_H 00023 #define Fl_Scrollbar_H 00024 00025 #include "Fl_Slider.H" 00026 00043 class FL_EXPORT Fl_Scrollbar : public Fl_Slider { 00044 00045 int linesize_; 00046 int pushed_; 00047 static void timeout_cb(void*); 00048 void increment_cb(); 00049 protected: 00050 void draw(); 00051 00052 public: 00053 00054 Fl_Scrollbar(int X,int Y,int W,int H, const char *L = 0); 00055 ~Fl_Scrollbar(); 00056 int handle(int); 00057 00065 int value() const {return int(Fl_Slider::value());} 00066 00073 int value(int p) {return int(Fl_Slider::value((double)p));} 00074 00089 int value(int pos, int windowSize, int first, int total) { 00090 return scrollvalue(pos, windowSize, first, total); 00091 } 00092 00096 int linesize() const {return linesize_;} 00097 00103 void linesize(int i) {linesize_ = i;} 00104 00105 }; 00106 00107 #endif 00108 00109 // 00110 // End of "$Id$". 00111 //