878
Appendix A: System Routines — Menus
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
MenuBegin
Declaration:
HANDLE
MenuBegin
(const MENU *
Menu
, short
x0
, short
y0
,
SINT Flags, . . . )
Category(ies):
Menus
Description:
Open the top level menu for the given menu structure, allocate any
internal data and return a handle to the menu-draw structure or H_NULL if
there is not enough memory to open the menu.
Inputs:
Menu
— Pointer to a MENU structure (as defined by the resource
compiler or a dynamic menu).
x0, y0
— Screen coordinates of the upper left corner of the menu. If
x0
is equal to
L
1 then the menu is centered horizontally, if
y0
is
equal to
L
1 then the menu is centered vertically on the screen.
Flags
— MBF_REDEF
Allow for the top-level menu items (special text/icon
combination) to be redefined with the
MenuTopRedef
function.
Note:
This only works for static menus created with the resource
compiler (using the MF_ALT_ICONS flag in the TOOLBOX
definition) and cannot be used for dynamic menus.
MBF_MAX_MENU_WIDTH
The parameter after
Flags
(SINT) will be the maximum
field width to use for the menu (by default it is the screen
width) — this maximum field width is only used if the
menu was given a 0 width in the resource file (or in a
dynamic menu).
MBF_STRIKEOUT
Use strikeout (line drawn through text or ICON fields)
instead of gray-out to indicate inactive menu items.
MBF_HMENU
The parameter after
Flags
(HANDLE) is the handle of a
dynamically created menu.
Menu
is ignored and this
handle is locked and dereferenced and used instead of
Menu
. The handle is saved and calling
MenuEnd
on the
handle returned by
MenuBegin
will also free this
handle.
(continued)