Cmenu

 view release on metacpan or  search on metacpan

doc/Cmenu.tex  view on Meta::CPAN

\end{center}
Notice that \$value[1] is one of the elements of the first array. Normally, values returned in this way will be ordered as they were defined with menu\_item calls but this is not guaranteed. The \$identifier is the value specified in the original \$m...

Where this return value can get really messy is when a complex data entry menu has a combination of regular, alpha, numeric, radio and check list menu items. You will need to take care that you identify all the parts you need for each item. When in d...
\begin{center}
\&menu\_show(``Data Response'',\$sel,''HELP'');
\end{center}
This will show what Cmenu is returning from a particular call.

\subsection{menu\_popup}
This is an extra routine which you may never need. It provides a way of displaying information while a process is being performed rather than the script stalling silently. It is called in two forms; first to display the popup and then to remove it;
\begin{description}
\item [menu\_popup(\$header,\$message)] This creates a popup which overlays the current menu. A very small window is opened with a drawn border and \textbf{\$header} displayed in the centre of the top line. The \textbf{\$message} is displayed in the ...

After calling this, your script should go off and busy itself until ready to talk to the user again
\item [menu\_popup()] call the same routine with no parameters and the Popup menu will be removed.
\end{description}
Please remember to close the popup as dangling windows can trash your display.

\subsection{menu\_show(\$title,\$message,\$style)} 
This provides for splash screens to be shown to the user either reporting difficulties, errors, providing help or asking for confirmation of responses. The routine draws a full window covering the normal menu space (not the backdrop). It accepts thre...
\begin{description}
\item [\$title] Gives the window a title included in the border
\item [\$message] provides the actual text message. If this can be fitted onto a single line, it will be centred in the screen. If the text exceeds a single line width, it will be passed through \textbf{Text::Wrap} for formating. \textbf{Text::Wrap} ...
\item [\$style] using different colours, a different meaning can be associated with splash screens. Also a simple button bar will be drawn for each type so that users can confirm or reject options as required. Responses from menu\_show will be either...
\begin{description}
\item [``HELP''] uses the help colour scheme (brown on grey); also automatically provides a single button.
\item [``WARN''] uses the warning colour scheme as used by the popup screens (defaults to yellow on green). User definable button bar available (see button\_set).
\item [``ERROR''] uses the error colour scheme (white on red) with an active button bar.
\end{description}
Splash screen are exited by pressing any normal key. Usually function keys are rejected.
\end{description}

\subsection{Internal Functions}
These are the internal functions of the module; these should not be called by user scripts.
\begin{description}
\item [menu\_advice] displays a short message at the foot of the screen
\item [menu\_button\_bar] creates a button bar
\item [menu\_create\_pane] creates the menu display
\item [menu\_draw\_active] draws the active menu option
\item [menu\_draw\_button] draws a button
\item [menu\_draw\_inlay] draws the backdrop
\item [menu\_draw\_line] draws an inactive menu option
\item [menu\_draw\_pane] draws the menu pane
\item [menu\_draw\_window] draws the menu window
\item [menu\_edit] edit a field
\item [menu\_hot\_button] report which button is hot
\item [menu\_key\_seq] get input from the keyboard
\item [menu\_navigate] navigate through a menu
\item [menu\_preferences] load modules preferences from file
\item [menu\_redraw\_backdrop] redraw the backdrop
\item [menu\_refresh] redraw the whole screen especially after resizing a terminal window
\end{description}



\section{Application Preferences}
Cmenu provides a facility to read a \textit{preferences} file to configure a common look-and-feel for all your applications. Preferences can be setup for all users (using file \textit{/etc/Cmenu/cmenurc}). individual users (using \textit{\~/.cmenurc}...
\begin{description}
\item [colour] the colours to be used in all screen renditions including special mono-chrome renderings. Cmenu allows a combination of explicit colours and terminal attributes like bold and dim.
\item [keyboard] cmenu is pre-configured to interpret a variety of key-sequences as specific cursor commands; these can be tailored, disabled or supplemented. This includes use of functions keys.\\
Menu navigation uses normal cursor keys and page keys for larger movement; navigation can also behave like \textit{lynx} where right and left move between menus - this can be disabled.
\item [helpfiles] help files can be stored in locations other than running directories
\item [hacks] when rendered on 25-line mono-screens, a large amount of screen space is taken up with superfluous cosmetic frippery; ultra-serious people can reclaim an extra-line.
\end{description}
A heavily commented sample preferences files is included with the distribution. The preferences file is strictly structured; not following the prescribed layout may corrupt display elements or deactivate certain features.

\section{tic file}
Provided with the module is a tic file for VT100 emulation on a Wyse 60 terminal. This has some of the function keys defined correctly. You will need to define function strings if you want to use the 16 F keys. Page and some of the character keys are...

%%%% Body ends here

\end{document}



( run in 0.718 second using v1.01-cache-2.11-cpan-39bf76dae61 )