Paw
view release on metacpan or search on metacpan
or
Faktor 2 [ ] Faktor 3 [ ] Faktor 4 [ ]
Ergebnis : 200
This type of widget-packing is nice for smaller GUIs and surely a fast solution but
you will come very fast to the boundaries of your possibilities.
Then the boxes seems to be the better solution.
A box takes up several widgets and puts them always either horizontal or vertically.
The Clou at a box is that it can also take up other boxes.
It is possible that a horizontal box is to be packed into a vertical box and this in any depth.
If you know the widgetpacker of GTK or TK, you know this widgetpacker too.
###########################################
# 7 Buttons building an H
###########################################
$vbox0->put($b1);
$hbox1->put($b2);
$hbox1->put($b3);
$vbox0->put($hbox1);
$vbox0->put($b4);
$hbox0->put($vbox0);
$vbox1->put($b5);
$vbox1->put($b6);
$vbox1->put($b7);
$hbox0->put($vbox1);
$win->put($hbox0);
We will get:
[1] [5]
[2][3][6]
[4] [7]
=head1 SEE ALSO
Paw::Box container for other Widgets
Paw::Button simple Button (optionally with label)
Paw::Filedialog filedialog Widget
Paw::Label simple text label
Paw::Line h/v line (seperator for menus)
Paw::Listbox box with selectable lines
Paw::Menu pulldown menus
Paw::Popup popup window with text and buttons
Paw::Progressbar a progressbar
Paw::Radiobutton a group of buttons but only one can be selected
Paw::Scrollbar scrollbar for other widgets (listbox...) no mouse support
Paw::Statusbar bottomline for windows
Paw::Text_entry enter one line of text
Paw::Textbox box with more lines of text (buggy !!!)
Paw::Window container for other widgets
=head1 COPYRIGHT
Copyright (c) 1999 SuSE GmbH, Nuernberg, Germany. All rights reserved.
=cut
#
# "Subroutine %s redefined" Warning sucks - so it got to be killed.
#
$SIG{'__WARN__'} = sub {
for ( $_[0] ) {
/Subroutine [\w\d_\-]+ redefined at/ && do {
# okay, maybe I want to see a warning....
return;
};
# Return all other errors
warn $_;
}
};
sub new_widget_base {
my $class = shift;
my $this = {}; #Fensterdaten
$this = {
parent => 0, #Elternwidget
name => '', #Name des Widget
rows => 0, #Widgethoehe
cols => 0, #Widgetbreite
wx => 0, #Cursorposition x
wy => 0, # " y
type => '', #Widget Bezeichnung
border => 0, #Rahmen Bit 1=AN/AUS 2=Shade/NoShade
direction => 'h',
is_act => 0,
act_able => 0,
wx => 0,
wy => 0,
ax => 0,
ay => 0,
screen_cols => COLS,
screen_rows => LINES,
#anz_pairs => COLOR_PAIRS, # not supportet by perl curses :-(
anz_pairs => 32,
( run in 1.077 second using v1.01-cache-2.11-cpan-364913b4093 )