my $selector=Term::Graille::Selector->new(%params)
Creates a new $chooser; params are options the possible options that may be selected redraw This is a function to redraws the application screen. The chooser may overwrite parts of the application screen, and this function needs to be provided to restore the screen. callback The chooser does not call any functions, instead returns the selected item(s). It is upto the main application to use this data (the callback function supplied) pos Optional. The default position is [2,2], but setting this parameter allows the chooser to be placed elsewhere highlightColour Optional. The selected item is highlighted default "black on_white" normalColour Optional. The normal colour of menu items "white on_black"
options
redraw
callback
pos
highlightColour
normalColour
my $selector=setSelected($item)
my $selector=isSelected($item)
Test if an item has been preselected (used internallY
$selector-
These are internal methods to choose the item from the list using keys asin $selector->{keyActions} above;
To install Term::Graille, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Term::Graille
CPAN shell
perl -MCPAN -e shell install Term::Graille
For more information on module installation, please visit the detailed CPAN module installation guide.