fltk 1.3.0rc3
About: FLTK (Fast Light Tool Kit) is a cross-platform C++ GUI toolkit for UNIX/Linux (X11), Microsoft Windows, and MacOS X. Release candidate.
  SfR Fresh Dox: fltk-1.3.0rc3-source.tar.gz ("inofficial" and yet experimental doxygen-generated source code documentation)  

Fl_Dial Class Reference

#include <Fl_Dial.H>

Inheritance diagram for Fl_Dial:
Collaboration diagram for Fl_Dial:

List of all members.

Public Member Functions

int handle (int)
 Fl_Dial (int x, int y, int w, int h, const char *l=0)
short angle1 () const
void angle1 (short a)
short angle2 () const
void angle2 (short a)
void angles (short a, short b)

Protected Member Functions

void draw (int X, int Y, int W, int H)
int handle (int event, int X, int Y, int W, int H)
void draw ()

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.

Definition at line 56 of file Fl_Dial.H.


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.

Definition at line 152 of file Fl_Dial.cxx.

References Fl_Widget::box(), FL_INACTIVE_COLOR, FL_OVAL_BOX, and Fl_Widget::selection_color().


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.

Definition at line 81 of file Fl_Dial.H.

void Fl_Dial::angle1 ( short  a) [inline]

See short angle1() const

Definition at line 83 of file Fl_Dial.H.

void Fl_Dial::angle2 ( short  a) [inline]

See short angle1() const

Definition at line 87 of file Fl_Dial.H.

short Fl_Dial::angle2 ( ) const [inline]

See short angle1() const

Definition at line 85 of file Fl_Dial.H.

void Fl_Dial::angles ( short  a,
short  b 
) [inline]

See short angle1() const

Definition at line 89 of file Fl_Dial.H.

References b.

void Fl_Dial::draw ( void  ) [protected, virtual]

Draws dial at current position and size.

Implements Fl_Widget.

Definition at line 101 of file Fl_Dial.cxx.

References Fl_Widget::draw_label(), Fl_Widget::h(), Fl_Widget::w(), Fl_Widget::x(), and Fl_Widget::y().

int Fl_Dial::handle ( int  e) [virtual]

Allow subclasses to handle event based on current position and size.

Reimplemented from Fl_Widget.

Definition at line 148 of file Fl_Dial.cxx.

References Fl_Widget::h(), handle(), Fl_Widget::w(), Fl_Widget::x(), and Fl_Widget::y().

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.

Definition at line 110 of file Fl_Dial.cxx.

References Fl_Valuator::clamp(), Fl_Widget_Tracker::deleted(), Fl::event_x(), Fl::event_y(), FL_DRAG, FL_ENTER, FL_LEAVE, FL_PUSH, FL_RELEASE, Fl_Valuator::handle_drag(), Fl_Valuator::handle_push(), Fl_Valuator::handle_release(), M_PI, Fl_Valuator::maximum(), Fl_Valuator::minimum(), Fl_Valuator::round(), val, and Fl_Valuator::value().

Referenced by handle().


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