Texas Instruments TI89 Developer Guide - Page 161
POPUPs, MenuName, Flags, MaxWidth, MaxHeight
![]() |
UPC - 033317198566
View all Texas Instruments TI89 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 161 highlights
Chapter 11: Creating the User Interface 119 11.5.3. As with dialog boxes, MenuName is the name used to refer to the menu both in the resource file and inside a C program. Flags is usually zero for a menu. If Flags is equal to RC_NO_IDS then the menu IDs are not symbolic values stored in the menu's header file but instead are absolute numbers that will be used as IDs for each menu item. If MaxWidth (in pixels) is set to zero then MenuBegin will draw the menu only as wide as necessary. MaxHeight should be set to 0 which will use the default height. A menu item that includes other menu items is called a parent (the entry Text2 { above). Parent menu items do not normally have IDs associated with them since they cannot be selected by the user and so do not return an ID value. However, they may need an ID for two reasons. The first is if the menu is to be loaded using MenuLoad and then later modified; since an ID is needed to modify an entry. The second reason is if the menu item is to be disabled or checked. The entry Text1, TOP_LEVEL_ID1 is not a parent since it is a stand-alone entry. It can be selected by pressing the menu key associated with that entry (ƒ in this case). The entry Text10, TOP_LEVEL_ID10 { is a special case. It is a parent (cannot be selected) that has no children. This is only used for menus loaded with the MenuLoad function. This entry can then later have other menu entries (children) added to it. See the MenuLoad function for an example. POPUPs POPUP PopupName, Flags, MaxHeight, Title { . . . same format as a menu . . . } POPUPs are defined almost identically to MENUs. The differences are that POPUPs may have an optional title (a text string delimited by double quotes or an icon) as well as a Flags value of MF_NO_NUMS (32) which signifies that the individual items in the pop-up are not to be numbered. If MaxHeight is set to zero then the MenuPopup routine will try to fit as much of the pop-up on the screen as it can. This value may be overridden as long as the size of any title is taken into account. TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001
![](/manual_guide/products/texas-instruments-ti89-developer-guide-95b636f/161.png)