-
Notifications
You must be signed in to change notification settings - Fork 0
/
dialog.r
288 lines (265 loc) · 5.27 KB
/
dialog.r
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
/*
Copyright 2015 Wolfgang Thaller.
This file is part of Retro68.
Retro68 is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Retro68 is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Retro68. If not, see <http://www.gnu.org/licenses/>.
*/
#include "Dialogs.r"
resource 'DLOG' (128) {
{50, 100, 240, 420},
noGrowDocProc,
visible,
goAway,
0x0,
128,
"",
centerMainScreen
};
resource 'DLOG' (129) {
{65, 59, 197, 419},
noGrowDocProc,
visible,
goAway,
0x0,
130,
"Ferris Weather",
staggerMainScreen
};
resource 'DITL' (128, "Temp converter") {
{ /* array DITLarray: 9 elements */
/* [1] */
{160, 230, 180, 310},
Button {
enabled,
"Quit"
},
/* [2] */
{155, 225, 185, 315},
UserItem {
enabled
},
/* [3] */
{74, 88, 94, 311},
StaticText {
enabled,
"Conversion powered by ^0"
},
/* [4] */
{30, 10, 62, 42},
Icon {
disabled,
128
},
/* [5] */
{20, 50, 36, 125},
StaticText {
disabled,
"Celsius"
},
/* [6] */
{20, 170, 36, 245},
StaticText {
disabled,
"Farenheit"
},
/* [7] */
{41, 54, 57, 129},
EditText {
enabled,
"25"
},
/* [8] */
{43, 174, 59, 249},
EditText {
enabled,
"77"
},
/* [9] */
{70, 50, 102, 82},
Icon {
disabled,
129
}
}
};
resource 'DITL' (129, "Error") {
{ /* array DITLarray: 2 elements */
/* [1] */
{70, 190, 90, 248},
Button {
enabled,
"OK"
},
/* [2] */
{10, 70, 59, 251},
StaticText {
disabled,
"Error ^0"
}
}
};
resource 'DITL' (130, "Weather Conditions") {
{ /* array DITLarray: 3 elements */
/* [1] */
{90, 240, 110, 338},
Button {
enabled,
"Get Weather"
},
/* [2] */
{10, 60, 70, 340},
StaticText {
disabled,
"An application that exercises my Open Transport Rust bindings and HTTP client."
},
/* [3] */
{10, 10, 42, 42},
Icon {
disabled,
129
}
}
};
resource 'DITL' (131, "Note") {
{ /* array DITLarray: 2 elements */
/* [1] */
{70, 190, 90, 248},
Button {
enabled,
"OK"
},
/* [2] */
{10, 70, 59, 251},
StaticText {
disabled,
"^0"
}
}
};
#include "Icons.r"
resource 'ICON' (128) {
$"0000 0000 0000 E000 0001 1000 0001 1000"
$"000D 1000 0001 1000 0001 1000 000D 1000"
$"0001 1000 0001 1000 000D 1000 0001 5000"
$"0001 5000 000D 5000 0001 5000 0001 5000"
$"000D 5000 0001 5000 0001 5000 000D 5000"
$"0001 5000 0001 5000 0001 5000 0001 5000"
$"0001 5000 0002 4800 0004 4400 0004 E400"
$"0004 E400 0004 4400 0002 0800 0001 F0"
};
resource 'ICON' (129, "Ferris") {
$"0000 0000 0000 0000 0061 8600 00F3 CF00"
$"01FF FF80 0780 01E0 0E00 0070 1800 0018"
$"300E 380C 2013 4C04 2013 4C04 301F 7C0C"
$"780E 381E FC00 007F 737C 3ECE 31C2 C3CC"
$"1982 8198 0C9E F930 0490 0920 00DE 7B00"
$"0042 4200 003E 7C"
};
#include "Processes.r"
resource 'SIZE' (-1) {
reserved,
acceptSuspendResumeEvents,
reserved,
canBackground,
doesActivateOnFGSwitch,
backgroundAndForeground,
dontGetFrontClicks,
ignoreChildDiedEvents,
is32BitCompatible,
#ifdef TARGET_API_MAC_CARBON
isHighLevelEventAware,
#else
notHighLevelEventAware,
#endif
onlyLocalHLEvents,
notStationeryAware,
dontUseTextEditServices,
reserved,
reserved,
reserved,
#ifdef TARGET_API_MAC_CARBON
1000 * 1024, // Carbon apparently needs additional memory.
1000 * 1024
#else
500 * 1024,
500 * 1024
#endif
};
resource 'ALRT' (128) {
{40, 40, 140, 300},
129,
{ /* array: 4 elements */
/* [1] */
OK, visible, sound1,
/* [2] */
OK, visible, sound1,
/* [3] */
OK, visible, sound1,
/* [4] */
OK, visible, sound1
},
alertPositionMainScreen
};
resource 'ALRT' (129) {
{40, 40, 140, 300},
131,
{ /* array: 4 elements */
/* [1] */
OK, visible, sound1,
/* [2] */
OK, visible, sound1,
/* [3] */
OK, visible, sound1,
/* [4] */
OK, visible, sound1
},
alertPositionMainScreen
};
#include "Menus.r"
resource 'MENU' (128) {
128, textMenuProc;
allEnabled, enabled;
apple;
{
"About Classic Weather...", noIcon, noKey, noMark, plain;
"-", noIcon, noKey, noMark, plain;
}
};
resource 'MENU' (129) {
129, textMenuProc;
allEnabled, enabled;
"File";
{
"New Location", noIcon, "N", noMark, plain;
"-", noIcon, noKey, noMark, plain;
"Close", noIcon, "W", noMark, plain;
"-", noIcon, noKey, noMark, plain;
"Quit", noIcon, "Q", noMark, plain;
}
};
resource 'MENU' (130) {
130, textMenuProc;
0, enabled;
"Edit";
{
"Undo", noIcon, "Z", noMark, plain;
"-", noIcon, noKey, noMark, plain;
"Cut", noIcon, "X", noMark, plain;
"Copy", noIcon, "C", noMark, plain;
"Paste", noIcon, "V", noMark, plain;
"Clear", noIcon, noKey, noMark, plain;
"-", noIcon, noKey, noMark, plain;
"Select All", noIcon, "A", noMark, plain;
}
};
resource 'MBAR' (128) {
{ 128, 129, 130 };
};