Showing changes from revision #5 to #6:
Added | Removed | Changed
Exit | |
---|---|
Block | |
+0 | Item in main menu |
+4 | Item in 1st sub-menu |
+8 | Item in 2nd sub-menu |
… | and so on… |
… | ..Terminated by -1 value |
This code is returned from Wimp_Poll and indicates that an item has been selected from a menu.
The values returned in the block indicate the index number of the item chosen in each menu. The first menu item having a value of 0. A value of -1 denotes no further items.
It If the item selected had further sub-menus, then the application should simply ignore the selection.
As the menu does not return information about which menu each item is from, applications must remember which menu it last opened using Wimp_CreateMenu.
The Wimp also provides an easy way of decoding menu selections using Wimp_DecodeMenu.
Pressing Return inside a writeable menu item also generates this event, however, pressing Return inside a dialog box opened as a menu does not.
Any mouse button can be used to select an item, with the Select and Menu buttons having the same effect. Selecting with the Adjust button, however, selects the menu item but should also keep the menu open to allow the user to make more selections. Some assistance from the application is required for this to happen. See Wimp_CreateMenu for more details.
To identify which mouse button was pressed, applications should call Wimp_GetPointerInfo.