FLTK: Fl_Positioner.H Source File

FLTK

Fl_Positioner.H
1 //
2 // "$Id$"
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$".
94 //
Fl_Widget.H
Fl_Widget, Fl_Label classes .
Fl_Positioner::ymaximum
double ymaximum() const
Gets the Y axis maximum.
Definition: Fl_Positioner.H:81
Fl_Positioner::xvalue
double xvalue() const
Gets the X axis coordinate.
Definition: Fl_Positioner.H:60
Fl_Positioner::xstep
void xstep(double a)
Sets the stepping value for the X axis.
Definition: Fl_Positioner.H:85
Fl_Positioner::yvalue
double yvalue() const
Gets the Y axis coordinate.
Definition: Fl_Positioner.H:62
Fl_Positioner::ymaximum
void ymaximum(double a)
Same as ybounds(ymininimum(), a)
Definition: Fl_Positioner.H:83
Fl_Positioner::xminimum
double xminimum() const
Gets the X axis minimum.
Definition: Fl_Positioner.H:68
Fl_Widget
Fl_Widget is the base class for all widgets in FLTK.
Definition: Fl_Widget.H:101
Fl_Positioner::yminimum
void yminimum(double a)
Same as ybounds(a, ymaximum())
Definition: Fl_Positioner.H:79
Fl_Widget::handle
virtual int handle(int event)
Handles the specified event.
Definition: Fl_Widget.cxx:112
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::xminimum
void xminimum(double a)
Same as xbounds(a, xmaximum())
Definition: Fl_Positioner.H:70
Fl_Positioner::yminimum
double yminimum() const
Gets the Y axis minimum.
Definition: Fl_Positioner.H:77
Fl_Positioner
This class is provided for Forms compatibility.
Definition: Fl_Positioner.H:37
Fl_Positioner::ystep
void ystep(double a)
Sets the stepping value for the Y axis.
Definition: Fl_Positioner.H:87
Fl_Positioner::xmaximum
void xmaximum(double a)
Same as xbounds(xminimum(), a)
Definition: Fl_Positioner.H:74
- © 1998-2016 by Bill Spitzak and others.