888
MenuNew
Declaration:
HANDLE MenuNew (SINT Flags , SINT Width , SINT Height )
Category(ies):
Menus
Description:
Begin a dynamically created menu.
Inputs:
Flags
Width
Height — 0 (use default) or requested height of menu bar.
Outputs:
Returns a handle to an empty MENU structure or H_NULL if not enough
memory.
Assumptions:
Note:
1.
2.
3.
4.
5.
6.
Do not forget that once you call MenuBegin you may not unlock the
handle returned from MenuNew or call DynMenuAdd or
DynMenuChange!
TI-89 / TI-92 Plus Developer Guide
— Always pass 0.
— 0 (calculate) or requested width of menu bar.
There is a STRICT method of using dynamic menus.
Create an empty, dynamic menu structure with MenuNew or
MenuLoad.
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).
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).
This will lock the handle returned from MenuNew and save it.
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).
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.
(continued)
Not for Distribution
Appendix A: System Routines — Menus
Beta Version January 26, 2001