EasyManuals Logo
Home>Texas Instruments>Calculator>TI-89

Texas Instruments TI-89 Developer's Guide

Texas Instruments TI-89
1398 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #152 background imageLoading...
Page #152 background image
110
Chapter 11: Creating the User Interface
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
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.
11.4.2.4. 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.
11.4.2.5. 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.
11.4.2.6. 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.
11.4.2.7. 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

Table of Contents

Other manuals for Texas Instruments TI-89

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments TI-89 and is the answer not in the manual?

Texas Instruments TI-89 Specifications

General IconGeneral
Display size (HxV)100 x 160 mm
Memory type639K FLASH ROM, 188K bytes RAM
Compatible operating systemsOperating System 2.09
Battery typeAAA

Related product manuals