The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

FLTK::Dial - Rotating value control

Description

The FLTK::Dial widget provides a circular dial to control a single floating point value.

Use type() to change how it draws:

NORMAL Draws a normal dial with a knob.
LINE Draws a dial with a line.
FILL Draws a dial with a filled arc.

You can change the box() from the default of OVAL_BOX to draw different borders. The box() is filled with color(), the moving part is filled with selection_color(), and the border around the moving part is set by textcolor().

Functions

angle1

my $a1 = $dial->angle1( );

See angles().

my $a1 = $dial->angle1( $a );

See angles().

angle2

my $a2 = $dial->angle2( );

See angles().

my $a2 = $dial->angle2( $b );

See angles().

angles

$dial->angles( $a, $b );

Sets 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.

new

my $dial = $dial->new( $x, $y, $w, $h, $label );

Creates a new FLTK::Dial object.

Author

Sanko Robinson <sanko@cpan.org> - http://sankorobinson.com/

License and Legal

Copyright (C) 2008-2010 by Sanko Robinson <sanko@cpan.org>

This program is free software; you can redistribute it and/or modify it under the terms of The Artistic License 2.0. See the LICENSE file included with this distribution or notes on the Artistic License 2.0 for clarification.

When separated from the distribution, all original POD documentation is covered by the Creative Commons Attribution-Share Alike 3.0 License. See the clarification of the CCA-SA3.0.