PopUpMenuSelectWithCurFont

To pop up a menu and initiate user selection of a menu item and use the current graphics port font, use the PopUpMenuSelectWithCurFont function.

FUNCTION PopUpMenuSelectWithCurFont(theMenu as MenuHandle, top as Integer, left as Integer, popUpItem as Integer) as Integer

theMenu Handle of a menu.

top Vertical position (global screen coordinates)

left Horizontal position (global screen coordinates)

popUpItem ID of item to align with top.

returns: a 32-bit integer that indicates the selected menu and item. Use HiWord to extract the Menu ID (0 for none). And LoWord to extract item number of selection. (HiWord and LoWord are in UtilsLib)

Description:
PopUpMenuSelectWithCurFont displays a popup menu at the specified coordinates and interacts with the user until the mouse button is released.

Most often, popup menus are inserted into the menu directly before calling PopUpMenuSelectWithCurFont and deleted immediately afterwards.

Example:

InsertMenu myMenu,-1
result = PopUpMenuSelectWithCurFont(myMenu,y,x,1)
DeleteMenu myMenu.menuID

Supported platforms:
* MacOS PPC
* MacOS Carbon
* MacOS 68k

Unsupported platforms:
* Windows x86