=pod

=head1 NAME

Fl::RoundButton - Button with a Radio Circle

=head1 Synopsis

    use Fl;
    my $button = Fl::RoundButton->new(0, 0, 100, 200, 'Hello, World!');
    $button->callback(sub {print q[It's dat boi]} );

=head1 Description

The Fl::RoundButton class represents a button that turns on a round light
rather than drawing pushed in. The shape of the light is initially set to
FL_ROUND_DOWN_BOX. The color of the ligth when on is controlled with
C<selection_color()> which defaults to FL_FOREGROUND_COLOR.

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

=head1 Methods

Fl::RoundButton inherits from Fl::Button which in turns inherits from
Fl::Widget. On top of that, it exposes the following methods...

=cut

#include <FL/Fl_Round_Button.H>

MODULE = Fl::RoundButton        PACKAGE = Fl::RoundButton         PREFIX = Fl_

PROTOTYPES: DISABLE

=pod

=head2 new(...)

    my $button_a = Fl::RoundButton->new(0, 0, 250, 500, 'Important Stuff');
    my $button_b = Fl::RoundButton->new(0, 0, 250, 500);

The constructor creates a new button using the given position, size, and
label.

The destructor removes the button.

=cut

Fl_Round_Button *
Fl_Round_Button::new( ... )
    CASE: (items == 5 || items == 6)
        CODE:
            /*(int x, int y, int w, int h, char * label = $0)*/
            char * label = "";
            int x = (int)SvIV(ST(1));
            int y = (int)SvIV(ST(2));
            int w = (int)SvIV(ST(3));
            int h = (int)SvIV(ST(4));
            if (items == 6) label = (char *)SvPV_nolen(ST(5));
            RETVAL = new Fl_Round_Button(x,y,w,h,label);
        OUTPUT:
            RETVAL

void
Fl_Round_Button::DESTROY()
    CODE:
        int refcount = SvREFCNT(SvRV(ST(0)));
        if (refcount == 1) {
            delete THIS;
        }
        else {
            SvREFCNT_dec(ST(0));
        }

MODULE = Fl        PACKAGE = Fl

BOOT:
    set_isa("Fl::RoundButton", "Fl::Button");

=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
