-
Notifications
You must be signed in to change notification settings - Fork 6
/
a_menu_popup.c
46 lines (40 loc) · 1.59 KB
/
a_menu_popup.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#include "gem_aesP.h"
/** displays a popup menu and returns the user's selection.
*
* @param me_menu points to a MENU structure containing the popup menu
* @param me_xpos x-coordinate of the upper-left corner where the starting object
* will be placed.
* @param me_ypos y-coordinate of the upper-left corner where the starting object
* will be placed.
* @param me_mdata If the function returns a value of 1, the MENU structure
* pointed to by \a me_mdata will be filled in with the ending state
* of the menu (including the object the user selected).\n
* As of AES version 4.1, if \a me_menu->mn_scroll is set to
* #SCROLL_LISTBOX when this function is called,
* a drop-down list box will be displayed instead of a popup
* menu.\n
* Dropdown list boxes will only display a scroll bar if at
* least eight entries exist. If you want to force the scroll
* bar to appear, pad the object with empty #G_STRING objects
* with their #OS_DISABLED flag set.
* @param global_aes global AES array
*
* @return 0 if an error occurred or 1 if successful.
*
* @since This function is only available with AES versions 3.30 and
* above.
*
* @sa mt_menu_attach(), mt_menu_settings()
*
*/
short
mt_menu_popup(MENU *me_menu, short me_xpos, short me_ypos, MENU *me_mdata, short *global_aes)
{
AES_PARAMS(36,2,1,2,0);
aes_intin[0] = me_xpos;
aes_intin[1] = me_ypos;
aes_addrin[0] = (long)me_menu;
aes_addrin[1] = (long)me_mdata;
AES_TRAP(aes_params);
return aes_intout[0];
}