Stimfit  0.13.15
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines
table.h
Go to the documentation of this file.
00001 // This program is free software; you can redistribute it and/or
00002 // modify it under the terms of the GNU General Public License
00003 // as published by the Free Software Foundation; either version 2
00004 // of the License, or (at your option) any later version.
00005 
00006 // This program is distributed in the hope that it will be useful,
00007 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00008 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00009 // GNU General Public License for more details.
00010 
00011 // You should have received a copy of the GNU General Public License
00012 // along with this program; if not, write to the Free Software
00013 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00014 
00021 #ifndef _TABLE_H
00022 #define _TABLE_H
00023 
00024 #include "../stf.h"
00025 
00030 
00031 class wxStfTable : public wxGridTableBase {
00032 public:
00034 
00036     wxStfTable(const stf::Table& table_) : table(table_) {}
00037 
00039 
00041     virtual int GetNumberRows() {return (int)table.nRows()+1;}
00042     
00044 
00046     virtual int GetNumberCols() {return (int)table.nCols()+1;}
00047     
00049 
00053     virtual bool IsEmptyCell(int row,int col);
00054 
00056 
00060     virtual wxString GetValue( int row, int col );
00061 
00063 
00067     virtual void SetValue( int row, int col, const wxString& value );
00068 
00070 
00073     wxString GetSelection(const wxGridCellCoordsArray& selection);
00074     
00075 private:
00076     stf::Table table;
00077 };
00078 
00081 #endif
00082 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines