/home/enzo/treballs/fib/pfc/nanocomp/src/ruleView.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 
00028  #ifndef RULEVIEW_HPP_
00029 #define RULEVIEW_HPP_
00030 
00031 #include <wx/wx.h>
00032 #include "layoutCanvas.hpp"
00033 #include "ruleManager.hpp"
00034 
00035 class RuleManager;
00036 
00037 class RuleView : public wxPanel
00038 {
00039 public:
00040         RuleView(wxWindow* parent, wxWindowID id, RuleManager *controller);
00041         virtual ~RuleView();
00042     void updateGrids(Grid initial, Grid final, bool changed);
00043     void updateList(wxArrayString strings);
00044     void selectRule(unsigned int rule);
00045     void errorMsg(wxString message);
00046     bool msgYesNo(wxString message);
00047     void setListMessage(int id, wxString message);
00048     void resetListItem(int id);
00049     
00050  private:
00051     DECLARE_EVENT_TABLE()
00052     void initControls();
00053     void initSizers();
00054     void OnClick(LayoutCanvasEvent &event);
00055     void OnSelection(wxCommandEvent &event);
00056     void OnNewRule(wxCommandEvent& event);
00057     void OnRemove(wxCommandEvent& event);
00058     void OnCopy(wxCommandEvent& event);
00059     void OnSave(wxCommandEvent& event);
00060     void OnSaveAs(wxCommandEvent& event);
00061     void OnOpen(wxCommandEvent& event);
00062     void OnCheck(wxCommandEvent& event);
00063     
00065     RuleManager *controller;
00066     
00067     //GUI Controls
00068     //Labels
00069     wxStaticText *labelTitle;
00070     wxStaticText *labelRule;
00071     wxStaticText *labelInitialLayout;
00072     wxStaticText *labelFinalLayout;
00073 
00074     //Buttons
00075     wxBitmapButton *buttonNew;
00076     wxBitmapButton *buttonSave;
00077     wxBitmapButton *buttonSaveAs;
00078     wxBitmapButton *buttonRemove;
00079     wxBitmapButton *buttonOpen;
00080     wxBitmapButton *buttonCopy;
00081     wxButton *buttonCheck;
00082     
00083     //Other controls
00084     wxListBox *listRules;
00085     LayoutCanvas *canvasInitial;
00086     LayoutCanvas *canvasFinal;
00087 };
00088 
00089 #endif /*RULEVIEW_HPP_*/

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