1 #define INT_MAX	+32767
2 
3 #define INT_MIN	-32767
4 
5 /* resource id's */
6 
7 #define CWINRES				400
8 
9 #define GWINRES				401
10 
11 #define MBAR_RES			400
12 
13 #define APPLE_MENU_RES		400
14 
15 #define FILE_MENU_RES		401
16 
17 #define EDIT_MENU_RES		402
18 
19 #define CONTROL_MENU_RES	403
20 
21 #define STRINGS_RES			400
22 
23 
24 
25 /* Apple menu */
26 
27 #define ABOUT_ITEM			1
28 
29 #define ABOUT_BOX			400
30 
31 #define	ABOUT_PICT			400
32 
33 
34 
35 /* File menu */
36 
37 #define LOAD				1
38 
39 #define LOAD_NOISILY		2
40 
41 #define QUIT				4
42 
43 
44 
45 /* Edit menu */
46 
47 #define UNDO				1
48 
49 #define CUT					3
50 
51 #define COPY				4
52 
53 #define PASTE				5
54 
55 #define CLEAR				6
56 
57 
58 
59 /* Control menu */
60 
61 #define BREAK				1
62 
63 #define CONTINUE			2
64 
65 #define CLEAN_UP			3
66 
67 #define CANCEL_INPUT		4
68 
69 #define TOP_LEVEL			5
70 
71 #define SHOW_GRAPHICS		7
72 
73 #define SPLIT_SCREEN		8
74 
75 
76 
77 /* window sizing/dragging stuff */
78 
79 #define DRAG_THRESHOLD 8
80 
81 #define MIN_WIN_HEIGHT 80
82 
83 #define MIN_WIN_WIDTH 120
84 
85 
86 
87 #define MAX_BUF 250						/* max chars in output buffer */
88 
89 #define SCROLLBACK_THRESHHOLD 30000 	/* max chars kept in window */
90 
91 #define DELETE_BLOCK 10000  			/* how many chars to delete when threshhold reached */
92 
93 
94 
95 #define LINEHEIGHT 11					/* height in pixels of 9-point Geneva, the font used */
96 
97 #define STACKMIN 400000					/* amout of memory for application stack */
98 
99 #define MASTERS 3						/* arbitrary -- how many times to call MoreMasters() */
100 
101 
102 
103 /* key codes */
104 
105 #define RETURN		0x0d
106 
107 #define ENTER		0x03
108 
109 #define DELETE		0x08
110 
111 #define FWDDEL		0x7F
112 
113 #define CLRKEY		0x1b
114 
115 #define PAGEUP		0x0b
116 
117 #define PAGEDN		0x0c
118 
119 #define HOMEKEY		0x01
120 
121 #define ENDKEY		0x04
122 
123 #define HELPKEY		0x05
124 
125 #define FNKEY		0x10
126 
127 #define LEFTARROW	0x1c
128 
129 #define RIGHTARROW	0x1d
130 
131 #define UPARROW		0x1e
132 
133 #define DOWNARROW	0x1f
134 
135 #define DBLQUOTE	'\"'
136 
137 
138 
139 /* useful definitions */
140 
141 #define MBAR_HEIGHT		20
142 
143 #define TITLEBAR_HEIGHT	20
144 
145 #define SCROLLER_WIDTH	15
146 
147 #define SCREEN_MARGIN	2
148 
149 #define TEXT_MARGIN		4
150 
151 #define GRAFWIN_HEIGHT	232
152 
153 void AdjustMenus(void);
154 
155 void DoMenu(long choice);
156 
157 void HideGrafWin(void);
158 
159 void DoContent(EventRecord *theEvent);
160 
161 void InitMac(void);
162 
163 void MacWrapUp(void);
164 
165 
166 void DoEvent (void);
167