Main Page | Namespace List | Class List | File List | Namespace Members | Class Members | File Members

source/view/MainFrame.hh

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

Generated on Fri Dec 10 11:33:56 2004 for Zelda II SRAM Editor by  doxygen 1.3.9.1