]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/gtk/dataview.h
Added wxDataViewProgressCell with native code
[wxWidgets.git] / include / wx / gtk / dataview.h
index e1e1fab2cc6a1d565570bf67a1701cbfce68e305..1dd168ddb71db62936b2c4d65692c885d94af807 100644 (file)
@@ -58,6 +58,74 @@ protected:
     DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewTextCell)
 };
     
+// --------------------------------------------------------- 
+// wxDataViewToggleCell
+// --------------------------------------------------------- 
+
+class wxDataViewToggleCell: public wxDataViewCell
+{
+public:
+    wxDataViewToggleCell( const wxString &varianttype = wxT("bool"), 
+                        wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT );
+
+    bool SetValue( const wxVariant &value );
+    bool GetValue( wxVariant &value );
+    
+protected:
+    DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewToggleCell)
+};
+    
+// --------------------------------------------------------- 
+// wxDataViewCustomCell
+// --------------------------------------------------------- 
+
+class wxDataViewCustomCell: public wxDataViewCell
+{
+public:
+    wxDataViewCustomCell( const wxString &varianttype = wxT("string"), 
+                          wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
+                          bool no_init = false );
+    ~wxDataViewCustomCell();
+    bool Init();
+    
+    virtual bool Render( wxRect cell, wxDC *dc, int state ) = 0;
+    virtual wxSize GetSize() = 0;
+    
+    // Create DC on request
+    virtual wxDC *GetDC();
+    
+private:
+    wxDC        *m_dc;
+    
+protected:
+    DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewCustomCell)
+};
+    
+// --------------------------------------------------------- 
+// wxDataViewProgressCell
+// --------------------------------------------------------- 
+
+class wxDataViewProgressCell: public wxDataViewCustomCell
+{
+public:
+    wxDataViewProgressCell( const wxString &label = wxEmptyString, 
+                            const wxString &varianttype = wxT("long"), 
+                            wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT );
+    ~wxDataViewProgressCell();
+    
+    bool SetValue( const wxVariant &value );
+    
+    virtual bool Render( wxRect cell, wxDC *dc, int state );
+    virtual wxSize GetSize();
+    
+private:
+    wxString    m_label;
+    int         m_value;
+    
+protected:
+    DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewProgressCell)
+};
+    
 // --------------------------------------------------------- 
 // wxDataViewColumn
 // ---------------------------------------------------------