Chapter 4: User Interface Overview
17
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
Figure 4.3: AddToMenu Screen Shot Figure 4.4: mPop-upTest Screen Shot
Menus are limited to three levels (level one being the toolbar or initial pop-up).
4.2.1. Toolbars
The function keys are normally used to select items from an app’s toolbar.
Toolbars are drawn with
MenuBegin
.
MenuBegin
also creates a heap-based
structure to hold additional information about the menu — such as checkmark
and enable/disable status. If the user presses a function key, it is passed to
MenuKey
to handle the entire menu selection process and the menu ID of the
item selected is returned. Finally
MenuEnd
is called to close the menu.
There are several functions for dealing with dynamic menus. Briefly they are:
MenuNew
— Create an empty dynamic menu.
DynMenuAdd,
DynMenuChange
— Add to or change a dynamic menu item.
MenuLoad
— Load a static menu created with the resource compiler so that
it can be modified with
DynMenuChange
and
DynMenuAdd
.
4.2.2. Pop-ups
There are three kinds of pop-ups which can be used depending on the features
needed: static pop-ups, dynamic pop-ups, and dynamic pop-ups with menu
features (checkmarks, grayed-out). Like toolbars, pop-ups are limited to three
levels with the initial pop-up being the first level.
4.2.2.1. Static Pop-ups
The simplest use of pop-ups is to define a static pop-up with the resource
compiler and then execute it with the
MenuPopup
function.