#ifndef DISABLE_BOX
MODULE = FLTK PACKAGE = FLTK::Box
=pod
=for license Artistic License 2.0 | Copyright (C) 2009 by Sanko Robinson
=for author Sanko Robinson <sanko@cpan.org> - http://sankorobinson.com/
=for version 0.530
=for git $Id: Box.xsi ad157f8 2009-09-24 21:13:29Z sanko@cpan.org $
=head1 NAME
FLTK::Box - Define your own values for L<C<box()>|FLTK::Widget/"box"> on a
widget by making one of these
=head1 Description
=cut
#include <fltk/Box.h>
=for apidoc |||_draw|FLTK::Rectangle * rect|
=cut
void
fltk::Box::_draw( fltk::Rectangle * rect )
C_ARGS: * rect
=for apidoc T[box]|||drawframe|char * s|int x|int y|int w|int h|
Draw a spiral, useful as a box edge, starting with the bottom edge and going
in a counter-clockwise direction, from the outside in toward the center. The
string is interpreted to get a gray shade: A is black, X is white, and all
other letters are 24 possible steps of gray shade, and R is the normal
background color of C<GRAY75>. A leading '2' makes it start with the top edge,
which will reverse exactly which pixels are drawn in the corner.
Emulates the fltk1 C<fl_frame2()> function.
=for apidoc T[box]|||drawframe2|char * s|int x|int y|int w|int h|
Draw a spiral similar to L<C<drawframe()>|/"drawframe">, but starts with the
top edge and goes counter-clockwise.
Emulates the fltk1 C<fl_frame()> function.
=cut
MODULE = FLTK PACKAGE = FLTK
void
drawframe( char * s, int x, int y, int w, int h )
CODE:
switch( ix ) {
case 0: fltk::drawframe( s, x, y, w, h ); break;
case 1: fltk::drawframe2( s, x, y, w, h ); break;
}
ALIAS:
drawframe2 = 1
BOOT:
export_tag("drawframe", "box");
export_tag("drawframe2", "box");
MODULE = FLTK PACKAGE = FLTK::Box
=for apidoc T[box]F||FLTK::Box down|DOWN_BOX||
Inset box in fltk's standard theme.
=for apidoc T[box]F||FLTK::Box flat|FLAT_BOX||
Draws a flat rectangle of L<C<getbgcolor()>|/"getbgcolor">.
=for apidoc T[box]F||FLTK::Box none|NO_BOX||
Draws nothing.
Can be used as a box to make the background of a widget invisible. Also some
widgets check specifically for this and change their behavior or drawing
methods.
=for apidoc T[box]F||FLTK::Box up|UP_BOX||
Up button in fltk's standard theme.
=for apidoc T[box]F||FLTK::Box down|THIN_DOWN_BOX||
1-pixel-thick inset box.
=for apidoc T[box]F||FLTK::Box up|THIN_UP_BOX||
1-pixel-thick raised box.
=for apidoc T[box]F||FLTK::Box box|ENGRAVED_BOX||
2-pixel thick engraved line around edge.
=for apidoc T[box]F||FLTK::Box box|EMBOSSED_BOX||
2-pixel thick raised line around edge.
=for apidoc T[box]F||FLTK::Box box|BORDER_BOX||
1-pixel thick gray line around rectangle.
=for apidoc T[box]F||FLTK::Box box|HIGHLIGHT_UP_BOX||
Draws nothing normally, and as L<C<THIN_UP_BOX>|/"THIN_UP_BOX"> when the mouse
pointer points at it or the value of the widget is turned on.
=for apidoc T[box]F||FLTK::Box box|HIGHLIGHT_DOWN_BOX||
Draws nothing normally, and as L<C<THIN_DOWN_BOX>|/"THIN_DOWN_BOX"> when the
mouse pointer points at it or the value of the widget is turned on.
=cut
MODULE = FLTK PACKAGE = FLTK
fltk::Box *
DOWN_BOX( )
CODE:
switch ( ix ) {
case 0: RETVAL = fltk::DOWN_BOX; break;
case 1: RETVAL = fltk::FLAT_BOX; break;
case 2: RETVAL = fltk::NO_BOX; break;
case 3: RETVAL = fltk::UP_BOX; break;
case 4: RETVAL = fltk::THIN_DOWN_BOX; break;
case 5: RETVAL = fltk::THIN_UP_BOX; break;
case 6: RETVAL = fltk::ENGRAVED_BOX; break;
case 7: RETVAL = fltk::EMBOSSED_BOX; break;
case 8: RETVAL = fltk::BORDER_BOX; break;
case 9: RETVAL = fltk::HIGHLIGHT_UP_BOX; break;
case 10: RETVAL = fltk::HIGHLIGHT_DOWN_BOX; break;
}
OUTPUT:
RETVAL
ALIAS:
FLAT_BOX = 1
NO_BOX = 2
UP_BOX = 3
THIN_DOWN_BOX = 4
THIN_UP_BOX = 5
ENGRAVED_BOX = 6
EMBOSSED_BOX = 7
BORDER_BOX = 8
HIGHLIGHT_UP_BOX = 9
HIGHLIGHT_DOWN_BOX = 10
BOOT:
export_tag( "DOWN_BOX", "box" );
export_tag( "FLAT_BOX", "box" );
export_tag( "NO_BOX", "box" );
export_tag( "UP_BOX", "box" );
export_tag( "THIN_DOWN_BOX", "box" );
export_tag( "THIN_UP_BOX", "box" );
export_tag( "ENGRAVED_BOX", "box" );
export_tag( "EMBOSSED_BOX", "box" );
export_tag( "BORDER_BOX", "box" );
export_tag( "HIGHLIGHT_UP_BOX", "box" );
export_tag( "HIGHLIGHT_DOWN_BOX", "box" );
MODULE = FLTK PACKAGE = FLTK::Box
BOOT:
isa("FLTK::Box", "FLTK::Symbol");
INCLUDE: FrameBox.xsi
INCLUDE: FlatBox.xsi
#endif // ifndef DISABLE_BOX