Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 956 Categories, Downloaded 50.187.130 Times

Cmenu 1.1

  Date Added: August 18, 2010  |  Visits: 1.036

Cmenu

Report Broken Link
Printer Friendly Version


Product Homepage
Download (113 downloads)



Cmenu is a Perl extension for menuing and data entry in perl scripts. SYNOPSIS 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. menu_initialise This routine initialises Curses and creates necessary structures for the menu module. It accepts two parameters which may be empty; $main_title A script-wide title displayed on all pages $advice A short text advisory displayed at the foot of every screen (unless over-ridden by the module). The routine returns nothing. menu_init The routine creates a graphic backdrop in the style of the command-line utility "dialog". It accepts 3 parameters $title a menu title displayed at the top $sub_title sub-title text used to give more description $menu_help a help-file to be displayed when the Help key is pressed. The help file is located in a standard location as defined in the configuration file. (optional) menu_item Each line of a menu is created using this call. $item_text The text to be displayed as the menu option $item_label A text label which may be displayed beside the text $item_style How the menu option should be drawn or behave Should be a number from 0 to 9 0 (default) preceeds the text with a text label the label is returned if the item is selected 1 use number instead of a text label; numbered in order of definition 2 item is part of a radio list; radio lists allow only ONE item to be selected per menu 3 item is part of a check list; check lists allow any number (inc. none) of items to be selected 4 as for type 0 expect item label is rendered differently usually used to list data fields where the text is the contents of a field and the label is its meaning 5 as for 4 except the item text is right-aligned 6 as for 4 but if the item is selected, field contents can be edited 7 as for 6 except field treated as a numeric value 8 displayed as for 4 except an alternative reference (not the text label) is returned when selected 9 spacer; leaves a space in the menu $item_data Some item styles need extra information 2 which item in a radio list is already active 3 item in a check list already selected 6 specifies the return value for the field 7 as for 6 8 as for 6 $item pos For edit fields only (6 + 7); specifies the maximum length of a data field and decimal precision for numbers. Passed as a space seperated list eg "30 2 0", length 30 with 2 decimal places menu_display Actually performs the menu display and navigation. Returns information relevant to the action selected. Accepts 2 parametrs; $menu_prompt Displayed at the foot of the screen as advice $menu_start Which item should be active from the start This allows items other than the first declared to be selected; useful when returning to a menu after an earlier selection (optional) This is the important call which returns the result of menu navigation. Depending on the style of menu items defined, various results will be returned. Generally all selections are a tokenised list seperated by a standard character ($Cmenu::menu_sep - can be changed by user). For simple menus, only the selected text label (0,1,4,5) or offset (8) will be returned. For radio and check lists (2 and 3) all the selected items will be returned using each items text label For edited data fields, more complex values are returned. All editable fields on a menu will have a token (whether edited or not) returned. Each token has two fields - the field label and the new field contents; these are seperated by $Cmenu::menu_sepn. Since any type of item can be included in a menu, return values may be equally complex. For complex return values, tokens can be split out using a command fragment such as chop($return_value=&menu_display("Menu Prompt",$start_on_menu_item)); @selection=split(/$Cmenu::menu_sep/,$return_value); for($loop=1;$loop<=$#selection;$i++) { # deal with each token ($field_label,$field_content) = split(/$Cmenu::menu_sepn,$selection[$i]); # processing each field accordingly ... } The first token returned ($selection[0]) is usually the key pressed to close the menu was closed; this will rarely be a valid menu item - check it to make sure an "abort" was not requested. menu_button_set Each menu has up to 3 buttons which can be activated. Usually these give options to either Accept a menu item or Abort the menu prematurely. A Help facility may also be called. This routine switches buttons on and off and, specifies the text label of the button (button actions cannot be altered yielding "ACCEPT", "HELP" or "EXIT" although your scripts can interret these responses however you wish). The < TAB > key traverses the buttons bar. Parameters for this routine are; $button a number 1, 2 or 3 specifying which button is to be set $label the text label for the button; an empty string switches the button off menu_popup Allows a simple screen to pop-up if a lengthy process has been launched. The popup has only one line of text to give an indication of what the system is doing; To start a popup - call with $message To close a popup - call with NO message Remember to close the popup or the menu display will get confused. menu_show Allows a variety of information to be shown on the screen; the display generally replaces normal menu rendering until the user presses an approriate key. The routines takes 3 parameters $title the title of the display $message the message to be displayed. If this is only one line it will be centred; if longer the external routine Text::wrap is used to manipulated the text to fit on the screen. Text formatting is quite primitive. The display cannot be scrolled if it exceeds the dimensions of the active window $colour colour style to render the display chosen from HELP|WARN|ERROR HELP screens have an automatic button to continue; WARN and ERROR can have multiple buttons (use menu_button_set to control these) menu_terminate Called as the script terminates to close down menu facilities and Curses. The terminal should be left in a sane state. The $message parameter prints to STDOUT as the script/routine finishes. If a scripts aborts before calling this, the sanity of the tty will likely get lost; use the command "reset" to restore sanity..

Requirements: No special requirements
Platforms: Linux
Keyword: Cmenu Data Entry Item Label Libraries Menu Programming Text Text Label Will Be
Users rating: 0/10

License: Freeware Size: 78.85 KB
USER REVIEWS
More Reviews or Write Review


CMENU RELATED
Libraries  -  Data::Validator::Item 0.75
Data::Validator::Item is a Factory Class to validate data items. This is an attempt to create an object which will permit semi-automatic verification of a data value. SYNOPSIS use Data::Validator::Item; my $item =...
11.26 KB  
Automation Tools  -  Macro Commander Basic 2.0.0.0
Introducing Macro Commander Basic - a versatile and free automation software for Windows, catering to all your macro recording, text expansion, mouse clicking, automated data entry, and general automation needs. Whether it's native applications or...
37.01 MB  
Libraries  -  FiForms 0.9.3
FiForms started as a collection of PHP classes for creating web-based data entry screens for a MySQL database. FiForms library has since grown into a collection of projects addressing many aspects of web-database development needs. The FiForms...
174.08 KB  
Business  -  With ABCNavUltimate Java Menu All your Graphic Design Needs Will Be Met 9.0
ABCNavUltimate Java Menu is widely recognised as one of the best and most appealing ways to navigate a web site. At Wyka-Warzecha you are only one click away from acquiring this design graphic software.With this application you will have complete...
2.93 MB  
Education  -  Primer Design Tool 1.2 Beta
A GUI program to create the plasmid database forms for BGME lab. This program presents user with a data entry form for entering plasmid information and automatically converts DNA sequence to protein, aligns it, and creates text output file.
40.96 KB  
Web Browsers  -  Amazon Search Menu Item for Safari 1.2
Amazon Search Menu Item is a highly efficient Safari extension that will provide the facility of searching on Amazon right from the context-menu. To use it, just select some text on the page, right-click and then choose Search in Amazon. It's a...
 
Desktop Utilities  -  Zen explorer desktop entry 0.01
Zen explorer desktop entry adds a service menu with the option to send a music file to your Creative zen jukebox. Ive only tested it with Zen V Plus 2 gig, but it uses libmtp to send the file. Not too exciting, i wrote it in less than a minute.....
 
Libraries  -  Data::CTable 1.03
Data::CTable is a Perl module that helps you read, write, manipulate tabular data. SYNOPSIS ## Read some data files in various tabular formats use Data::CTable; my $People = Data::CTable->new("people.merge.mac.txt"); my $Stats =...
153.6 KB  
Libraries  -  Data::Dumper 2.121
Data::Dumper module contains stringified perl data structures, suitable for both printing and eval. SYNOPSIS use Data::Dumper; # simple procedural interface print Dumper($foo, $bar); # extended usage with names print...
31.74 KB  
Networking  -  Advanced Pop-Up Side Menu Bar Applet 2.4
With this feature packed and highly customisable Menu Bar you will be quickly adding a great menu navigation aid to web sites, help systems, documentation, intranets and much more. Advanced yet both Easy and Quick to implement. No knowledge of...
 
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  Math::GMPf 0.29
Math::GMPf - perl interface to the GMP library's floating point (mpf) functions.
30.72 KB  
Programming  -  Net::Wire10 1.08
Net::Wire10 is a Pure Perl connector that talks to Sphinx, MySQL and Drizzle servers. Net::Wire10 implements the low-level network protocol, alias the MySQL wire protocol version 10, necessary for talking to one of the aforementioned...
30.72 KB  
Programming  -  logilab-common 0.56.2
a bunch of modules providing low level functionnalities shared among some python projects devel Please note that some of the modules have some extra dependencies. For instance, logilab.common.db will require a db-api 2.0 compliant...
174.08 KB  
Programming  -  OpenSSL for linux 1.0.0a
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a...
3.83 MB  
Libraries  -  wolfSSL 4.0.0
The wolfSSL embedded SSL/TLS library is a lightweight SSL library written in ANSI standard C and targeted for embedded and RTOS environments - primarily because of its small size, speed, and feature set. It is commonly used in standard operating...
3.88 MB  
Libraries  -  EuGTK 4.8.9
Makes it easy to develop good- looking, fast, cross-platform programs that run on Linux, OS X, and Windows. Euphoria is a very fast interpreted/compiled language with straight-forward syntax. EuGTK allows programming in a clean, object-oriented...
10.68 MB  
Libraries  -  Linux User Group Library Manager 1.0
The LUG Library Manager is a project to help Linux User Groups start their own library. A LUG library is helpful to the community at large because it increases access to information, and gives everyone the opportunity to become more knowledgeable.
5.35 KB  
Libraries  -  Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse->new( join("", ) ); $info = $parser->required;...
8.19 KB  
Libraries  -  sqlpp 0.06
sqlpp Perl package is a SQL preprocessor. sqlpp is a conventional cpp-alike preprocessor taught to understand SQL ( PgSQL, in particular) syntax specificities. In addition to the standard #define/#ifdef/#else/#endif cohort, provides also...
10.24 KB