]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/dvrenderers.h
Declare wxStaticText in wxUniv as being dynamic, not abstract, class.
[wxWidgets.git] / include / wx / dvrenderers.h
index d22157a16ba4f382653bfeaa28ed4dd19f5bc08c..717f73608a4c2e2ab59cf7e7de9e724e310fc47e 100644 (file)
@@ -116,8 +116,14 @@ public:
 
     virtual void SetAttr(const wxDataViewItemAttr& WXUNUSED(attr)) { }
 
+    virtual void SetEnabled(bool WXUNUSED(enabled)) { }
+
     wxString GetVariantType() const             { return m_variantType; }
 
+    // helper that calls SetValue and SetAttr:
+    void PrepareForItem(const wxDataViewModel *model,
+                        const wxDataViewItem& item, unsigned column);
+
     // renderer properties:
     virtual void SetMode( wxDataViewCellMode mode ) = 0;
     virtual wxDataViewCellMode GetMode() const = 0;
@@ -257,6 +263,11 @@ public:
     virtual void SetAttr(const wxDataViewItemAttr& attr) { m_attr = attr; }
     const wxDataViewItemAttr& GetAttr() const { return m_attr; }
 
+    // Store the enabled state of the item so that it can be accessed from
+    // Render() via GetEnabled() if needed.
+    virtual void SetEnabled(bool enabled) { m_enabled = enabled; }
+    bool GetEnabled() const { return m_enabled; }
+
 
     // Implementation only from now on
 
@@ -273,6 +284,7 @@ protected:
 
 private:
     wxDataViewItemAttr m_attr;
+    bool m_enabled;
 
     wxDECLARE_NO_COPY_CLASS(wxDataViewCustomRendererBase);
 };