Documentation: Wimp_GetMenuState
Programmer’s Reference Manuals
» Part 7 – The Desktop
» The Window Manager
» SWI Calls
» Wimp_GetMenuState
Wimp_GetMenuState
(SWI &400F4)
| Entry | |
|---|---|
| R0 | 0 => return the current menu tree state, or |
| 1 => report tree leading up to, but not including, a window/icon pair | |
| R1 | Pointer to buffer for result |
| R2 | Window handle of menu (if R0 =1) |
| R3 | Icon handle of entry in menu (if R0 = 1) |
| Exit | |
|---|---|
| R0 | Corrupt |
| R1 | Returned values in buffer |
Use
The purpose of this call is to return the selected menu item and the sub-menus used. This is called the ‘menu tree’.
Notes
The buffer is filled with a list of numbers in the same format as returned by Menu_Selection by Wimp_Poll.
The buffer is terminated with the value of -1.
The buffer will return null (-1) if:- R0 =1 and window or icon handle in R2/R3 is not in the tree, or
- R0 = 0 and the menu belongs to another application, or has been closed.
If the window is a dialog box, the list of sub-menus used will not include the dialog box.