FLTK 1.3.2

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

- File List
- File Members

Fl_Positioner.H

    00001 //
    00002 // "$Id: Fl_Positioner.H 8864 2011-07-19 04:49:30Z greg.ercolano $"
    00003 //
    00004 // Positioner 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_Positioner widget . */
    00021
    00022 #ifndef Fl_Positioner_H
    00023 #define Fl_Positioner_H
    00024
    00025 #ifndef Fl_Widget_H
    00026 #include "Fl_Widget.H"
    00027 #endif
    00028
    00037 class FL_EXPORT Fl_Positioner : public Fl_Widget {
    00038
    00039   double xmin, ymin;
    00040   double xmax, ymax;
    00041   double xvalue_, yvalue_;
    00042   double xstep_, ystep_;
    00043
    00044 protected:
    00045
    00046   // these allow subclasses to put the dial in a smaller area:
    00047   void draw(int, int, int, int);
    00048   int handle(int, int, int, int, int);
    00049   void draw();
    00050
    00051 public:
    00052
    00053   int handle(int);
    00058   Fl_Positioner(int x,int y,int w,int h, const char *l=0);
    00060   double xvalue() const {return xvalue_;}
    00062   double yvalue() const {return yvalue_;}
    00063   int xvalue(double);
    00064   int yvalue(double);
    00065   int value(double,double);
    00066   void xbounds(double, double);
    00068   double xminimum() const {return xmin;}
    00070   void xminimum(double a) {xbounds(a,xmax);}
    00072   double xmaximum() const {return xmax;}
    00074   void xmaximum(double a) {xbounds(xmin,a);}
    00075   void ybounds(double, double);
    00077   double yminimum() const {return ymin;}
    00079   void yminimum(double a) {ybounds(a, ymax);}
    00081   double ymaximum() const {return ymax;}
    00083   void ymaximum(double a) {ybounds(ymin, a);}
    00085   void xstep(double a) {xstep_ = a;}
    00087   void ystep(double a) {ystep_ = a;}
    00088 };
    00089
    00090 #endif
    00091
    00092 //
    00093 // End of "$Id: Fl_Positioner.H 8864 2011-07-19 04:49:30Z greg.ercolano $".
    00094 //