Download Amiga Intuition Reference Manual
Transcript
0 0 0 0 1 1 0 0 1 0 1 0 0 0 0 0 | | | | | > Menu number 0 | | | > Menu item number 0x25 = 37 | > Subitem number 1 Again, it is never safe to examine these numbers directly. Use the macros described above if you want to design sanely and assure upward compatibility. INTERCEPTING NORMAL MENU OPERATIONS You have two convenient ways to intercept the normal menu operations that take place when the user presses the right mouse button. The first, MENUVERIFY, gives your program the opportunity to react before menu operations take place and, optionally, to cancel menu operations. The second, RMBTRAP, allows the program to trap right mouse button events for its own use. Menu-verify Menu-verify is one of the Intuition verification functions. These functions allow you to make sure that your program is prepared for some event before it takes place. Using menu-verify, Intuition allows all windows in a screen to verify that they are prepared for menu operations before the operations begin. In general, you would want to use this if the program is doing something special to the display of a custom screen, and you want to make sure it is completed before menus are rendered. Any window can access the menu-verify feature by setting the MENUVERIFY flag in the NewWindow structure when opening the window. When your program gets a message of class MENUVERIFY, menu operations will not proceed until the program replies to the message. The active window gets special menu-verify treatment. It is allowed to see the menuverify message before any other window and has the option of canceling menu operations altogether. You could use this, for instance, to examine where the user has positioned the mouse when the right button was pressed. If the pointer is in the menu bar area, then you can let normal menu operations proceed. If the pointer is below the menu bar, then you can use the right button event for some non-menu purpose. Menus 129