FLTK 1.3.0
Fl_Dial Class Reference

The Fl_Dial widget provides a circular dial to control a single floating point value. More...

#include <Fl_Dial.H>

Inheritance diagram for Fl_Dial:
Fl_Valuator Fl_Widget Fl_Fill_Dial Fl_Line_Dial

List of all members.

Public Member Functions

short angle1 () const
 Sets Or gets the angles used for the minimum and maximum values.
void angle1 (short a)
 See short angle1() const.
short angle2 () const
 See short angle1() const.
void angle2 (short a)
 See short angle1() const.
void angles (short a, short b)
 See short angle1() const.
 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.
int handle (int)
 Allow subclasses to handle event based on current position and size.

Protected Member Functions

void draw (int X, int Y, int W, int H)
 Draws dial at given position and size.
void draw ()
 Draws dial at current position and size.
int handle (int event, int X, int Y, int W, int H)
 Allows subclasses to handle event based on given position and size.

Detailed Description

The Fl_Dial widget provides a circular dial to control a single floating point value.

dial.png
Use type() to set the type of the dial to:

  • FL_NORMAL_DIAL - Draws a normal dial with a knob.
  • FL_LINE_DIAL - Draws a dial with a line.
  • FL_FILL_DIAL - Draws a dial with a filled arc.

Constructor & Destructor Documentation

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.

The default type is FL_NORMAL_DIAL.


Member Function Documentation

short Fl_Dial::angle1 ( ) const [inline]

Sets Or gets the angles used for the minimum and maximum values.

The default values are 45 and 315 (0 degrees is straight down and the angles progress clockwise). Normally angle1 is less than angle2, but if you reverse them the dial moves counter-clockwise.

void Fl_Dial::draw ( int  X,
int  Y,
int  W,
int  H 
) [protected]

Draws dial at given position and size.

Parameters:
[in]X,Y,W,Hposition and size
int Fl_Dial::handle ( int  event,
int  X,
int  Y,
int  W,
int  H 
) [protected]

Allows subclasses to handle event based on given position and size.

Parameters:
[in]event,X,Y,W,Hevent to handle, related position and size.

The documentation for this class was generated from the following files: