NAME
Fl::Dial - Circular Dial to Control a Single Floating Point Value
Description
The Fl::Dial widget proides a circular dial to control a single floating point value.
Use type(...)
to set the type of 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.
Methods
Fl::Dial inherits from Fl::Valuator and Fl::Widget. On top of that, it exposes the following methods...
new(...)
my $dial_a = Fl::Dial->new(0, 0, 250, 500, 'Important Stuff');
my $dial_b = Fl::Dial->new(0, 0, 250, 500);
The constructor creates a new widget using the given position, size, and label.
The default type is FL_NORMAL_DIAL.
The destructor removes the widget.
angle1( )
my $angle = $dial_a->angle1( );
$dial_b->angle1( 30 );
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.
angle2( )
my $angle = $dial_b->angle2( );
$dial_a->angle2( 30 );
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.
angles( )
$dial_b->angles( 30, 300 );
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.
LICENSE
Copyright (C) Sanko Robinson.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
AUTHOR
Sanko Robinson <sanko@cpan.org>