addtopup() — Silicon Graphics
NAME
addtopup - adds items to an existing popup menu
SPECIFICATION
C
addtopup(pup, str , arg)
int pup;
char *str;
long arg;
FORTRAN
subroutine addtop(pup, str, length, arg)
integer pup
character* str(*)
integer*4 length
integer*4 arg
Pascal
procedure addtopup(pup: integer; str: pstring; arg: long);
DESCRIPTION
addtopup appends items to an existing popup menu. addtopup appends the menu items indicated by str to the bottom of the menu identified by pup. pup is the identifier returned by newpup or defpup. arg is a single argument matching a type specified in str. In Pascal and FORTRAN menus are built by a call to newpup followed by a call to addtop for each menu item requiring an argument, i.e., a function address or a menu identifier. The following code segments construct the same popup menu using C and FORTRAN.
In C:
submenu = defpup("rotate %f | translate %f | scale %f ",
dorotate, dotranslate, doscale);
menu = defpup("sample %t | perspective | ortho | transform %m | greset %f ",
submenu, greset);
In FORTRAN:
submenu = newpup()
call addtop(submen, "rotate %f",9, dorota)
call addtop(submen, "translate %f", 12, dotran)
call addtop(submen, "scale %f",8, doscal)
menu = newpup()
call addtop(menu, "sample %t | perspective | ortho | transform %m "
,40, submen)
call addtop(menu, "greset %f",8, greset)
For a complete description of menu formats, see the defpup man page.
SEE ALSO
defpup, newpup, dopup, freepup
“Multiple Exposure: The IRIS Window Manager” in the IRIS User’s Guide
NOTE
This command can be used only in immediate mode on a workstation with the window manager.
Version 2.4 — May 08, 1986