Texas Instruments TI89 Developer Guide - Page 128
Static Menus, OO_APP_DEFAULT_MENU_HANDLE attribute of the application's frame.
![]() |
UPC - 033317198566
View all Texas Instruments TI89 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 128 highlights
86 Chapter 9: Application Control Flow 9.6.1. 1. The user invokes menu processing by pressing one of the function keys 2. The OS sends the function-key press to the application as a CM_KEY_PRESS event. 3. The application forwards the event to the default event handler (EV_defaultHandler). 4. The default event handler looks up the application's current menu (attribute OO_APP_DEFAULT_MENU_HANDLE in the application's frame). 5. The default event handler calls MenuKey on the application's current menu to start user interaction with the menu. 6. MenuKey returns the command number of the user's chosen menu item. 7. Default event handler sends the command number as an event to the application. Note: The application's event handler entry point is called recursively by the above process, first with the CM_KEY_PRESS message then a nested call with the menu item command number. Applications must be re-entrant since default event handling often entails translating one type of command into another type. The application receives the translated message through its event handler entry point as a recursive call from the default event handler. The OS automatically processes function-key presses only if the application has placed a menu handle where the default event handler can find it. The OS looks for a handle to the current menu in the OO_APP_DEFAULT_MENU_HANDLE attribute of the application's frame. The software developer can construct static menus with the resource compiler and link them to the application when the application is created, or an application can build a dynamic menu at run time. Static Menus Static menus are easy to create and simple to use. If your application has very modest menu requirements, static menus are the better choice. Since static menus are handled transparently by the default event handler, the application needs no extra code to deal with function keypresses. Menus are automatically drawn when the application is activated, function keypresses are passed to the menu system, and menu memory is released when the application is deactivated. Incidentally, all the built-in applications employ static menus. See section 11.5. Resource Compiler on how to compose a menu source file and use the resource compiler to create an object file suitable for linking with your application. TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001
![](/manual_guide/products/texas-instruments-ti89-developer-guide-95b636f/128.png)