-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.r
More file actions
99 lines (88 loc) · 3.17 KB
/
main.r
File metadata and controls
99 lines (88 loc) · 3.17 KB
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
#include "SysTypes.r"
#include "Types.r"
#include "libs/LFiles/include/LFiles.r"
#include "src/PIntro.r"
#include "src/PIcons.r"
// 31 flags
#define AllItems 0b1111111111111111111111111111111
#define NoItems 0b0000000000000000000000000000000
#define MenuItem1 0b0000000000000000000000000000001
#define MenuItem2 0b0000000000000000000000000000010
#define MenuItem3 0b0000000000000000000000000000100
#define MenuItem4 0b0000000000000000000000000001000
#define MENU_BAR_ID 128
#define MENU_APPLE 128
#define MENU_FILE 129
#define WINDOW_ABOUT_ID 128
#define WINDOW_INTRO_ID 129
// ----------------------------------------------------------------------------
// Menu resources
resource 'MBAR' (MENU_BAR_ID, preload) {
{ MENU_APPLE, MENU_FILE };
};
resource 'MENU' (MENU_APPLE, preload) {
MENU_APPLE, textMenuProc,
AllItems & ~MenuItem2, // Disable separator line, enable About Box and DAs
enabled, apple,
{
"About Pinax 0.0.0a", noicon, nokey, nomark, plain;
"-", noicon, nokey, nomark, plain
}
};
resource 'MENU' (MENU_FILE, preload) {
MENU_FILE, textMenuProc,
AllItems,
enabled, "File",
{
"New...", noicon, "N", nomark, plain;
"Open...", noicon, "O", nomark, plain;
"Open recent", noicon, hierarchicalMenu, "A", plain;
"Close", noicon, "W", nomark, plain;
"-", noicon, nokey, nomark, plain;
"Quit", noicon, "Q", nomark, plain
}
};
// ----------------------------------------------------------------------------
// Windows
resource 'DLOG' (WINDOW_ABOUT_ID, purgeable) {
// 44 x 28 : 330 x 230
{50, 50, 280, 380},
noGrowDocProc,
visible,
noGoAway,
0x0, // No refCon
WINDOW_ABOUT_ID,
"", // No window title
1
};
resource 'WIND' (WINDOW_INTRO_ID, preload, purgeable) {
{64, 60, 104, 370}, // initial window size and location
kWindowFloatSideProc, // window definition ID:
// incorporates definition function
// and variation code
invisible, // window is initially invisible
goAway, // window has close box
0x0, // reference constant
"untitled", // window title
staggerParentWindowScreen
// optional positioning specification
};
resource 'DITL' (WINDOW_ABOUT_ID, purgeable) {
{
// Item 1
// Y X H W
// 21 100
{154+18, 80+37, 175+18, 180+37}, Button { enabled, "OK" },
// Item 2
{ 4+18, 68+37, 38+18, 193+37}, StaticText { disabled, "Pinax 0.0.0a1\rby Giancarlo Mariot" },
// Item 3
// 16 239
{ 86+18, 11+37, 102+18, 250+37}, StaticText { disabled, "Copyright - 2025 Giancarlo Mariot." },
// Item 4
// 32 32
{ 44+18, 114+37, 76+18, 146+37}, Icon { disabled, 128 },
// Item 5
// 26 174
{107+18, 43+37, 133+18, 217+37}, StaticText { disabled, "Written in Retro68" }
}
};