RISC OS Open
A fast and easily customised operating system for ARM devices
ROOL
Home | News | Software | Bugs | Bounties | Forum | Documents | Photos | Contact us
Account

Menu_Selection

Programmer's Reference Manuals
» Part 7 - The Desktop
» The Window Manager
» SWI Calls
» Wimp_Poll
» Reason Codes
» Menu_Selection

Menu_Selection

(Reason Code 9)
Exit
Block
+0 Item in main menu
+4 Item in 1^st^ sub-menu
+8 Item in 2^nd^ sub-menu
… and so on…
… ..Terminated by -1 value

Use

This code is returned from Wimp_Poll and indicates that an item has been selected from a menu.

Notes

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 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.

See also

  • Reason Codes
  • Wimp_CreateMenu
  • Wimp_DecodeMenu
  • Wimp_GetPointerInfo
  • Wimp_Poll
Revised on June 17, 2009 22:47:39 by Alan Robertson (52)? (127.0.0.1)
Edit | Back in time (3 revisions) | See changes | History | Views: Print | Source | Linked from: The Window Manager Menus, Wimp_CreateMenu, Wimp_GetMenuState, Message_MenuWarning, Font_DecodeMenu, Reason Codes

Search the Wiki

Commercial use

For commercial enquiries, please contact the owners of RISC OS, Castle Technology Ltd.

ROOL Store

The official C/C++ Development kit and more here.

Donate! Why?

Help ROOL make things happen – please consider donating!

Navigation

  • Home Page
  • All Pages
  • Recently Revised
  • Authors
  • Feeds
Site design © RISC OS Open Limited 2011 except where indicated
The RISC OS Open Instiki theme is based on Insitki's default layout

Valid XHTML 1.0  |  Valid CSS

Instiki 0.19.1(MML+)
This site runs on Rails

Hosted by Arachsys