Paw
view release on metacpan or search on metacpan
INSTALL-DE
Makefile.PL
Paw/examples/all_widgets_test.pl
Paw/examples/app1.pl
Paw/examples/app2.pl
Paw/examples/box.pl
Paw/examples/filedialog.pl
Paw/examples/hello_world1.pl
Paw/examples/list_box_edit.pl
Paw/examples/menu.pl
Paw/examples/popup.pl
Paw/examples/text_box.pl
Paw/examples/scroller.pl
Paw/examples/demo.pl
Paw/examples/progressbar.pl
Paw/examples/Popup_menu.pl
Paw/Box.pm
Paw/Button.pm
Paw/Container.pm
Paw/Filedialog.pm
Paw/Label.pm
Paw/Textbox-de.pod
Paw/Window-de.pod
Paw/Paw-de.pod
t/box.t
t/button.t
t/filedialog.t
t/label.t
t/line.t
t/listbox.t
t/menu.t
t/popup.t
t/radiobutton.t
t/text_entry.t
t/widget.t
t/window.t
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/Popup-de.pod view on Meta::CPAN
=head1 Popup Window
B<$popup=Paw::Popup::new($height, $width, \@buttons, \$text, [$name]);>
B<Parameter>
$height => Anzahl der Reihen
$width => Anzahl der Spalten
$name => Name des Widgets [optional]
\@buttons => Ein Array von Strings fuer die Label der Buttons in der Box.
Paw/Popup.pm view on Meta::CPAN
package Paw::Popup;
use strict;
use Paw::Button;
use Paw::Textbox;
use Paw::Window;
@Paw::Popup::ISA = qw(Paw);
=head1 Popup Window
B<$popup=Paw::Popup->new([$height], [$width], [$shade], \@buttons, \$text, [$name]);>
B<Parameter>
$height => number of rows [optionally]
$width => number of columns [optionally]
$shade => popup box has a shadow (shade=>1)
$name => name of the widget [optionally]
\@buttons => an array of strings for the labels on the buttons
in the box.
\$text => reference to a scalar with the Text.
B<Example>
@butt=('Okay', 'Cancel');
$text=('Do you really want to continue ?');
$pu=Popup::new(height=>20, width=>20,
buttons=>\@butt, text=>\$text);
If a button is pressed, the box closes and the number of the button is returned (beginning by 0).
=head2 draw();
raises the popup-window, returns the number of the pushed button.
B<Example>
$button=$pu->draw();
=head2 set_border(["shade"])
activates the border of the widget (optionally also with shadows).
B<Example>
Paw/Popup.pm view on Meta::CPAN
sub new {
my $class = shift;
my $this = Paw->new_widget_base;
my %params = @_;
my $window = 0;
my $textbox= 0;
my @buttons= ();
my $cb = \&_callback;
bless ($this, $class);
$this->{name} = (defined $params{name})?($params{name}):('_auto_popup');
$this->{cols} = (defined $params{width})?($params{width}):($this->{screen_cols}/2);
$this->{rows} = (defined $params{height})?($params{height}):($this->{screen_rows}/2);
$this->{x_pos} = (defined $params{abs_x})?($params{abs_x}):(($this->{screen_cols}-$this->{cols})/2);
$this->{y_pos} = (defined $params{abs_y})?($params{abs_y}):(($this->{screen_rows}-$this->{rows})/2);
$this->{buttons} = $params{buttons};
$this->{text} = $params{text};
# backwards compatibility
if ( ref $params{text} eq 'ARRAY' ) {
Paw/Popup_menu.pm view on Meta::CPAN
=cut
sub new {
my $class = shift;
my $this = Paw->new_widget_base;
my %params = @_;
bless ($this, $class);
$this->{name} = (defined $params{name})?($params{name}):('_auto_popup_menu');
$this->{cols} = (defined $params{width})?($params{width}):(15);
$this->{size} = (defined $params{size})?($params{size}):(5);
$this->{rows} = 1;
$this->{data} = $params{data};
$this->{choosen} = (defined $params{default})?($params{default}):(0);
$this->{act_able} = 1;
$this->{auto_popup} = (defined $params{auto_popup})?($params{auto_popup}):(0);
$this->{color_pair} = (defined $params{color})?($params{color}):(undef);
$this->{callback} = (defined $params{callback})?($params{callback}):(undef);
my $window = Paw::Window->new( abs_x => $this->{ax},
abs_y => $this->{ay},
callback=> \&_win_cb,
height => $this->{size}, width=>$this->{cols} );
$window->set_border();
$window->set_border('shade') if defined $params{'shade'};
my $listbox = Paw::Listbox->new(
Paw/Textbox-de.pod view on Meta::CPAN
=head1 Textbox
B<$popup=Paw::Textbox::new($height, $width, \$text, [$name], [$edit] );>
B<Parameter>
$height => Anzahl der Reihen
$width => Anzahl der Spalten
\$text => Referenz auf den Text.
$edit => editierbarer Text ?
Paw/Textbox.pm view on Meta::CPAN
# Author : Uwe Gansert <ug@suse.de>
# License : GPL, see LICENSE File for further information
#
# completely rewritten Code it's shorter now and it works :-)
# thanx to Arthur Corliss (Author of Curses::Widgets Module for Perl)
# for some ideas.
#
=head1 Textbox
B<$popup=Paw::Textbox->new($height, $width, \$text, [$color], [$cursor_color], [$name], [$edit]);>
B<Parameter>
$height => number of rows
$width => number of columns
\$text => reference to a scalar that contains the text.
$edit => text edit able (0/1) default is 0
Paw/examples/app2.pl view on Meta::CPAN
#
sub reenter_password_cb {
my $this = shift;
my $key = shift;
my $re_password=$reenter_entry0->get_text(); #read the reentered password.
$passwort = $m1_entry4->get_text();; #read the old password
# passwod is no longer "okay" if it hs changed.
$passwort_is_okay=0 if ( not $re_password eq $passwort );
# if you are leaving the password entry and the password is not okay
# a reenter popup appears.
if ( not $passwort_is_okay and ($key eq KEY_DOWN or $key eq KEY_UP or $key eq "\t" or $key eq "\n" ) ) {
$reenter_win->raise();
}
return $key; # you must do that !
}
Paw/examples/popup.pl view on Meta::CPAN
#
# create the array for the statusbar.
# then create a big window with F10 for Quit and the statusbar.
# The window will grow with the screen size
#
@statusbar=("", "", "", "", "", "", "", "", "", "10=Quit");
$win=Paw::Window->new(quit_key=>KEY_F(10), height=>$rows, width=>$columns, statusbar=>\@statusbar, orientation=>"grow");
#
# create a button that will raise the popup-dialog
# we write it on the button, so everybody will know what will
# happen...
#
$button = Paw::Button->new(callback=>\&button_callback, text=>"Popup-Dialog");
# a beautiful border (okay, just a border)
$button->set_border();
#
# a label that tells you what to do or what has happend.
#
$label = Paw::Label->new(text=>"Enter Popup-Dialog");
#
# create the popup dialog.
# three lines of code for a complete dialog !
# first line : the labels for the buttons.
# second line : the text that appears in the dialog box.
# third line : the dialog box with a fixed height and width
#
@buttons = ( "Ok", "Cancel", "don't know" );
$text = ("This is a Popup-Dialog with some buttons.\nNow go ! Leave me alone.");
$pop = Paw::Popup->new( abs_y=>5,shade=>1, buttons=>\@buttons, text=>\$text );
$win->abs_move_curs(new_y=>1); #Bug =:-(
( run in 2.496 seconds using v1.01-cache-2.11-cpan-364913b4093 )