CursesWidgets
view release on metacpan or search on metacpan
# The following are provided for use with descendent
# classes, and while they are not expected to be
# overridden, they can be.
$obj = Curses::Widgets->new({KEY => 'value'});
$obj->_copy($href1, $href2);
$obj->reset;
$obj->input($string);
$value = $obj->getField('VALUE');
$obj->setField(
'FIELD1' => 1,
'FIELD2' => 'value'
);
$obj->execute($mwh);
$obj->draw($mwh, 1);
@geom = $obj->_geometry;
@geom = $obj->_cgeometry;
$dwh = $obj->_canvas($mwh, @geom);
$obj->_save($mwh);
$obj->_restore($mwh);
$obj->_border($mwh);
$obj->_caption
# The following are provided for use with descendent
# classes, and are expected to be overridden.
$obj->_conf(%conf);
$obj->input_key($ch);
$obj->_content($mwh);
$obj->_cursor
=head1 REQUIREMENTS
=over
=item Curses
=back
=head1 DESCRIPTION
This module serves two purposes: to provide a framework for creating
custom widget classes, and importing a few useful functions for
global use.
Widget specific methods are documented in each Widget's pod, of which the
following widgets are currently available:
=over
=item Button Set (Curses::Widgets::ButtonSet)
=item Calendar (Curses::Widgets::Calendar)
=item Combo-Box (Curses::Widgets::ComboBox)
=item Label (Curses::Widgets::Label)
=item List Box (Curses::Widgets::ListBox)
=item Multicolumn List Box (Curses::Widgets::ListBox::MultiColumn)
=item Menu (Curses::Widgets::Menu)
=item Progress Bar (Curses::Widgets::ProgressBar)
=item Text Field (Curses::Widgets::TextField)
=item Text Memo (Curses::Widgets::TextMemo)
=back
The following tutorials are available:
=over
=item Widget Usage -- General Usage & Tips (Curses::Widgets::Tutorial)
=item Widget Creation (Curses::Widgets::Tutorial::Creation)
=item Widget Creation -- ComboBox Example (Curses::Widgets::Tutorial::ComboBox)
=back
For even higher (and simpler) level control over collections of widgets on
"forms", please see B<Curses::Forms>, which uses this module as well.
=cut
#####################################################################
#
# Environment definitions
#
#####################################################################
package Curses::Widgets;
use strict;
use vars qw($VERSION @ISA @EXPORT);
use Carp;
use Curses;
use Exporter;
($VERSION) = (q$Revision: 1.997 $ =~ /(\d+(?:\.(\d+))+)/);
@ISA = qw(Exporter);
@EXPORT = qw(select_colour select_color scankey textwrap);
my $colour = -1;
my %colours = (
black => COLOR_BLACK, cyan => COLOR_CYAN,
green => COLOR_GREEN, magenta => COLOR_MAGENTA,
red => COLOR_RED, white => COLOR_WHITE,
yellow => COLOR_YELLOW, blue => COLOR_BLUE
);
my %colour_pairs = ();
my ($DEFAULTFG, $DEFAULTBG);
#####################################################################
#
# Module code follows
#
#####################################################################
( run in 1.831 second using v1.01-cache-2.11-cpan-cdf2f3d4e48 )