2 // TTEDIT.H: Header file
\r
4 // by James L. Hammons
\r
5 // (C) 2005 Underground Software
\r
11 #include <wx/wx.h> // So that whoever uses this can without having
\r
12 // to pull in a bunch of references manually
\r
15 // Forward declarations
\r
23 // Class representing the entire Application
\r
25 class TTEditApp: public wxApp
\r
28 TTEditFrame * mainFrame;
\r
29 CharWindow * charWin;
\r
30 ToolWindow * toolPalette;
\r
37 DECLARE_APP(TTEditApp)
\r
39 class TTEditFrame: public wxFrame
\r
44 TTEditApp & app; // Reference to the application object
\r
45 // Subwindows for reference within the program.
\r
46 TTEditWindow * mainWindow;
\r
47 wxMenuBar * menuBar;
\r
49 // Constructor and destructor
\r
50 TTEditFrame(wxFrame * parent, const wxString &title, const wxPoint &pos, const wxSize &size, long style);
\r
53 void OnCloseWindow(wxCloseEvent &e);
\r
55 void OnOpen(wxCommandEvent &e);
\r
56 void OnExit(wxCommandEvent &e);
\r
57 void OnAbout(wxCommandEvent &e);
\r
58 // void OnEasy(wxCommandEvent &event);
\r
59 /// void OnMedium(wxCommandEvent &event);
\r
60 // void OnDifficult(wxCommandEvent &event);
\r
62 DECLARE_EVENT_TABLE()
\r
65 class TTEditWindow: public wxWindow
\r
68 TTEditApp & app; // Reference to the application object
\r
69 double scale; // Window scaling factor
\r
70 int32 offsetX, offsetY; // Window offsets
\r
74 // int field_width, field_height;
\r
75 // int x_cell, y_cell;
\r
77 wxPoint pt, ptOffset, ptPrevious;
\r
79 // Constructor and destructor
\r
80 TTEditWindow(wxFrame * parent, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = 0);
\r
81 ~TTEditWindow(void);
\r
83 void OnPaint(wxPaintEvent &e);
\r
84 void OnMouseEvent(wxMouseEvent &e);
\r
85 // void DrawField(wxDC *, int xc1, int yc1, int xc2, int yc2);
\r
86 // void Refresh(int xc1, int yc1, int xc2, int yc2);
\r
87 // void Uncover(int x, int y);
\r
88 // void UpdateFieldSize();
\r
91 wxPoint GetAdjustedMousePosition(wxMouseEvent &e);
\r
92 wxPoint GetAdjustedClientPosition(wxCoord x, wxCoord y);
\r
94 DECLARE_EVENT_TABLE()
\r
97 class CharWindow: public wxWindow
\r
102 // int field_width, field_height;
\r
103 // int x_cell, y_cell;
\r
106 // Constructor and destructor
\r
107 CharWindow(wxFrame * parent, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = 0);
\r
110 void OnPaint(wxPaintEvent &e);
\r
111 void OnMouseEvent(wxMouseEvent &e);
\r
112 // void DrawField(wxDC *, int xc1, int yc1, int xc2, int yc2);
\r
113 // void Refresh(int xc1, int yc1, int xc2, int yc2);
\r
114 // void Uncover(int x, int y);
\r
115 // void UpdateFieldSize();
\r
117 DECLARE_EVENT_TABLE()
\r
120 class ToolWindow: public wxFrame
\r
121 //class ToolWindow: public wxWindow
\r
127 wxPoint sizeStamp, sizeTPBM;
\r
130 // Constructor and destructor
\r
131 ToolWindow(wxFrame * parent, const wxString &title, const wxPoint &pos, const wxSize &size, long style);
\r
132 // ToolFrame(wxFrame * parent, const wxString &title, const wxPoint &pos, const wxSize &size, long style);
\r
133 // ToolWindow(wxFrame * parent, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = 0);
\r
136 void OnPaint(wxPaintEvent &e);
\r
137 void OnMouseEvent(wxMouseEvent &e);
\r
138 // void DrawField(wxDC *, int xc1, int yc1, int xc2, int yc2);
\r
139 // void Refresh(int xc1, int yc1, int xc2, int yc2);
\r
140 // void Uncover(int x, int y);
\r
141 // void UpdateFieldSize();
\r
142 int32 FindSelectedTool(void);
\r
144 DECLARE_EVENT_TABLE()
\r
147 // Resource/control IDs
\r
149 #define IDI_ICON 0x01L // IDs same as in ttedit.asm
\r
150 #define IDM_MENU 0x02L
\r
151 #define IDA_ACCEL 0x03L
\r
152 #define IDD_ABOUT 0x04L
\r
153 #define IDR_TOOLBAR1 0x05L
\r
154 #define IDB_TOOLBAR1 0x06L
\r
155 #define IDB_TOOLPAL1 0x07L
\r
156 #define IDC_CURSOR1 0x08L
\r
157 #define IDC_CURSOR2 0x09L
\r
158 #define IDC_CURSOR3 0x0AL
\r
159 #define IDC_CURSOR4 0x0BL
\r
160 #define IDC_CURSOR5 0x0CL
\r
161 #define IDC_CURSOR6 0x0DL
\r
162 #define IDC_CURSOR7 0x0EL
\r
163 #define IDC_CURSOR8 0x0FL
\r
165 #define IDS_SYSMENU 0x010L
\r
166 #define IDM_FILEMENU 0x011L
\r
167 #define IDM_HELPMENU 0x012L
\r
169 #define IDM_NEW 0x020L
\r
170 #define IDM_OPEN 0x021L
\r
171 #define IDM_SAVE 0x022L
\r
172 #define IDM_SAVEAS 0x023L
\r
173 #define IDM_EXIT 0x024L
\r
174 #define IDM_HELPTOPICS 0x025L
\r
175 #define IDM_ABOUT 0x026L
\r
177 #define ID_TBLEFT 0x030L
\r
178 #define ID_TBRIGHT 0x031L
\r
179 #define ID_TBCHARWIN 0x032L */
\r
181 #endif // __TTEDIT_H__
\r