| Cmenu documentation | view source | Contained in the Cmenu distribution. |
Cmenu - Perl extension for menuing and data entry in perl scripts
use Cmenu;
use Curses;
use Text::Wrap;
&menu_initialise($main_title,$advice);
&menu_init($title,$sub-title,$topest,$menu_help);
&menu_item($item_text,$item_label,$item_style,$item_data,$item_pos)
&menu_item($item_text,$item_label,$item_style,$item_data,$item_pos)
...
&menu_item($item_text,$item_label,$item_style,$item_data,$item_pos)
$sel=&menu_display($advice,$start_item);
&menu_button_set($button,$button_text);
&menu_popup($title,$text);
...
&menu_popup();
&menu_show($title,$text,$colour);
&menu_terminate($message);
CMENU is a Perl Module designed to provide functions for the creation of menus in perl scripts.
It follows on from perlmenu but uses a Curses interface for screen manipulation. It also uses the Text::Wrap module to process large chunks of text for display. These two modules should be loaded by user scripts.
The sequence of menu processing is as follows; 1. Initialise the module loop 2. Define a menu structure 3. Define several menu options 4. Call the menu 5. Deal with the menu selections loop 6. Terminate the module
The module also provide some extra functions.
Andy Ferguson andy@moil.demon.co.uk
cmenurc configuration file to set terminal and screen defaults this file may be System Wide - in /etc/Cmenu/.cmenurc User specific - ~/.cmenurc Run Specific - ./cmenurc See the distributed file for contents.
vt100-wy60 A tic (terminfo) file for VT100 emulation on a Wyse 60 terminal; this sets the functions keys appropriately
demo A sample script showing how menus can be rendered with the module.
* No continuation pages or checks for text displays overflowing the windows. * Resize and Refresh functions can misbehave in spawned shells * BACKTAB definition from Curses is lost so can only TAB forwards thru buttons
perl(1).
| Cmenu documentation | view source | Contained in the Cmenu distribution. |