/home/enzo/treballs/fib/pfc/nanocomp/src/simulationView.hpp

Go to the documentation of this file.
00001 /*
00002  *                                                                         *
00003  *   This program is free software; you can redistribute it and/or modify  *
00004  *   it under the terms of the GNU General Public License as published by  *
00005  *   the Free Software Foundation; either version 2 of the License, or     *
00006  *   (at your option) any later version.                                   *
00007  *                                                                         *
00008  *   This program is distributed in the hope that it will be useful,       *
00009  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00010  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00011  *   GNU General Public License for more details.                          *
00012  *                                                                         *
00013  *   You should have received a copy of the GNU General Public License     *
00014  *   along with this program; if not, write to the                         *
00015  *   Free Software Foundation, Inc.,                                       *
00016  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00017                                                                           */
00018 
00031 #ifndef SIMULATIONVIEW_HPP_
00032 #define SIMULATIONVIEW_HPP_
00033 
00034 #include <wx/wx.h>
00035 #include "simulation.hpp"
00036 #include "grid.hpp"
00037 #include "layoutCanvas.hpp"
00038 
00039 class Simulation;
00040 
00041 class SimulationView : public wxFrame
00042 {
00043 public:
00044         SimulationView(wxWindow* parent, wxWindowID id);
00045         virtual ~SimulationView();
00046     void setGrid(Grid newGrid,bool changed);
00047     void setInfo(wxString info);
00048     void setBlankLine();
00049     void setFinished(bool finished);
00050     void setSimulation(Simulation *simulation);
00051     void setNextRow(bool enable);
00052     void setResults(bool enable);
00053     void enableSimulation(bool enabled);
00054     void stopSimulation();
00055     
00056 private:
00057     DECLARE_EVENT_TABLE()
00058     void initControls();
00059     void initSizers();
00060     void OnPlayPause(wxCommandEvent &event);
00061     void OnStep(wxCommandEvent &event);
00062     void OnNext(wxCommandEvent &event);
00063     void OnResults(wxCommandEvent &event);
00064     void OnTimer(wxTimerEvent& event);
00065     void OnSlider(wxCommandEvent &event);
00066     void OnForward(wxCommandEvent &event);
00067     wxBitmap *bitmapPlay;
00068     wxBitmap *bitmapPause;
00069     wxBitmap *bitmapStep;
00070     wxBitmap *bitmapForward;
00071     wxBitmapButton *buttonPlayPause;
00072     wxBitmapButton *buttonStep;
00073     wxBitmapButton *buttonForward;
00074     wxButton *buttonNextRow;
00075     wxButton *buttonResults;
00076     wxStaticText *labelTimer;
00077     LayoutCanvas *canvas;
00078     wxTextCtrl *textInfo;
00079     wxSlider *slider;
00081     int timerInterval;
00083     Simulation *simulation;
00085     wxTimer chrono;
00087     bool playing;
00089     bool finished;
00090 };
00091 
00092 #endif /*SIMULATIONVIEW_HPP_*/

Generated on Fri Sep 1 23:55:14 2006 for NanoComp by  doxygen 1.4.6