Uwe Gansert > Paw-0.54 > Paw::Box

Download:
Paw-0.54.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Source  

Box Widget ^

$box=Paw::Box-new($direction, [$name], [$title], [$color], [$orientation])>;

Parameter

     $direction   => Direction in that the widgets will be packed
                     "v"ertically or "h"orizontally

     $color       => The colorpair must be generated with
                     Curses::init_pair(pair_nr, COLOR_fg, COLOR_bg)
                     [optionally]

     $name        => Name of the box [optionally]

     $orientation => "topleft", "topright", "bottomleft", "bottomright",
                     "center" and "grow" are the possible parameters.
                     They indicate how the box will behave on
                     modifications of the terminal size.
                     Either it keeps it's distance to the indicated
                     terminal side, it remains centered or it
                     grows/shrinks with the new terminal size
                     (default is the orientation of the parent-widget)
                     [ optionally ].'
B<Example>

     $box=Paw::Box->new(direction=>"v",title=>"Start",color=>1);

put($widget)

put the widget into the box.

Example

     $box->put($button0);

set_border(["shade"])

activate the border of the box optionally also with shadows.

Example

     $box->set_border("shade"); or $win->set_border();

abs_move_curs($new_x, $new_y);

Sets the packer to the absolute position in the box (negative values lay outside of the box).

Example

     $box->abs_move_curs(new_x=>1);

rel_move_curs($new_x, $new_y);

Sets the packer relative to the current position in the box (also negative values are possible).

Example

     $box->rel_move_curs(new_y=>3, new_x=>-2);