FLTK 1.3.2

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

- File List
- File Members

Fl_Positioner.H
1 //
2 // "$Id: Fl_Positioner.H 8864 2011-07-19 04:49:30Z greg.ercolano $"
3 //
4 // Positioner 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_Positioner widget . */
21
22 #ifndef Fl_Positioner_H
23 #define Fl_Positioner_H
24
25 #ifndef Fl_Widget_H
26 #include "Fl_Widget.H"
27 #endif
28
37 class FL_EXPORT Fl_Positioner : public Fl_Widget {
38
39 double xmin, ymin;
40 double xmax, ymax;
41 double xvalue_, yvalue_;
42 double xstep_, ystep_;
43
44 protected:
45
46 // these allow subclasses to put the dial in a smaller area:
47 void draw(int, int, int, int);
48 int handle(int, int, int, int, int);
49 void draw();
50
51 public:
52
53 int handle(int);
58 Fl_Positioner(int x,int y,int w,int h, const char *l=0);
60 double xvalue() const {return xvalue_;}
62 double yvalue() const {return yvalue_;}
63 int xvalue(double);
64 int yvalue(double);
65 int value(double,double);
66 void xbounds(double, double);
68 double xminimum() const {return xmin;}
70 void xminimum(double a) {xbounds(a,xmax);}
72 double xmaximum() const {return xmax;}
74 void xmaximum(double a) {xbounds(xmin,a);}
75 void ybounds(double, double);
77 double yminimum() const {return ymin;}
79 void yminimum(double a) {ybounds(a, ymax);}
81 double ymaximum() const {return ymax;}
83 void ymaximum(double a) {ybounds(ymin, a);}
85 void xstep(double a) {xstep_ = a;}
87 void ystep(double a) {ystep_ = a;}
88 };
89
90 #endif
91
92 //
93 // End of "$Id: Fl_Positioner.H 8864 2011-07-19 04:49:30Z greg.ercolano $".
94 //
Fl_Widget
Fl_Widget is the base class for all widgets in FLTK.
Definition: Fl_Widget.H:100
Fl_Positioner::xstep
void xstep(double a)
Sets the stepping value for the X axis.
Definition: Fl_Positioner.H:85
Fl_Widget::handle
virtual int handle(int event)
Handles the specified event.
Definition: Fl_Widget.cxx:97
Fl_Positioner::xmaximum
double xmaximum() const
Gets the X axis maximum.
Definition: Fl_Positioner.H:72
Fl_Widget::draw
virtual void draw()=0
Draws the widget.
Fl_Positioner::xvalue
double xvalue() const
Gets the X axis coordinate.
Definition: Fl_Positioner.H:60
Fl_Positioner::yminimum
double yminimum() const
Gets the Y axis minimum.
Definition: Fl_Positioner.H:77
Fl_Positioner::ymaximum
void ymaximum(double a)
Same as ybounds(ymininimum(), a)
Definition: Fl_Positioner.H:83
Fl_Positioner::yminimum
void yminimum(double a)
Same as ybounds(a, ymaximum())
Definition: Fl_Positioner.H:79
Fl_Positioner::xminimum
double xminimum() const
Gets the X axis minimum.
Definition: Fl_Positioner.H:68
Fl_Widget.H
Fl_Widget, Fl_Label classes .
Fl_Positioner
This class is provided for Forms compatibility.
Definition: Fl_Positioner.H:37
Fl_Positioner::ymaximum
double ymaximum() const
Gets the Y axis maximum.
Definition: Fl_Positioner.H:81
Fl_Positioner::xminimum
void xminimum(double a)
Same as xbounds(a, xmaximum())
Definition: Fl_Positioner.H:70
Fl_Positioner::yvalue
double yvalue() const
Gets the Y axis coordinate.
Definition: Fl_Positioner.H:62
Fl_Positioner::xmaximum
void xmaximum(double a)
Same as xbounds(xminimum(), a)
Definition: Fl_Positioner.H:74
Fl_Positioner::ystep
void ystep(double a)
Sets the stepping value for the Y axis.
Definition: Fl_Positioner.H:87
- © 1998-2012 by Bill Spitzak and others.