1
1
2
2
// ////////////////////////////////////////////////////////////////////////////////////////
3
- // File: main.h
4
- // ////////////////////////////////////////////////////////////////////////////////////////
5
- // Description: Header file for test application
6
- // Project: GUI Library
7
- // Author(s): Jason Boettcher
8
-
9
- // www.shplorb.com/~jackal
10
-
11
- /*
12
- //////////////////////////////////////////////////////////////////////////////////////////
13
- // Method: InitApp
14
- //////////////////////////////////////////////////////////////////////////////////////////
15
- // Description: Initialize the application
16
- bool InitApp(HINSTANCE hInst, int nCmdShow);
17
-
18
-
19
-
20
- //////////////////////////////////////////////////////////////////////////////////////////
21
- // Method: WinProc
22
- //////////////////////////////////////////////////////////////////////////////////////////
23
- // Description: Windows callback procedure
24
- long PASCAL WinProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
25
-
26
-
27
-
28
- //////////////////////////////////////////////////////////////////////////////////////////
29
- // Method: UpdateApp
30
- //////////////////////////////////////////////////////////////////////////////////////////
31
- // Description: Update the application every frame
32
- void UpdateApp(void);
33
-
34
-
35
- //////////////////////////////////////////////////////////////////////////////////////////
36
- // Method: ProcessEditor
37
- //////////////////////////////////////////////////////////////////////////////////////////
38
- // Description: Main processing function for the editor
39
-
40
- void ProcessEditor(void);
41
-
42
-
43
- void EDDrawControl(void);
44
-
45
- RTE::GUIControl *EDCheckMouse(RTE::GUIControl *Parent);
46
-
47
- void EDDrawHandle(int X, int Y);
48
-
49
- void EDAdjustControl(void);
50
-
51
- void EDCheckHandle(void);
52
-
53
- void EDInvokeUpdate(void);
54
-
55
- std::string EDGetNewControlName(std::string classname);
56
-
57
-
58
- //////////////////////////////////////////////////////////////////////////////////////////
59
- // Method: EDSave
60
- //////////////////////////////////////////////////////////////////////////////////////////
61
- // Description: Save the layout
62
-
63
- void EDSave(void);
64
-
65
-
66
- //////////////////////////////////////////////////////////////////////////////////////////
67
- // Method: EDLoad
68
- //////////////////////////////////////////////////////////////////////////////////////////
69
- // Description: Load a layout
70
-
71
- void EDLoad(void);
72
-
73
-
74
-
75
- // Grab types
76
- enum {
77
- Control = 0,
78
- HandleTopLeft,
79
- HandleTop,
80
- HandleTopRight,
81
- HandleRight,
82
- HandleBottomRight,
83
- HandleBottom,
84
- HandleBottomLeft,
85
- HandleLeft,
86
- } Grab;
87
-
88
-
89
- // Simple editor structure
90
- typedef struct {
91
- RTE::GUIControl *FocusedControl;
92
-
93
- bool GrabbedControl;
94
- int GrabX, GrabY;
95
- int GrabType;
96
-
97
- int NX, NY, NX2, NY2;
98
-
99
- bool Snap;
100
- int SnapGrid;
101
-
102
- RTE::GUISurface *Check[2];
103
-
104
- bool DirtyProperties;
105
-
106
- int WorkspaceX, WorkspaceY;
107
-
108
- } editor_t;
109
- */
110
-
111
-
112
-
113
-
114
- // /
115
- // /
116
- // / //////////////////////////////////////////////////////////////////////////////////////////
117
- // File: Editor.cpp
3
+ // File: main
118
4
// ////////////////////////////////////////////////////////////////////////////////////////
119
5
// Description: Entry point file for the GUI Library editor
120
6
// Project: GUI Library
121
7
// Author(s): Jason Boettcher
122
8
123
9
124
10
125
-
126
- // ////////////////////////////////////////////////////////////////////////////////////////
127
- // Inclusions of header files
128
-
129
- /* #include <windows.h>
130
- #include <windowsx.h>
131
- #include <stdio.h>*/
132
-
133
-
134
11
#include " TimerMan.h"
135
12
#include " GUIEditorApp.h"
136
13
#include " GUIEditorLib.h"
137
14
138
- #define RECT WINDOWS_RECT
139
-
140
15
#include " allegro.h"
141
16
#include " winalleg.h"
142
- #undef RECT
143
17
144
18
145
19
extern " C" { FILE __iob_func[3 ] = { *stdin, *stdout, *stderr }; }
@@ -183,4 +57,4 @@ int main(int argc, char *argv[])
183
57
184
58
return 0 ;
185
59
}
186
- END_OF_MAIN ();
60
+ END_OF_MAIN ()
0 commit comments