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