MainFrame.hh

Go to the documentation of this file.
00001 /*
00002  * Zelda II SRAM Editor
00003  * Copyright (C) 2004-2005,2007-2008 emuWorks
00004  * http://games.technoplaza.net/
00005  *
00006  * This file is part of z2se.
00007  *
00008  * z2se is free software; you can redistribute it and/or modify
00009  * it under the terms of the GNU General Public License as published by
00010  * the Free Software Foundation; either version 2 of the License, or
00011  * (at your option) any later version.
00012  *
00013  * z2se is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016  * GNU General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU General Public License
00019  * along with z2se; if not, write to the Free Software
00020  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00021  */
00022 
00023 // $Id: MainFrame.hh,v 1.13 2008/12/17 06:24:27 jdratlif Exp $
00024 
00025 #ifndef Z2SE_MAINFRAME_HH_
00026 #define Z2SE_MAINFRAME_HH_
00027 
00028 namespace emuWorks {
00029     class SRAMFile;
00030     
00031     class MainFrame : public wxFrame {
00032         DECLARE_DYNAMIC_CLASS(MainFrame)
00033         DECLARE_EVENT_TABLE()
00034         
00035         friend class FileDropTarget;
00036         
00037     public:
00038         /**
00039          * Constructs a new MainFrame.
00040          */
00041         MainFrame();
00042         
00043         /**
00044          * Creates the frame controls.
00045          */
00046         void CreateControls();
00047         
00048     private:
00049         /**
00050          * Checks if we have an opem SRAM file.
00051          */
00052         bool isOpen() const { return open; }
00053         
00054         /**
00055          * Sets whether we have an open SRAM file or not.
00056          *
00057          * @param open true if open; false otherwise.
00058          */
00059         void setOpen(bool open);
00060         
00061         /**
00062          * Closes the current SRAM file.
00063          *
00064          * @return true if closed; false otherwise.
00065          */
00066         bool close();
00067         
00068         /**
00069          * Loads game data into the controls.
00070          *
00071          * @param game Which game to load.
00072          */
00073         void loadGameData(int game);
00074         
00075         /**
00076          * Loads an SRAM file for editing.
00077          *
00078          * @param filename The file to load.
00079          */
00080         void load(wxString &filename);
00081         
00082         /**
00083          * Callback triggered when open is selected from the file menu.
00084          *
00085          * @param event The associated command event.
00086          */
00087         void fileOpen(wxCommandEvent &event);
00088         
00089         /**
00090          * Callback triggered when close is selected from the file menu.
00091          *
00092          * @param event The associated command event.
00093          */
00094         void fileClose(wxCommandEvent &event);
00095         
00096         /**
00097          * Callback triggered when save is selected from the file menu.
00098          *
00099          * @param event The associated command event.
00100          */
00101         void fileSave(wxCommandEvent &event);
00102         
00103         /**
00104          * Callback triggered when save as is selected from the file menu.
00105          *
00106          * @param event The associated command event.
00107          */
00108         void fileSaveAs(wxCommandEvent &event);
00109         
00110         /**
00111          * Callback triggered when exit is selected from the file menu.
00112          *
00113          * @param event The associated command event.
00114          */
00115         void fileExit(wxCommandEvent &event);
00116         
00117         /**
00118          * Callback triggered when the window is being closed.
00119          *
00120          * @param event The associated command event.
00121          */
00122         void windowClosing(wxCloseEvent &event);
00123         
00124         /**
00125          * Callback triggered when the current game is changed.
00126          *
00127          * @param event The associated command event.
00128          */
00129         void gameChange(wxCommandEvent &event);
00130         
00131         /**
00132          * Callback triggered when something on the have menu is selected.
00133          *
00134          * @param event The associated command event.
00135          */
00136         void multiChange(wxCommandEvent &event);
00137         
00138         /**
00139          * Callback triggered when about is selected from the help menu.
00140          *
00141          * @param event The associated command event.
00142          */
00143         void helpAbout(wxCommandEvent &event);
00144         
00145         /**
00146          * Callback triggered when the name is changed.
00147          *
00148          * @param event The associated command event.
00149          */
00150         void nameChange(wxCommandEvent &event);
00151         
00152         /**
00153          * Callback triggered when the play count is changed.
00154          *
00155          * @param event The associated scroll event.
00156          */
00157         void playCountChange(wxScrollEvent &event);
00158         
00159         /**
00160          * Callback triggered when the triforce is changed.
00161          *
00162          * @param event The associated command event.
00163          */
00164         void triforceChange(wxCommandEvent &event);
00165         
00166         /**
00167          * Callback triggered when an experience level is changed.
00168          *
00169          * @param event The associated scroll event.
00170          */
00171         void levelChange(wxScrollEvent &event);
00172         
00173         /**
00174          * Callback triggered when a container value is changed.
00175          *
00176          * @param event The associated scroll event.
00177          */
00178         void containerChange(wxScrollEvent &event);
00179         
00180         /**
00181          * Callback triggered when a technique is changed.
00182          *
00183          * @param event The associated command event.
00184          */
00185         void techniqueChange(wxCommandEvent &event);
00186         
00187         /**
00188          * Callback triggered when a spell is changed.
00189          *
00190          * @param event The associated command event.
00191          */
00192         void spellChange(wxCommandEvent &event);
00193         
00194         /**
00195          * Callback triggered when an item is changed.
00196          *
00197          * @param event The associated command event.
00198          */
00199         void itemChange(wxCommandEvent &event);
00200         
00201         /**
00202          * Callback triggered when a palace seal is changed.
00203          *
00204          * @param event The associated command event.
00205          */
00206         void sealChange(wxCommandEvent &event);
00207         
00208         /**
00209          * Callback triggered when the keys are changed.
00210          *
00211          * @param event The associated scroll event.
00212          */
00213         void keyChange(wxScrollEvent &event);
00214         
00215         bool open;
00216         
00217         SRAMFile *sram;
00218         
00219         wxMenuItem *fileCloseItem;
00220         wxMenuItem *fileSaveItem;
00221         wxMenuItem *fileSaveAsItem;
00222         wxMenuItem *gameItems[3];
00223         
00224         wxPanel *panel;
00225 
00226         wxTextCtrl *nameText;
00227         wxSlider *playCountSlider;
00228         wxCheckBox *triforceCheck;
00229         
00230         wxSlider *swordLevelSlider;
00231         wxSlider *magicLevelSlider;
00232         wxSlider *lifeLevelSlider;
00233         
00234         wxSlider *magicContainerSlider;
00235         wxSlider *lifeContainerSlider;
00236         
00237         wxCheckBox *downwardThrustCheck;
00238         wxCheckBox *upwardThrustCheck;
00239         
00240         wxCheckBox *shieldCheck;
00241         wxCheckBox *jumpCheck;
00242         wxCheckBox *lifeCheck;
00243         wxCheckBox *fairyCheck;
00244         wxCheckBox *fireCheck;
00245         wxCheckBox *reflectCheck;
00246         wxCheckBox *spellCheck;
00247         wxCheckBox *thunderCheck;
00248         
00249         wxCheckBox *candleCheck;
00250         wxCheckBox *gloveCheck;
00251         wxCheckBox *raftCheck;
00252         wxCheckBox *bootsCheck;
00253         wxCheckBox *crossCheck;
00254         wxCheckBox *fluteCheck;
00255         wxCheckBox *magicKeyCheck;
00256         wxCheckBox *hammerCheck;
00257         
00258         wxCheckBox *palaceCheck[6];
00259         wxSlider *keySlider;
00260     };
00261 }
00262 
00263 #endif
00264 

Generated on Mon Dec 29 01:21:33 2008 for Zelda II SRAM Editor by  doxygen 1.5.4