EasyManua.ls Logo

Texas Instruments TI-89 - Page 163

Texas Instruments TI-89
1398 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter 11: Creating the User Interface
121
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
}
49
break;
50
case CM_KEY_PRESS:
51
key = e->info.keyInfo.keyCode;
52
if ((key <= 0xFF && isprint(key)) || KB_ENTER == key) {
53
WinChar( &appW, key );
54
} else
55
EV_defaultHandler(e);
56
break;
57
case CM_WPAINT:
58
DrawWinBorder( &appW, &appW.Window );
59
WinBackupToScr( &appW );
60
break;
61
case ACM_WINSTR:
62
WinStr( &appW, "APP1 CMD1\n");
63
break;
64
case ACM_DIALOG:
65
opts[0] = opts[1] = 1; /* default to 1st pop-up item */
66
if (KB_ENTER == Dialog( &tDialog, -1, -1, buf, opts )) {
67
sprintf( outStr, "Edit1: %s\nEdit 2: %s\nPopup1: %d\nPopup2: %d",
68
buf, buf+11, opts[0], opts[1] );
69
DlgNotice( "tDialog", outStr );
70
}
71
break;
72
case ACM_POPUP:
73
if (hPopup = PopupNew( "DYNAMIC POPUP", 0 )) {
74
DynMenuAdd( hPopup, 0, buf, 1, DMF_TEXT | DMF_TOP );
75
DynMenuAdd( hPopup, 0, buf+11, 2, DMF_TEXT | DMF_TOP );
76
DynMenuAdd( hPopup, 0, "LAST ITEM", 3, DMF_TEXT | DMF_TOP );
77
if (!(MenuFlags(hPopup) & MF_ERROR)) {
78
vSelect = PopupDo( hPopup, -1, -1, 0 );
79
sprintf(outStr, "Selected %s", PopupText(hPopup, vSelect));
80
DlgNotice( "dPopup", outStr );
81
}
82
HeapFree( hPopup );
83
}
84
break;
85
case ACM_HFONT:
86
WinFont( &appW, F_8x10 );
87
break;
88
default:
89
EV_defaultHandler(e);
90
break;
91
}
92
}
93
94
DWORD NoCallBack( WORD DlgId, DWORD Value ) { return TRUE; }
95
96
// APP1.H
97
#define ACM_WINSTR 0x500
98
#define ACM_DIALOG 0x501
99
#define ACM_POPUP 0x502
100
#define ACM_NOTHING 0x503
101
#define ACM_HFONT 0x504
102
103
// APPR1.R
104
#include "app1.h"
105
#include "tiams.h"
106

Table of Contents

Other manuals for Texas Instruments TI-89

Related product manuals