NAME
mmeennuu - curses extension for programming menus
SYNOPSIS
##iinncclluuddee <
> DESCRIPTION
The mmeennuu library provides terminal-independent facilities for composing
menu systems on character-cell terminals. The library includes: item
routines, which create and modify menu items; and menu routines, which
group items into menus, display menus on the screen, and handle inter-
action with the user. The mmeennuu library uses the ccuurrsseess libraries, and a curses initializationroutine such as iinniittssccrr must be called before using any of these func-
tions. To use the mmeennuu library, link with the options -llmmeennuu -llccuurrsseess.
CCuurrrreenntt DDeeffaauulltt VVaalluueess ffoorr IItteemm AAttttrriibbuutteess The mmeennuu library maintains a default value for item attributes. You can get or set this default by calling the appropriate ggeett or sseett routine with a NNUULLLL item pointer. Changing this default with a sseettfunction affects future item creations, but does not change the render-
ing of items already created. RRoouuttiinnee NNaammee IInnddeexx The following table lists each mmeennuu routine and the name of the manual page on which it is described. ccuurrsseess Routine Name Manual Page Name----------------------
currentitem mmiitteemmccuurrrreenntt(3X) freeitem mmiitteemmnneeww(3X)freemenu mmeennuunneeww(3X)
itemcount mmeennuuiitteemmss(3X) itemdescription mmiitteemmnnaammee(3X) itemindex mmiitteemmccuurrrreenntt(3X) iteminit mmeennuuhhooookk(3X) itemname mmiitteemmnnaammee(3X) itemopts mmiitteemmooppttss(3X) itemoptsoff mmiitteemmooppttss(3X) itemoptson mmiitteemmooppttss(3X) itemterm mmeennuuhhooookk(3X) itemuserptr mmiitteemmuusseerrppttrr(3X) itemvalue mmiitteemmvvaalluuee(3X) itemvisible mmiitteemmvviissiibbllee(3X)menuback mmeennuuaattttrriibbuutteess(3X)
menudriver mmeennuuddrriivveerr(3X)
menufore mmeennuuaattttrriibbuutteess(3X)
menuformat mmeennuuffoorrmmaatt(3X)
menugrey mmeennuuaattttrriibbuutteess(3X)
menuinit mmeennuuhhooookk(3X)
menuitems mmeennuuiitteemmss(3X)
menumark mmeennuummaarrkk(3X)
menuopts mmeennuuooppttss(3X)
menuoptsoff mmeennuuooppttss(3X)
menuoptson mmeennuuooppttss(3X)
menupad mmeennuuaattttrriibbuutteess(3X)
menupattern mmeennuuppaatttteerrnn(3X)
menurequestbyname mmeennuurreeqquueessttnnaammee(3X)
menurequestname mmeennuurreeqquueessttnnaammee(3X)
menuspacing mmeennuussppaacciinngg(3X)
menusub mmeennuuwwiinn(3X)
menuterm mmeennuuhhooookk(3X)
menuuserptr mmeennuuuusseerrppttrr(3X)
menuwin mmeennuuwwiinn(3X)
newitem mmiitteemmnneeww(3X)newmenu mmeennuunneeww(3X)
posmenucursor mmeennuuccuurrssoorr(3X)
postmenu mmeennuuppoosstt(3X)
scalemenu mmeennuuwwiinn(3X)
setcurrentitem mmiitteemmccuurrrreenntt(3X) setiteminit mmeennuuhhooookk(3X) setitemopts mmiitteemmooppttss(3X) setitemterm mmeennuuhhooookk(3X) setitemuserptr mmiitteemmuusseerrppttrr(3X) setitemvalue mmiitteemmvvaalluuee(3X)setmenuback mmeennuuaattttrriibbuutteess(3X)
setmenufore mmeennuuaattttrriibbuutteess(3X)
setmenuformat mmeennuuffoorrmmaatt(3X)
setmenugrey mmeennuuaattttrriibbuutteess(3X)
setmenuinit mmeennuuhhooookk(3X)
setmenuitems mmeennuuiitteemmss(3X)
setmenumark mmeennuummaarrkk(3X)
setmenuopts mmiitteemmooppttss(3X)
setmenupad mmeennuuaattttrriibbuutteess(3X)
setmenupattern mmeennuuppaatttteerrnn(3X)
setmenuspacing mmeennuussppaacciinngg(3X)
setmenusub mmeennuuwwiinn(3X)
setmenuterm mmeennuuhhooookk(3X)
setmenuuserptr mmeennuuuusseerrppttrr(3X)
setmenuwin mmeennuuwwiinn(3X)
settoprow mmiitteemmccuurrrreenntt(3X) toprow mmiitteemmccuurrrreenntt(3X)unpostmenu mmeennuuppoosstt(3X)
RREETTUURRNN VVAALLUUEE Routines that return pointers return NNUULLLL on error. Routines that return an integer return one of the following error codes: EEOOKK The routine succeeded. EESSYYSSTTEEMMEERRRROORR System error occurred (see eerrrrnnoo). EEBBAADDAARRGGUUMMEENNTTRoutine detected an incorrect or out-of-range argument.
EEPPOOSSTTEEDDThe menu is already posted.
EEBBAADDSSTTAATTEE Routine was called from an initialization or termination function. EENNOORROOOOMM Menu is too large for its window. EENNOOTTPPOOSSTTEEDDThe menu has not been posted.
EEUUNNKKNNOOWWNNCCOOMMMMAANNDDThe menu driver code saw an unknown request code.
EENNOOMMAATTCCHH Character failed to match. EENNOOTTSSEELLEECCTTAABBLLEE The designated item cannot be selected. EENNOOTTCCOONNNNEECCTTEEDDNo items are connected to the menu.
EERREEQQUUEESSTTDDEENNIIEEDDThe menu driver could not process the request.
SEE ALSO
ccuurrsseess(3X) and related pages whose names begin "menu" for detailed
descriptions of the entry points. NNOOTTEESS The header file <> automatically includes the header files < > and < >. In your library list, libmenu.a should be before libncurses.a; that is,
you want to say `-lmenu -lncurses', not the other way around (which
would give you a link error using GNU lldd(1) and many other linkers). PPOORRTTAABBIILLIITTYYThese routines emulate the System V menu library. They were not sup-
ported on Version 7 or BSD versions. AUTHORS Juergen Pfeifer. Manual pages and adaptation for ncurses by Eric S. Raymond.menu(3X)