Header; Hedit; Hpopup; Menu - Texas Instruments TI-89 Developer's Manual

Graphing calculator
Hide thumbs Also See for TI-89:
Table of Contents

Advertisement

110
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

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

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

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

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
Chapter 11: Creating the User Interface
char * TextPtr , WORD lButton , WORD rButton
char * TextPtr , WORD Dlen
char * TextPtr , HANDLE hPopup , WORD oIndex
MENU * menuPtr , WORD MaxMenuWidth
Not for Distribution
Beta Version January 26, 2001

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ti-92 plusTi-92 plus

Table of Contents