Texas Instruments TI89 Developer Guide - Page 152
Header, Hedit, Hpopup, Pdb_ok, Pdb_save, Pdb_yes, Pdb_cancel, Pdb_no, And Pdb_goto.
![]() |
UPC - 033317198566
View all Texas Instruments TI89 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 152 highlights
110 Chapter 11: Creating the User Interface 11.4.2.4. 11.4.2.5. 11.4.2.6. 11.4.2.7. called. The data is assumed to be a zero-terminated string of characters and is returned as such. See DialogNew for an example. The call-back is called each time the edit field is modified. See section 11.4.4. Dialog Call-Backs for a description of the events involved. HEADER char * TextPtr, WORD lButton, WORD rButton A HEADER field is a static field which defines the title of a dialog box. The field is defined by a zero-terminated string. Two optional fields may follow: a left predefined button and a right predefined button. If you do not want predefined buttons when using DialogAdd then you must still pass two zero words or pass zero for the second button if only one button is needed. The buttons are placed in the lower left and right portion of the dialog box. The predefined buttons are: PDB_OK, PDB_SAVE, PDB_YES, PDB_CANCEL, PDB_NO, and PDB_GOTO. HEDIT char * TextPtr, WORD Dlen HEDIT fields do not use the FieldBuf array passed to the Dialog function so they do not need the bOffset and FLen fields like normal edit fields. The call-back routine is called with the first parameter equal to DB_GET_EDIT_HANDLE and the second parameter equal to the field's index value. The call-back routine should then return the handle of an edit buffer of at least DLen bytes long. HPOPUP char * TextPtr, HANDLE hPopup, WORD oIndex HPOPUPs work like POPUPs in a dialog box but instead of being passed a pointer to a MENU structure (which defines the POPUP), the handle to a dynamically created POPUP is passed to DialogAdd. This handle does not have to be locked since the dialog code will lock and unlock the handle as needed. As stated earlier, HPOPUPs cannot be used in the resource compiler. MENU MENU * menuPtr, WORD MaxMenuWidth A MENU field defines a menu for a dialog box. Each dialog box can have at most one menu. A menu field is defined by a pointer to a MENU structure created statically with the resource compiler or dynamically (in which case the caller must insure the structure remains locked while in-use in the dialog box). The menu is drawn at the x, y coordinates specified using MenuBegin. When a menu key is pressed, the call-back is passed to the MENU's field index along with a DWORD value containing the menu-handle returned from MenuBegin in the high word and the key code in the low word. The call-back may return DB_EXIT to close the dialog box or a value greater than or equal to zero. This value is the field index of the item that will now be the top-most item in the dialog box. This scheme allows for multipage dialog boxes like the MODE screen on the calculator, see example TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001
![](/manual_guide/products/texas-instruments-ti89-developer-guide-95b636f/152.png)