PerlVision

 view release on metacpan or  search on metacpan

lib/PerlVision.pm  view on Meta::CPAN

  my $answer = $dialog->activate;

  PerlVision::done;

=head1 DESCRIPTION

PerlVision provides various text-mode user interface widgets,
including checkboxes, radiobuttons, pushbuttons, single and multiple
selection listboxes, an extensible editbox, a scrollable viewbox,
single line text entry fields, a menubar with pulldown menus, and
popup dialog boxes with multiple controls.

=head1 CLASSES

The following object classes are defined within PerlVision:

=over 2

=item L</PerlVision>

Not a widget. Provides a few important class methods.

lib/PerlVision.pm  view on Meta::CPAN

switch focus between controls, and when to exit. Here's how to create
a C<PerlVision::Dialog> object:

  $dialog = new PerlVision::Dialog ("Title", $x1, $y1, $x2, $y2, $style, $color,
                            $control1, 1, 2, 2, 1, 1, 1, 2, 0,
                            $control2, 1, 3, 3, 1, 2, 2, 3, 0,
                            ...);

C<"Title"> is currently ignored.

C<$style>: if 1, creates a popup that is 'raised'. if 0, creates a
popup that is 'depressed'

C<$color> is the background color for the dialog. I'd recommend 6
(cyan) because of the overall hardcoded nature of colors at present.

C<$control*> are C<PerlVision::*> objects that you created beforehand They
can't be C<PerlVision::Menubar> objects. Note that the controls must be
positioned relative to the origin (top left) of the dialog box, not
relative to the screen origin.

How the dialog box works is that the control+exitcode matrix tells



( run in 2.217 seconds using v1.01-cache-2.11-cpan-364913b4093 )