]> Shamusworld >> Repos - ttedit/blob - src/ttemainwindow.h
8de8ec1b99f7f6ee450542117612cab01f51f074
[ttedit] / src / ttemainwindow.h
1 //
2 // TTEMAINWINDOW.H: Header file
3 //
4 // by James L. Hammons
5 // (C) 2009 Underground Software
6 //
7
8 #ifndef __TTEMAINWINDOW_H__
9 #define __TTEMAINWINDOW_H__
10
11 //Hrm. uh??? I thought this wasn't the way to do this stuff...???
12 #include <QtGui>
13
14 #if 0
15 //#include <wx/wx.h>                                                            // So that whoever uses this can without having
16                                                                                                 // to pull in a bunch of references manually
17 //#include "ttf.h"
18
19 // Forward declarations
20
21 //class TTEditWin;
22 //class TTEditWindow;
23 //class CharWindow;
24 //class ToolWindow;
25
26 //
27 // Class representing the entire Application
28 //
29 class TTEditApp: public QMainWindow
30 {
31         public:
32                 TTEditFrame * mainFrame;
33                 CharWindow * charWin;
34                 ToolWindow * toolPalette;
35                 TTF font;
36                 wxCursor * cur[8];
37
38                 bool OnInit();
39                 int OnExit();
40                 void CreateResources(void);
41 };
42
43 DECLARE_APP(TTEditApp)
44 #endif
45 // Forward declarations
46
47 class EditWindow;
48 //class CharWindow;
49
50 class TTEMainWindow: public QMainWindow
51 {
52         // All Qt apps require this macro
53         Q_OBJECT
54
55         public:
56                 TTEMainWindow();
57
58         protected:
59                 void closeEvent(QCloseEvent * event);
60
61         private slots:
62                 void Open();
63
64         private:
65                 void ReadSettings(void);
66                 void WriteSettings(void);
67
68                 EditWindow * editWnd;
69 //              CharWindow * charWnd;
70 #if 0
71         private:
72         protected:
73         public:
74                 TTEditApp & app;                                                // Reference to the application object
75                 // Subwindows for reference within the program.
76                 TTEditWindow * mainWindow;
77                 wxMenuBar * menuBar;
78
79                 // Constructor and destructor
80                 TTEditFrame(wxFrame * parent, const wxString &title, const wxPoint &pos, const wxSize &size, long style);
81                 ~TTEditFrame(void);
82
83                 void OnCloseWindow(wxCloseEvent &e);
84                 void OnOpen(wxCommandEvent &e);
85                 void OnExit(wxCommandEvent &e);
86                 void OnAbout(wxCommandEvent &e);
87                 void OnCharWindow(wxCommandEvent &e);
88
89         DECLARE_EVENT_TABLE()
90 #endif
91 };
92
93 #endif  // __TTEMAINWINDOW_H__