/home/enzo/treballs/fib/pfc/nanocomp/src/truthTableView.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                                                                           */
00027 #ifndef TRUTHTABLEVIEW_HPP_
00028 #define TRUTHTABLEVIEW_HPP_
00029 
00030 #include <wx/wx.h>
00031 #include "truthTableCanvas.hpp"
00032 #include "truthTableManager.hpp"
00033 
00034 class TruthTableManager;
00035 
00036 class TruthTableView : public wxPanel
00037 {
00038 public:
00039     TruthTableView(wxWindow* parent, wxWindowID id, TruthTableManager *controller);
00040     virtual ~TruthTableView();
00041     void updateTable(TruthTable table);
00042     void OnClick(TruthTableCanvasEvent &event);
00043     void OnNew(wxCommandEvent &event);
00044     void OnSelection(wxCommandEvent &event);
00045     void OnRemove(wxCommandEvent &event);
00046     void updateList(wxArrayString strings);
00047     void selectTable(wxString table);
00048     void errorMsg(wxString message);
00049     void OnSave(wxCommandEvent& event);
00050     void OnSaveAs(wxCommandEvent& event);
00051     void OnOpen(wxCommandEvent& event);
00052     bool msgYesNo(wxString message);
00053     
00054 private:
00055     DECLARE_EVENT_TABLE()
00056     void initControls();
00057     void initSizers();
00058     
00059     //Labels
00060     wxStaticText *labelTitle;
00061     wxStaticText *labelTable;
00062     wxStaticText *labelInfo;
00063     
00064     //Buttons
00065     wxBitmapButton *buttonNew;
00066     wxBitmapButton *buttonOpen;
00067     wxBitmapButton *buttonSave;
00068     wxBitmapButton *buttonSaveAs;
00069     wxBitmapButton *buttonRemove;
00070     
00071     //Other controls
00072     wxListBox *listTables;
00073     TruthTableCanvas *canvas;
00074     TruthTableManager *controller;
00075 };
00076 
00077 #endif /*TRUTHTABLEVIEW_HPP_*/

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