Texas Instruments TI89 Developer Guide - Page 167
Dialog, FLASH, There are two text edit fields each 10 characters in length
UPC - 033317198566
View all Texas Instruments TI89 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 167 highlights
Chapter 11: Creating the User Interface 125 Lines 78 . . . 82 If there were no errors adding the dynamic elements to the pop-up (memory full), we execute the pop-up and display the results as with the dialog box. Lines 83 The memory for this pop-up was created dynamically so it must be freed when we are done with it. Lines 86 . . . 88 Lines 89 . . . 91 Line 95 One additional menu item lets the user change the font for our window. Any messages we do not handle must be passed onto the system so they get handled by someone. All dialog boxes must have a call-back function. Lines 97 . . . 102 Our predefined menu IDs used by both app1.c and appr1.r. Lines 104 . . . 106 Our resource file, it includes our predefined menu IDs and the standard include file tiams.h also. Lines 108 . . . 116 TOOLBOX defines a menu. The RC_NO_IDS flag says we will assign all menu IDs. A 0 tells the resource compiler to use the names we give as symbolic menu IDs and assign them sequential values. Line 118 We define a 180 by 70 pixel dialog box with a call-back function named NoCallBack (defined on line 95). Lines 119, 120 There are two text edit fields each 10 characters in length with space for 11 characters displayed (the extra space means the edit field will not scroll when the last character is hit). The first edit field will start at offset 0 of the buffer we pass to the Dialog function and the next edit field will start at offset 11 (must leave room for the zero byte terminator). Each edit field starts 12 pixels from the left edge of the dialog box and the first edit field starts 14 pixels from the top while the second edit field starts 24 pixels down. Lines 121, 122 There are two pop-ups with coordinates spaced the same as the edit fields (12 pixels from the left edge and 10 pixels apart). Lines 126 . . . 134 The pop-ups for the dialog box are defined here (they can also be used separately as static pop-ups). This example can be built using the TI FLASH Studio™. TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001