FLTK
Fl_Dial.H
1 //
2 // Dial header file for the Fast Light Tool Kit (FLTK).
3 //
4 // Copyright 1998-2010 by Bill Spitzak and others.
5 //
6 // This library is free software. Distribution and use rights are outlined in
7 // the file "COPYING" which should have been included with this file. If this
8 // file is missing or damaged, see the license at:
9 //
10 // https://www.fltk.org/COPYING.php
11 //
12 // Please see the following page on how to report bugs and issues:
13 //
14 // https://www.fltk.org/bugs.php
15 //
16 
17 /* \file
18  Fl_Dial widget . */
19 
20 #ifndef Fl_Dial_H
21 #define Fl_Dial_H
22 
23 #ifndef Fl_Valuator_H
24 #include "Fl_Valuator.H"
25 #endif
26 
27 // values for type():
28 #define FL_NORMAL_DIAL 0
29 #define FL_LINE_DIAL 1
30 #define FL_FILL_DIAL 2
45 class FL_EXPORT Fl_Dial : public Fl_Valuator {
46 
47  short a1,a2;
48 
49 protected:
50 
51  // these allow subclasses to put the dial in a smaller area:
52  void draw(int X, int Y, int W, int H);
53  int handle(int event, int X, int Y, int W, int H);
54  void draw();
55 
56 public:
57 
58  int handle(int);
63  Fl_Dial(int x,int y,int w,int h, const char *l = 0);
70  short angle1() const {return a1;}
72  void angle1(short a) {a1 = a;}
74  short angle2() const {return a2;}
76  void angle2(short a) {a2 = a;}
78  void angles(short a, short b) {a1 = a; a2 = b;}
79 
80 };
81 
82 #endif
The Fl_Dial widget provides a circular dial to control a single floating point value.
Definition: Fl_Dial.H:45
void angles(short a, short b)
See short angle1() const.
Definition: Fl_Dial.H:78
short angle2() const
See short angle1() const.
Definition: Fl_Dial.H:74
short angle1() const
Sets Or gets the angles used for the minimum and maximum values.
Definition: Fl_Dial.H:70
void angle1(short a)
See short angle1() const.
Definition: Fl_Dial.H:72
void angle2(short a)
See short angle1() const.
Definition: Fl_Dial.H:76