=pod

=head1 NAME

Fl::Box - Simple Box and Label Widget

=head1 Synopsis

    my $box = Fl::Box->new(0, 0, 100, 200, 'Hello, World!');

=head1 Description

This widget simply draws its box, and possibly its label.

Putting it before some other widgets and making it big enough to surround them
will let you draw a frame around them.

=head1 Methods

Fl::Box inherits from Fl::Widget and exposes the following methods...

=cut

#include <FL/Fl_Box.H>

MODULE = Fl::Box        PACKAGE = Fl::Box            PREFIX = Fl_

PROTOTYPES: DISABLE

=pod

=head2 new(...)

    my $box_a = Fl::Box->new(0, 0, 250, 500);
    my $box_b = Fl::Box->new(0, 0, 250, 500, 'Important Stuff');
    my $box_c = Fl::Box->new(FL_UP_BOX, 0, 0, 250, 500, 'Important Stuff');

The first two constructors set C<box()> to C<FL_NO_BOX> which means it is
invisible. However such widgets are useful as placeholders or
Fl::Group->resizable() values. To change the box to something visible, use
C<box($type)>.

The third form of the constroctor sets the box to the specified box type.

The destructor removes the box.

=cut

Fl_Box *
Fl_Box::new( ... )
    CASE: (items == 5 || items == 6)
        CODE:
            /*(int x, int y, int w, int h, char * title = $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_Box(x,y,w,h,label);
        OUTPUT:
            RETVAL
    CASE: ( items == 7 )
        CODE:
            /*(Fl_Boxtype b, int x, int y, int w, int h, char * title)*/
            Fl_Boxtype b = (Fl_Boxtype)SvIV(ST(1));
            int x = (int)SvIV(ST(2));
            int y = (int)SvIV(ST(3));
            int w = (int)SvIV(ST(4));
            int h = (int)SvIV(ST(5));
            char * label = (char *)SvPV_nolen(ST(6));
            RETVAL = new Fl_Box(b,x,y,w,h,label);
        OUTPUT:
            RETVAL

void
Fl_Box::DESTROY()

MODULE = Fl        PACKAGE = Fl

BOOT:
    set_isa("Fl::Box", "Fl::Widget");

=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
