class 'Fl::Dial';
isa 'Fl::Valuator';
include 'FL/Fl_Dial.H';

=pod

=head1 NAME

Fl::Dial - Circular Dial to Control a Single Floating Point Value

=head1 Description

The Fl::Dial widget proides a circular dial to control a single floating point
value.

=for html <center><img src="http://www.fltk.org/doc-1.3/dial.png" /></center>

Use C<type(...)> to set the type of dial to:

=over

=item FL_NORMAL_DIAL - Draws a normal dial with a knob.

=item FL_LINE_DIAL - Draws a dial with a line.

=item FL_FILL_DIAL - Draws a dial with a filled arc.

=back

=head1 Methods

Fl::Dial inherits from Fl::Valuator and Fl::Widget. On top of that, it exposes
the following methods...

=head2 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.

=cut

xs {name        => 'new',
    definitions => [
            {required => [[qw[int x]], [qw[int y]], [qw[int w]], [qw[int h]]],
             optional => [['const char *', 'label', ' 0']],
             returns  => 'Fl_Dial *'
            }
    ]
};
xs {name        => 'DESTROY',
    definitions => [{returns => 'void'}]
};

=pod

=head2 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.

=cut

xs {name        => 'angle1',
    definitions => [
            {required => [[qw[short a]]],
             returns  => 'void'
            },
            {returns  => 'short'}
    ]
};

=pod

=head2 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.

=cut

xs {name        => 'angle2',
    definitions => [
            {required => [[qw[short a]]],
             returns  => 'void'
            },
            {returns  => 'short'}
    ]
};

=pod

=head2 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.

=cut

xs {name        => 'angles',
    definitions => [
            {required => [[qw[short a]], [qw[short b]]],
             returns  => 'void'
            }
    ]
};

=pod

=head1 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.

=head1 AUTHOR

Sanko Robinson E<lt>sanko@cpan.orgE<gt>

=cut
