+class MyGridCellAttrProvider : public wxGridCellAttrProvider
+{
+public:
+ MyGridCellAttrProvider();
+ virtual ~MyGridCellAttrProvider();
+
+ virtual wxGridCellAttr *GetAttr(int row, int col,
+ wxGridCellAttr::wxAttrKind kind) const;
+
+private:
+ wxGridCellAttr *m_attrForOddRows;
+};
+
+// ----------------------------------------------------------------------------
+// another, more realistic, grid example: shows typed columns and more
+// ----------------------------------------------------------------------------
+
+class BugsGridTable : public wxGridTableBase
+{
+public:
+ BugsGridTable();
+
+ virtual int GetNumberRows();
+ virtual int GetNumberCols();
+ virtual bool IsEmptyCell( int row, int col );
+ virtual wxString GetValue( int row, int col );
+ virtual void SetValue( int row, int col, const wxString& value );
+
+ virtual wxString GetColLabelValue( int col );
+
+ virtual wxString GetTypeName( int row, int col );
+ virtual bool CanGetValueAs( int row, int col, const wxString& typeName );
+ virtual bool CanSetValueAs( int row, int col, const wxString& typeName );
+
+ virtual long GetValueAsLong( int row, int col );
+ virtual bool GetValueAsBool( int row, int col );
+
+ virtual void SetValueAsLong( int row, int col, long value );
+ virtual void SetValueAsBool( int row, int col, bool value );
+};
+