source: AE/Installer/trunk/source/main_window.h@ 813

Last change on this file since 813 was 503, checked in by gumby, 15 years ago

Added button to change the current directory
Fixed about window by adding a ->ShowModal (how did it get deleted?)
Fixed refresh button
Cleaned up replace_installer.bat (i think...)

  • Property svn:executable set to *
File size: 6.4 KB
RevLine 
[487]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\***************************************************************************/
[325]8
9
10#ifndef _MAINWINDOW_H_
11#define _MAINWINDOW_H_
12
13/*!
14 * Includes
15 */
[487]16#pragma mark INCLUDES
[325]17////@begin includes
[487]18#include "wx/bmpbuttn.h"
19#include "wx/checkbox.h"
20#include "wx/checklst.h"
[325]21#include "wx/frame.h"
[487]22#include "wx/gauge.h"
23#include "wx/generic/panelg.h"
24#include "wx/radiobut.h"
[325]25#include "wx/splitter.h"
26#include "wx/statline.h"
27#include "wx/statusbr.h"
[487]28#include "wx/textctrl.h"
29#include <vector>
30using namespace std;
[325]31////@end includes
32
33/*!
34 * Forward declarations
35 */
36
37////@begin forward declarations
38class wxSplitterWindow;
39class wxStatusBar;
40////@end forward declarations
41
42/*!
43 * Control identifiers
44 */
[487]45#pragma mark DEFINES
[325]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
[385]63#define Seperated_RadioButton 10015
[325]64#define Complete_RadioButton 10016
65#define ReGlobalize_Button 10018
66#define wxID_LOAD 10006
67#define wxID_OPTIONS 10017
[503]68#define Dir_Button 10100
[328]69#define SYMBOL_MAINWINDOW_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxMINIMIZE_BOX|wxMAXIMIZE_BOX|wxCLOSE_BOX|wxSIMPLE_BORDER
[325]70#define SYMBOL_MAINWINDOW_TITLE _("Installer")
71#define SYMBOL_MAINWINDOW_IDNAME ID_MAINWINDOW
[385]72#define SYMBOL_MAINWINDOW_SIZE wxSize(540, 500)
[325]73#define SYMBOL_MAINWINDOW_POSITION wxDefaultPosition
74////@end control identifiers
75
76/*!
77 * MainWindow class declaration
78 */
79
[487]80#pragma mark CLASS DECLARATIONS
[325]81class MainWindow: public wxFrame
82{
83 DECLARE_CLASS( MainWindow )
84 DECLARE_EVENT_TABLE()
85
86public:
87 /// Constructors
88 MainWindow();
[487]89 MainWindow( wxWindow* parent, wxWindowID id = SYMBOL_MAINWINDOW_IDNAME, const wxString& caption = SYMBOL_MAINWINDOW_TITLE,
90 const wxPoint& pos = SYMBOL_MAINWINDOW_POSITION, const wxSize& size = SYMBOL_MAINWINDOW_SIZE, long style = SYMBOL_MAINWINDOW_STYLE );
[325]91
[487]92 bool Create( wxWindow* parent, wxWindowID id = SYMBOL_MAINWINDOW_IDNAME, const wxString& caption = SYMBOL_MAINWINDOW_TITLE,
93 const wxPoint& pos = SYMBOL_MAINWINDOW_POSITION, const wxSize& size = SYMBOL_MAINWINDOW_SIZE, long style = SYMBOL_MAINWINDOW_STYLE );
[325]94
95 /// Destructor
96 ~MainWindow();
97
98 /// Initialises member variables
99 void Init();
100
101 /// Creates the controls and sizers
102 void CreateControls();
103
104////@begin MainWindow event handler declarations
105
106 /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for SelectAll_Checkbox
107 void OnSelectAllCheckboxClick( wxCommandEvent& event );
108
109 /// wxEVT_COMMAND_BUTTON_CLICKED event handler for Refresh_Button
110 void OnRefreshButtonClick( wxCommandEvent& event );
111
112 /// wxEVT_COMMAND_LISTBOX_SELECTED event handler for Mods_CheckboxList1
113 void OnModsCheckboxList1Selected( wxCommandEvent& event );
114
115 /// wxEVT_COMMAND_CHECKLISTBOX_TOGGLED event handler for Mods_CheckboxList1
116 void OnModsCheckboxList1Toggled( wxCommandEvent& event );
117
118 /// wxEVT_CREATE event handler for Mods_CheckboxList1
119 void ModList_OnCreate( wxWindowCreateEvent& event );
120
121 /// wxEVT_UPDATE_UI event handler for ID_STATUSBAR
122 void OnStatusbarUpdate( wxUpdateUIEvent& event );
123
124 /// wxEVT_COMMAND_BUTTON_CLICKED event handler for Install_Button
125 void OnInstallButtonClick( wxCommandEvent& event );
126
127 /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for Sep_RadioButton
128 void OnSepRadioButtonSelected( wxCommandEvent& event );
129
130 /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for NoSep_RadioButton
131 void OnNoSepRadioButtonSelected( wxCommandEvent& event );
132
[385]133 /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for Seperated_RadioButton
134 void OnSeperatedRadioButtonSelected( wxCommandEvent& event );
[325]135
136 /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for Complete_RadioButton
137 void OnCompleteRadioButtonSelected( wxCommandEvent& event );
138
139 /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ReGlobalize_Button
140 void OnReGlobalizeButtonClick( wxCommandEvent& event );
141
142 /// wxEVT_COMMAND_MENU_SELECTED event handler for wxID_LOAD
143 void OnLoadClick( wxCommandEvent& event );
144
145 /// wxEVT_COMMAND_MENU_SELECTED event handler for wxID_SAVE
146 void OnSaveClick( wxCommandEvent& event );
147
148 /// wxEVT_COMMAND_MENU_SELECTED event handler for wxID_EXIT
149 void OnExitClick( wxCommandEvent& event );
150
151 /// wxEVT_COMMAND_MENU_SELECTED event handler for wxID_OPTIONS
152 void OnOptionsClick( wxCommandEvent& event );
153
154 /// wxEVT_COMMAND_MENU_SELECTED event handler for wxID_ABOUT
155 void OnAboutClick( wxCommandEvent& event );
156
[503]157 /// change currently directory
158 void OnDirButtonClick( wxCommandEvent& event );
[325]159////@end MainWindow event handler declarations
160
161////@begin MainWindow member function declarations
162
163 /// Retrieves bitmap resources
164 wxBitmap GetBitmapResource( const wxString& name );
165
166 /// Retrieves icon resources
167 wxIcon GetIconResource( const wxString& name );
168////@end MainWindow member function declarations
169
170 /// Should we show tooltips?
171 static bool ShowToolTips();
172
173////@begin MainWindow member variables
174 wxSplitterWindow* MainSplitter;
175 wxCheckBox* SelectAll;
176 wxBitmapButton* RefreshButton;
177 wxCheckListBox* Mods_CheckboxList;
178 wxTextCtrl* titleText;
179 wxTextCtrl* creatorText;
180 wxTextCtrl* descriptionText;
181 wxStatusBar* StatusArea;
182 wxGauge* ProgressBar;
183 wxButton* InstallButton;
184 wxPanel* OptionsPanel;
185 wxRadioButton* SepRadio;
186 wxRadioButton* NoSepRadio;
[385]187 wxRadioButton* SeperatedRadio;
[325]188 wxRadioButton* CompleteRadio;
189 wxButton* ReglobalizeButton;
[503]190 wxButton* ChangeDirectoryButton;
[325]191////@end MainWindow member variables
192
193 void refreshMods( vector<string> );
194};
195
196#endif
197 // _MAINWINDOW_H_
Note: See TracBrowser for help on using the repository browser.