Texas Instruments TI89 Developer Guide - Page 930
Flags, Width, Height, continued, handle returned
UPC - 033317198566
View all Texas Instruments TI89 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 930 highlights
888 Appendix A: System Routines - Menus MenuNew Declaration: Category(ies): Description: Inputs: Outputs: Assumptions: HANDLE MenuNew (SINT Flags, SINT Width, SINT Height) Menus Begin a dynamically created menu. Flags - Always pass 0. Width - 0 (calculate) or requested width of menu bar. Height - 0 (use default) or requested height of menu bar. Returns a handle to an empty MENU structure or H_NULL if not enough memory. Note: There is a STRICT method of using dynamic menus. 1. Create an empty, dynamic menu structure with MenuNew or MenuLoad. 2. Build the menu with DynMenuAdd or DynMenuChange using the handle returned by MenuNew or MenuLoad (each of these routines returns H_NULL if not enough memory, or check MenuFlags when done with all of the additions/changes). 3. Call MenuBegin setting the MBF_HMENU flag and passing the handle returned by MenuNew or MenuLoad as the argument after the Flags parameter (MenuBegin has a variable number of arguments). NULL can be passed as the pointer to the MENU structure (since the dereferenced handle points to the MENU structure). 4. This will lock the handle returned from MenuNew and save it. 5. Using the handle returned from MenuBegin (this is a separate handle!) you may then call all of the normal menu functions (MenuCheck, MenuKey, MenuOn, MenuTopStat, MenuTopSelect). 6. When done with the menu, call MenuEnd on the handle returned from MenuBegin. This will free the handle returned from MenuBegin AND the handle returned from MenuNew. Do not forget that once you call MenuBegin you may not unlock the handle returned from MenuNew or call DynMenuAdd or DynMenuChange! (continued) TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001