00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 #ifndef Fl_Positioner_H
00032 #define Fl_Positioner_H
00033
00034 #ifndef Fl_Widget_H
00035 #include "Fl_Widget.H"
00036 #endif
00037
00046 class FL_EXPORT Fl_Positioner : public Fl_Widget {
00047
00048 double xmin, ymin;
00049 double xmax, ymax;
00050 double xvalue_, yvalue_;
00051 double xstep_, ystep_;
00052
00053 protected:
00054
00055
00056 void draw(int, int, int, int);
00057 int handle(int, int, int, int, int);
00058 void draw();
00059
00060 public:
00061
00062 int handle(int);
00067 Fl_Positioner(int x,int y,int w,int h, const char *l=0);
00069 double xvalue() const {return xvalue_;}
00071 double yvalue() const {return yvalue_;}
00072 int xvalue(double);
00073 int yvalue(double);
00074 int value(double,double);
00075 void xbounds(double, double);
00077 double xminimum() const {return xmin;}
00079 void xminimum(double a) {xbounds(a,xmax);}
00081 double xmaximum() const {return xmax;}
00083 void xmaximum(double a) {xbounds(xmin,a);}
00084 void ybounds(double, double);
00086 double yminimum() const {return ymin;}
00088 void yminimum(double a) {ybounds(a, ymax);}
00090 double ymaximum() const {return ymax;}
00092 void ymaximum(double a) {ybounds(ymin, a);}
00094 void xstep(double a) {xstep_ = a;}
00096 void ystep(double a) {ystep_ = a;}
00097 };
00098
00099 #endif
00100
00101
00102
00103