ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/AE/Installer/trunk/source/main_window.h
Revision: 487
Committed: Wed Dec 30 01:51:38 2009 UTC (15 years, 9 months ago) by iritscen
Content type: text/x-chdr
File size: 6379 byte(s)
Log Message:
Adding update feature; moving/neatening some code; adding globals.h

File Contents

# Content
1 /***************************************************************************\
2 | Project: AE Installer |
3 | By: Gumby & Iritscen |
4 | File: Main_Window.h |
5 | Function: Handles GUI. |
6 | Created: 07/05/2009 20:38:25 |
7 \***************************************************************************/
8
9
10 #ifndef _MAINWINDOW_H_
11 #define _MAINWINDOW_H_
12
13 /*!
14 * Includes
15 */
16 #pragma mark INCLUDES
17 ////@begin includes
18 #include "wx/bmpbuttn.h"
19 #include "wx/checkbox.h"
20 #include "wx/checklst.h"
21 #include "wx/frame.h"
22 #include "wx/gauge.h"
23 #include "wx/generic/panelg.h"
24 #include "wx/radiobut.h"
25 #include "wx/splitter.h"
26 #include "wx/statline.h"
27 #include "wx/statusbr.h"
28 #include "wx/textctrl.h"
29 #include <vector>
30 using namespace std;
31 ////@end includes
32
33 /*!
34 * Forward declarations
35 */
36
37 ////@begin forward declarations
38 class wxSplitterWindow;
39 class wxStatusBar;
40 ////@end forward declarations
41
42 /*!
43 * Control identifiers
44 */
45 #pragma mark DEFINES
46 ////@begin control identifiers
47 #define ID_MAINWINDOW 10000
48 #define ID_SPLITTERWINDOW 10001
49 #define ID_PANEL 10011
50 #define SelectAll_Checkbox 10012
51 #define Refresh_Button 10007
52 #define Mods_CheckboxList1 10002
53 #define DescriptionHolder_Panel 10003
54 #define Title_Text 10005
55 #define Author_Text 10004
56 #define Description_Text 10022
57 #define ID_STATUSBAR 10008
58 #define ProgressBar_Gauge 10009
59 #define Install_Button 10010
60 #define ID_PANEL1 10019
61 #define Sep_RadioButton 10013
62 #define NoSep_RadioButton 10014
63 #define Seperated_RadioButton 10015
64 #define Complete_RadioButton 10016
65 #define ReGlobalize_Button 10018
66 #define wxID_LOAD 10006
67 #define wxID_OPTIONS 10017
68 #define SYMBOL_MAINWINDOW_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxMINIMIZE_BOX|wxMAXIMIZE_BOX|wxCLOSE_BOX|wxSIMPLE_BORDER
69 #define SYMBOL_MAINWINDOW_TITLE _("Installer")
70 #define SYMBOL_MAINWINDOW_IDNAME ID_MAINWINDOW
71 #define SYMBOL_MAINWINDOW_SIZE wxSize(540, 500)
72 #define SYMBOL_MAINWINDOW_POSITION wxDefaultPosition
73 ////@end control identifiers
74
75 /*!
76 * MainWindow class declaration
77 */
78
79 #pragma mark CLASS DECLARATIONS
80 class MainWindow: public wxFrame
81 {
82 DECLARE_CLASS( MainWindow )
83 DECLARE_EVENT_TABLE()
84
85 public:
86 /// Constructors
87 MainWindow();
88 MainWindow( wxWindow* parent, wxWindowID id = SYMBOL_MAINWINDOW_IDNAME, const wxString& caption = SYMBOL_MAINWINDOW_TITLE,
89 const wxPoint& pos = SYMBOL_MAINWINDOW_POSITION, const wxSize& size = SYMBOL_MAINWINDOW_SIZE, long style = SYMBOL_MAINWINDOW_STYLE );
90
91 bool Create( wxWindow* parent, wxWindowID id = SYMBOL_MAINWINDOW_IDNAME, const wxString& caption = SYMBOL_MAINWINDOW_TITLE,
92 const wxPoint& pos = SYMBOL_MAINWINDOW_POSITION, const wxSize& size = SYMBOL_MAINWINDOW_SIZE, long style = SYMBOL_MAINWINDOW_STYLE );
93
94 /// Destructor
95 ~MainWindow();
96
97 /// Initialises member variables
98 void Init();
99
100 /// Creates the controls and sizers
101 void CreateControls();
102
103 ////@begin MainWindow event handler declarations
104
105 /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for SelectAll_Checkbox
106 void OnSelectAllCheckboxClick( wxCommandEvent& event );
107
108 /// wxEVT_COMMAND_BUTTON_CLICKED event handler for Refresh_Button
109 void OnRefreshButtonClick( wxCommandEvent& event );
110
111 /// wxEVT_COMMAND_LISTBOX_SELECTED event handler for Mods_CheckboxList1
112 void OnModsCheckboxList1Selected( wxCommandEvent& event );
113
114 /// wxEVT_COMMAND_CHECKLISTBOX_TOGGLED event handler for Mods_CheckboxList1
115 void OnModsCheckboxList1Toggled( wxCommandEvent& event );
116
117 /// wxEVT_CREATE event handler for Mods_CheckboxList1
118 void ModList_OnCreate( wxWindowCreateEvent& event );
119
120 /// wxEVT_UPDATE_UI event handler for ID_STATUSBAR
121 void OnStatusbarUpdate( wxUpdateUIEvent& event );
122
123 /// wxEVT_COMMAND_BUTTON_CLICKED event handler for Install_Button
124 void OnInstallButtonClick( wxCommandEvent& event );
125
126 /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for Sep_RadioButton
127 void OnSepRadioButtonSelected( wxCommandEvent& event );
128
129 /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for NoSep_RadioButton
130 void OnNoSepRadioButtonSelected( wxCommandEvent& event );
131
132 /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for Seperated_RadioButton
133 void OnSeperatedRadioButtonSelected( wxCommandEvent& event );
134
135 /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for Complete_RadioButton
136 void OnCompleteRadioButtonSelected( wxCommandEvent& event );
137
138 /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ReGlobalize_Button
139 void OnReGlobalizeButtonClick( wxCommandEvent& event );
140
141 /// wxEVT_COMMAND_MENU_SELECTED event handler for wxID_LOAD
142 void OnLoadClick( wxCommandEvent& event );
143
144 /// wxEVT_COMMAND_MENU_SELECTED event handler for wxID_SAVE
145 void OnSaveClick( wxCommandEvent& event );
146
147 /// wxEVT_COMMAND_MENU_SELECTED event handler for wxID_EXIT
148 void OnExitClick( wxCommandEvent& event );
149
150 /// wxEVT_COMMAND_MENU_SELECTED event handler for wxID_OPTIONS
151 void OnOptionsClick( wxCommandEvent& event );
152
153 /// wxEVT_COMMAND_MENU_SELECTED event handler for wxID_ABOUT
154 void OnAboutClick( wxCommandEvent& event );
155
156 ////@end MainWindow event handler declarations
157
158 ////@begin MainWindow member function declarations
159
160 /// Retrieves bitmap resources
161 wxBitmap GetBitmapResource( const wxString& name );
162
163 /// Retrieves icon resources
164 wxIcon GetIconResource( const wxString& name );
165 ////@end MainWindow member function declarations
166
167 /// Should we show tooltips?
168 static bool ShowToolTips();
169
170 ////@begin MainWindow member variables
171 wxSplitterWindow* MainSplitter;
172 wxCheckBox* SelectAll;
173 wxBitmapButton* RefreshButton;
174 wxCheckListBox* Mods_CheckboxList;
175 wxTextCtrl* titleText;
176 wxTextCtrl* creatorText;
177 wxTextCtrl* descriptionText;
178 wxStatusBar* StatusArea;
179 wxGauge* ProgressBar;
180 wxButton* InstallButton;
181 wxPanel* OptionsPanel;
182 wxRadioButton* SepRadio;
183 wxRadioButton* NoSepRadio;
184 wxRadioButton* SeperatedRadio;
185 wxRadioButton* CompleteRadio;
186 wxButton* ReglobalizeButton;
187 ////@end MainWindow member variables
188
189 void refreshMods( vector<string> );
190 };
191
192 #endif
193 // _MAINWINDOW_H_

Properties

Name Value
svn:executable *