Curses::UI::Buttonbox

Curses::UI::Buttonbox is a Perl module which allows you to create and manipulate button widgets.
Download

Curses::UI::Buttonbox Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Marcus Thiesen
  • Publisher web site:
  • http://search.cpan.org/~mdxi/Curses-UI-0.9601/lib/Curses/UI/Buttonbox.pm

Curses::UI::Buttonbox Tags


Curses::UI::Buttonbox Description

Curses::UI::Buttonbox is a Perl module which allows you to create and manipulate button widgets. Curses::UI::Buttonbox is a Perl module which allows you to create and manipulate button widgets.CLASS HIERARCHY Curses::UI::Widget | +----Curses::UI::Buttonbox SYNOPSIS use Curses::UI; my $cui = new Curses::UI; my $win = $cui->add('window_id', 'Window'); my $buttons = $win->add( 'mybuttons', 'Buttonbox', -buttons => ); $buttons->focus(); my $value = $buttons->get();Curses::UI::Buttonbox is a widget that can be used to create an array of buttons (or, of course, only one button).STANDARD OPTIONS-parent, -x, -y, -width, -height, -pad, -padleft, -padright, -padtop, -padbottom, -ipad, -ipadleft, -ipadright, -ipadtop, -ipadbottom, -title, -titlefullwidth, -titlereverse, -onfocus, -onblurFor an explanation of these standard options, see Curses::UI::Widget.WIDGET-SPECIFIC OPTIONS-buttons < ARRAYREF > This option takes a reference to a list of buttons. The list may contain both predefined button types and complete button definitions of your own.* Your own button definition A button definition is a reference to a hash. This hash can have the following key-value pairs: obligatory: ----------- -label This determines what text should be drawn on the button. optional: --------- -value This determines the returnvalue for the get() method. If the value is not defined, the get() method will return the index of the button. -shortcut The button will act as if it was pressed if the key defined by -shortcut is pressed -onpress If the value for -onpress is a CODE reference, this code will be executes if the button is pressed, before the buttons widget loses focus and returns.* Predefined button type This module has a predefined list of frequently used button types. Using these in B< -buttons > makes things a lot easier. The predefined button types are: ok -label => '< OK >' -shortcut => 'o' -value => 1 -onpress => undef cancel -label => '< Cancel >' -shortcut => 'c' -value => 0 -onpress => undef yes -label => '< Yes >' -shortcut => 'y' -value => 1 -onpress => undef no -label => '< No >' -shortcut => 'n' -value => 0 -onpress => undefExample: .... -buttons => ....-selected < INDEX > By default the first button (index = 0) is active. If you want another button to be active at creation time, add this option. The INDEX is the index of the button you want to make active.-buttonalignment < VALUE > You can specify how the buttons should be aligned in the widget. Available values for VALUE are 'left', 'middle' and 'right'.-vertical < BOOLEAN > When set to a true value, it will cause the buttons to be rendered with vertical instead of horizontal alignment.Requirements:· Perl Requirements: · Perl


Curses::UI::Buttonbox Related Software