The following sets of routines are available:
Creating and Handling a Pop-up Menu View-Object
The following routines are available:
Display a pop-up menu - xdl_popup_menu
If Button1 or Button3 held down when menu popped up then: a) First release of the button on the menu selects item. b) First release of the button off the menu leaves menu displayed. then 1) Click Button1 or Button3 on the menu to select item. 2) Click Button1 or Button3 off the menu to dismiss menu. If Button1 and Button3 are up when the menu is popped up then a) Click Button1 or Button3 on the menu to select item. b) Click Button1 or Button3 off the menu to dismiss menu.
Fortran call: CALL XDLF_POPUP_MENU (IXROOT, IYROOT, NITEMS, XDLSTR(STRNGS), + LENS, IFONT, IBRDR, ICENT, ITEM)
Parameters: IXROOT (R) X (rootwindow) position for menu (top left) (see xroot) IYROOT (R) Y (rootwindow) position for menu (top left) (see yroot) NITEMS (R) Number of menu items in the menu (see num_items) STRNGS (R) Fortran array of character strings containing the menu item strings. [CHARACTER*LENS STRNGS(NITEMS)]. ** Pass address using XDLSTR function ** (see strings) LENS (R) Length of the menu item character strings (must be >0 cf len_strs) IFONT (R) Font type (1->5 verysmall->extralarge) (see font_type) IBRDR (R) =0, no coloured border added (just a narrow black border will be drawn) =1, Red border =2, Yellow border =3, Green border =4, Cyan border =5, Blue border (Preferred option when border used) =6, Magenta border (see brdr_colr) ICENT (R) =1, centre menu text strings =0, do not (strings will be left justified) (see cent) ITEM (W) =0, no item selected >0, selected menu item number (1 to NITEMS) (the return from xdl_popup_menu)
'C' call: int xdl_popup_menu (xroot, yroot, num_items, strings, len_strs, font_type, brdr_colr, cent)
Parameters: int xroot; /* x position of the menu popup area (wrt root) (R)*/ int yroot; /* y position of the menu popup area (wrt root) (R)*/ int num_items; /* Number of strings in the menu (R)*/ char * strings; /* Menu item strings - this may either be an array of pointers to num_items null terminated character strings (len_strs=0) or a character string num_items*len_strs in length with each string occupying len_strs characters (left justified and padded to the right with blanks if needed). (R)*/ int len_strs; /* Strings length (0 = array of pointers to null terminated character strings (e.g. for 'C' programs) or the length of each string (e.g. for Fortran programs). See also the previous item. (R) */ int font_type; /* Font type (1-5) for very-small, small, medium, large or Extra-large font (R)*/ int brdr_colr; /* =0, no coloured border added (just a narrow black border will be drawn) =1, Red border =2, Yellow border =3, Green border =4, Cyan border =5, Blue border (Preferred option when border used) =6, Magenta border (R)*/ int cent; /* =1, centre menu text strings =0, do not (strings will be left justified) (R)*/
Return: = 0, No item selected > 0, The selected item number