Utilities using ncurses

In this chapter we describe the usage of some example applications of the ncurses interface provided by the &Browse; package. They may be of interest by themselves, or they may be used as utility functions within larger applications.

ncurses
utilities

If you call the functions , , , or from another ncurses application in visual mode, you should refresh the windows that are still open, by calling NCurses.update_panels and NCurses.doupdate afterwards, see Section and . Also, if the cursor shall be hidden after that, you should call curs_set with argument 0, see Section , since the cursor is automatically made visible in NCurses.endwin.

<#Include Label="Alert_man">

<#Include Label="NCurses.Select">

<#Include Label="NCurses.GetLineFromUser">

<#Include Label="NCurses.Pager">

Selection of help matches
After loading the `Browse` package &GAP;'s help system behaves slightly different when a request yields several matches. The matches are shown via , the list can be searched and filtered, and one can choose one match for immediate display. It is possible to not choose a match and the ?<nr> syntax still works.

If you want the original behavior call SetUserPreference( "Browse", "SelectHelpMatches", false ); in your &GAP; session or gap.ini file, see .

Selection of package names

The function shows a list of matches if only a prefix of a package name is given. After loading the `Browse` package, is used for that, and one can choose a match.

If you want the original behavior call SetUserPreference( "Browse", "SelectPackageName", false ); in your &GAP; session or gap.ini file, see .

A Demo Function
<#Include Label="Demo_man">