FLTK 1.4.4: Fl_Dial.H Source File

FLTK 1.4.4

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
31
45 class 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
Fl_Dial::angle1
void angle1(short a)
See short angle1() const.
Definition Fl_Dial.H:72
Fl_Dial::angle2
short angle2() const
See short angle1() const.
Definition Fl_Dial.H:74
Fl_Dial::angles
void angles(short a, short b)
See short angle1() const.
Definition Fl_Dial.H:78
Fl_Dial::Fl_Dial
Fl_Dial(int x, int y, int w, int h, const char *l=0)
Creates a new Fl_Dial widget using the given position, size, and label string.
Definition Fl_Dial.cxx:144
Fl_Dial::angle1
short angle1() const
Sets Or gets the angles used for the minimum and maximum values.
Definition Fl_Dial.H:70
Fl_Dial::angle2
void angle2(short a)
See short angle1() const.
Definition Fl_Dial.H:76
Fl_Valuator::Fl_Valuator
Fl_Valuator(int X, int Y, int W, int H, const char *L)
Creates a new Fl_Valuator widget using the given position, size, and label string.
Definition Fl_Valuator.cxx:26
Fl_Widget::draw
virtual void draw()=0
Draws the widget.
Fl_Widget::handle
virtual int handle(int event)
Handles the specified event.
Definition Fl_Widget.cxx:102
Fl_Widget::x
void x(int v)
Internal use only.
Definition Fl_Widget.H:150
Fl_Widget::w
void w(int v)
Internal use only.
Definition Fl_Widget.H:154
Fl_Widget::y
void y(int v)
Internal use only.
Definition Fl_Widget.H:152
Fl_Widget::h
void h(int v)
Internal use only.
Definition Fl_Widget.H:156
FL_OVERRIDE
#define FL_OVERRIDE
This macro makes it safe to use the C++11 keyword override with older compilers.
Definition fl_attr.h:46