FLTK 1.4.0
Loading...
Searching...
No Matches
Fl_Dial.H
1//
2// Dial header file for the Fast Light Tool Kit (FLTK).
3//
4// Copyright 1998-2022 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
45class FL_EXPORT Fl_Dial : public Fl_Valuator {
46
47 short a1,a2;
48
49protected:
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() FL_OVERRIDE;
55
56public:
57
58 int handle(int) FL_OVERRIDE;
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 angle1(short a)
See short angle1() const.
Definition Fl_Dial.H:72
short angle2() const
See short angle1() const.
Definition Fl_Dial.H:74
void angles(short a, short b)
See short angle1() const.
Definition Fl_Dial.H:78
short angle1() const
Sets Or gets the angles used for the minimum and maximum values.
Definition Fl_Dial.H:70
void angle2(short a)
See short angle1() const.
Definition Fl_Dial.H:76
The Fl_Valuator class controls a single floating-point value and provides a consistent interface to s...
Definition Fl_Valuator.H:47
virtual void draw()=0
Draws the widget.
virtual int handle(int event)
Handles the specified event.
Definition Fl_Widget.cxx:102
#define FL_OVERRIDE
This macro makes it safe to use the C++11 keyword override with older compilers.
Definition fl_attr.h:46