Texas Instruments TI89 Developer Guide - Page 153
POPUP, SCROLL_REGION, OptionIndex, OptionList, Index0, NumDspFields, TotNumFields, FieldHeight
UPC - 033317198566
View all Texas Instruments TI89 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 153 highlights
Chapter 11: Creating the User Interface 111 below. The numbers 0, 8, 16 represent the field indexes of the mode screen's dialog box. BOOL ModeCallBack(WORD dlgId, DWORD dValue) . . . // Menu key press if (dlgId == 20) { WORD fkey = LO_WORD(dValue); return fkey == KB_F1 ? 0 : fkey == KB_F2 ? 8 : fkey == KB_F3 ? 16 : -1; } 11.4.2.8. POPUP char * TextPtr, MENU * Popup, WORD OptionIndex A POPUP field defines a pop-up menu. The field is defined by a pointer to an optional zero-terminated string used to label the pop-up, a pointer to a pop-up MENU structure (as created by the resource compiler, for dynamic pop-ups use HPOPUP), and the index (OptionIndex) into the OptionList passed to Dialog. Note: OptionList is a C structure, so indexes to it (like OptionIndex) are zero based. See the Dialog function entry point for an example. The value stored in OptionList for this field is the value stored in the pop-up menu structure as the identifier for the currently selected menu item. Default identifiers for menus start from 1 and go up to the number of menu items in the menu. The user may redefine these identifiers if needed. The call-back is called each time the pop-up is modified. See section 11.4.4. Dialog Call-Backs for a description of the events involved. 11.4.2.9. SCROLL_REGION WORD x1, WORD y1, WORD Index0, WORD Index1, WORD NumDspFields, WORD TotNumFields, WORD FieldHeight A scroll region defines a group of similar fields that will scroll as the user moves through the fields. The region (using dialog box coordinates) of the dialog box that scrolls is defined by the x and y parameters defined for all dialog fields to specify the upper left coordinate of the scroll region along with an x1 and y1 field to specify the lower right coordinate of the scroll region. The field index of the first field that will scroll (Index0) followed by the index of the last field that is scrollable (Index1) are specified next. These values are followed by the number of fields that are displayed at one time (NumDspFields), the total number of scrollable fields (TotNumFields), and finally the height in pixels of each field (FieldHeight). All of the fields that are scrollable must be defined contiguously and have the DF_SCROLLABLE bit set in their flag byte. The coordinates of the scrollable fields are relative to the dialog box except that they may extend beyond the TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001