Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ addtopup(3g) — GL2 W2.5

Media Vault

Software Library

Restoration Projects

Artifacts Sought

addtopup()  —  Silicon Graphics

NAME

addtopup − adds items to an existing pop-up menu

SPECIFICATION

C
addtopup(pup, str , arg)
long 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: longint; str: pstring128; arg: longint);

DESCRIPTION

addtopup adds items to an existing pop-up menu.  str specifies the menu items; pup identifies the menu.  addtopup appends the new menu items to the bottom of the existing menu.  pup is the identifier returned by newpup or defpup.  arg is a single argument that matches the argument str specifies.  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 pop-up 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 defpup. 

SEE ALSO

defpup, newpup, dopup, freepup Using mex, the IRIS Window Manager

NOTE

This routine is available only in immediate mode in the window manager. 

Version 2.5  —  April 22, 1987

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026