]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/dataview/mymodels.h
Update wxHtmlWindow documentation to refer to wxWebView.
[wxWidgets.git] / samples / dataview / mymodels.h
index 6d110d645e9779ff20f4326430647611b1100828..996bd3ec6e5936b2a75ade1259182c5bf4ce02a3 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     06/01/06
 // RCS-ID:      $Id$
 // Copyright:   (c) Robert Roebling
 // Created:     06/01/06
 // RCS-ID:      $Id$
 // Copyright:   (c) Robert Roebling
-// Licence:     wxWindows license
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 
 /////////////////////////////////////////////////////////////////////////////
 
 
@@ -163,6 +163,9 @@ public:
     virtual bool SetValue( const wxVariant &variant,
                            const wxDataViewItem &item, unsigned int col );
 
     virtual bool SetValue( const wxVariant &variant,
                            const wxDataViewItem &item, unsigned int col );
 
+    virtual bool IsEnabled( const wxDataViewItem &item,
+                            unsigned int col ) const;
+
     virtual wxDataViewItem GetParent( const wxDataViewItem &item ) const;
     virtual bool IsContainer( const wxDataViewItem &item ) const;
     virtual unsigned int GetChildren( const wxDataViewItem &parent,
     virtual wxDataViewItem GetParent( const wxDataViewItem &item ) const;
     virtual bool IsContainer( const wxDataViewItem &item ) const;
     virtual unsigned int GetChildren( const wxDataViewItem &parent,
@@ -193,6 +196,7 @@ public:
         Col_EditableText,
         Col_IconText,
         Col_TextWithAttr,
         Col_EditableText,
         Col_IconText,
         Col_TextWithAttr,
+        Col_Custom,
         Col_Max
     };
 
         Col_Max
     };
 
@@ -221,11 +225,6 @@ public:
         return wxT("string");
     }
 
         return wxT("string");
     }
 
-    virtual unsigned int GetRowCount()
-    {
-        return m_textColValues.GetCount();
-    }
-
     virtual void GetValueByRow( wxVariant &variant,
                                 unsigned int row, unsigned int col ) const;
     virtual bool GetAttrByRow( unsigned int row, unsigned int col,
     virtual void GetValueByRow( wxVariant &variant,
                                 unsigned int row, unsigned int col ) const;
     virtual bool GetAttrByRow( unsigned int row, unsigned int col,
@@ -237,6 +236,14 @@ private:
     wxArrayString    m_textColValues;
     wxArrayString    m_iconColValues;
     wxIcon           m_icon[2];
     wxArrayString    m_textColValues;
     wxArrayString    m_iconColValues;
     wxIcon           m_icon[2];
-    int              m_virtualItems;
 };
 
 };
 
+// ----------------------------------------------------------------------------
+// MyListStoreDerivedModel
+// ----------------------------------------------------------------------------
+
+class MyListStoreDerivedModel : public wxDataViewListStore
+{
+public:
+    virtual bool IsEnabledByRow(unsigned int row, unsigned int col) const;
+};