]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/generic/dvrenderers.h
Implement basic support for virtual file systems for the ie backend. Registering...
[wxWidgets.git] / include / wx / generic / dvrenderers.h
index 61592258ca6a9f839e769339577685a3a453b0f5..fe71dc45f6b71843504cf2cf29d226b3542fecf4 100644 (file)
@@ -3,7 +3,7 @@
 // Purpose:     All generic wxDataViewCtrl renderer classes
 // Author:      Robert Roebling, Vadim Zeitlin
 // Created:     2009-11-07 (extracted from wx/generic/dataview.h)
 // Purpose:     All generic wxDataViewCtrl renderer classes
 // Author:      Robert Roebling, Vadim Zeitlin
 // Created:     2009-11-07 (extracted from wx/generic/dataview.h)
-// RCS-ID:      $Id: wxhead.h,v 1.11 2009-06-29 10:23:04 zeitlin Exp $
+// RCS-ID:      $Id$
 // Copyright:   (c) 2006 Robert Roebling
 //              (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org>
 // Licence:     wxWindows licence
 // Copyright:   (c) 2006 Robert Roebling
 //              (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org>
 // Licence:     wxWindows licence
@@ -23,7 +23,25 @@ public:
                               wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
                               int align = wxDVR_DEFAULT_ALIGNMENT );
 
                               wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
                               int align = wxDVR_DEFAULT_ALIGNMENT );
 
-    virtual wxDataViewCustomRenderer *WXGetAsCustom() { return this; }
+
+    // see the explanation of the following WXOnXXX() methods in wx/generic/dvrenderer.h
+
+    virtual bool WXOnActivate(const wxRect& cell,
+                              wxDataViewModel *model,
+                              const wxDataViewItem& item,
+                              unsigned int col)
+    {
+        return Activate(cell, model, item, col);
+    }
+
+    virtual bool WXOnLeftClick(const wxPoint& cursor,
+                               const wxRect& cell,
+                               wxDataViewModel *model,
+                               const wxDataViewItem &item,
+                               unsigned int col)
+    {
+        return LeftClick(cursor, cell, model, item, col);
+    }
 
 private:
     DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewCustomRenderer)
 
 private:
     DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewCustomRenderer)
@@ -44,23 +62,14 @@ public:
     bool SetValue( const wxVariant &value );
     bool GetValue( wxVariant &value ) const;
 
     bool SetValue( const wxVariant &value );
     bool GetValue( wxVariant &value ) const;
 
-    virtual bool RenderWithAttr(wxDC& dc,
-                                const wxRect& rect,
-                                int align,
-                                const wxDataViewItemAttr *attr,
-                                int state);
-    virtual bool Render(wxRect cell, wxDC *dc, int state)
-    {
-        return DummyRender(cell, dc, state);
-    }
-
-    wxSize GetSize() const;
+    virtual bool Render(wxRect cell, wxDC *dc, int state);
+    virtual wxSize GetSize() const;
 
     // in-place editing
     virtual bool HasEditorCtrl() const;
 
     // in-place editing
     virtual bool HasEditorCtrl() const;
-    virtual wxControl* CreateEditorCtrl( wxWindow *parent, wxRect labelRect,
-                                         const wxVariant &value );
-    virtual bool GetValueFromEditorCtrl( wxControl* editor, wxVariant &value );
+    virtual wxWindow* CreateEditorCtrl( wxWindow *parent, wxRect labelRect,
+                                        const wxVariant &value );
+    virtual bool GetValueFromEditorCtrl( wxWindow* editor, wxVariant &value );
 
 protected:
     wxString   m_text;
 
 protected:
     wxString   m_text;
@@ -109,10 +118,14 @@ public:
     bool GetValue( wxVariant &value ) const;
 
     bool Render( wxRect cell, wxDC *dc, int state );
     bool GetValue( wxVariant &value ) const;
 
     bool Render( wxRect cell, wxDC *dc, int state );
-    bool Activate( wxRect cell, wxDataViewModel *model, const wxDataViewItem & item,
-                            unsigned int col );
     wxSize GetSize() const;
 
     wxSize GetSize() const;
 
+    // Implementation only, don't use nor override
+    virtual bool WXOnLeftClick(const wxPoint& cursor,
+                               const wxRect& cell,
+                               wxDataViewModel *model,
+                               const wxDataViewItem& item,
+                               unsigned int col);
 private:
     bool    m_toggle;
 
 private:
     bool    m_toggle;
 
@@ -135,15 +148,7 @@ public:
     bool SetValue( const wxVariant &value );
     bool GetValue( wxVariant& value ) const;
 
     bool SetValue( const wxVariant &value );
     bool GetValue( wxVariant& value ) const;
 
-    virtual bool RenderWithAttr(wxDC& dc,
-                                const wxRect& rect,
-                                int align,
-                                const wxDataViewItemAttr *attr,
-                                int state);
-    virtual bool Render(wxRect cell, wxDC *dc, int state)
-    {
-        return DummyRender(cell, dc, state);
-    }
+    virtual bool Render(wxRect cell, wxDC *dc, int state);
     virtual wxSize GetSize() const;
 
 private:
     virtual wxSize GetSize() const;
 
 private:
@@ -168,21 +173,13 @@ public:
     bool SetValue( const wxVariant &value );
     bool GetValue( wxVariant &value ) const;
 
     bool SetValue( const wxVariant &value );
     bool GetValue( wxVariant &value ) const;
 
-    virtual bool RenderWithAttr(wxDC& dc,
-                                const wxRect& rect,
-                                int align,
-                                const wxDataViewItemAttr *attr,
-                                int state);
-    virtual bool Render(wxRect cell, wxDC *dc, int state)
-    {
-        return DummyRender(cell, dc, state);
-    }
+    virtual bool Render(wxRect cell, wxDC *dc, int state);
     virtual wxSize GetSize() const;
 
     virtual bool HasEditorCtrl() const { return true; }
     virtual wxSize GetSize() const;
 
     virtual bool HasEditorCtrl() const { return true; }
-    virtual wxControl* CreateEditorCtrl( wxWindow *parent, wxRect labelRect,
-                                         const wxVariant &value );
-    virtual bool GetValueFromEditorCtrl( wxControl* editor, wxVariant &value );
+    virtual wxWindow* CreateEditorCtrl( wxWindow *parent, wxRect labelRect,
+                                        const wxVariant &value );
+    virtual bool GetValueFromEditorCtrl( wxWindow* editor, wxVariant &value );
 
 private:
     wxDataViewIconText   m_value;
 
 private:
     wxDataViewIconText   m_value;
@@ -207,10 +204,12 @@ public:
 
     virtual bool Render( wxRect cell, wxDC *dc, int state );
     virtual wxSize GetSize() const;
 
     virtual bool Render( wxRect cell, wxDC *dc, int state );
     virtual wxSize GetSize() const;
-    virtual bool Activate( wxRect cell,
-                           wxDataViewModel *model,
-                           const wxDataViewItem& item,
-                           unsigned int col );
+
+    // Implementation only, don't use nor override
+    virtual bool WXOnActivate(const wxRect& cell,
+                              wxDataViewModel *model,
+                              const wxDataViewItem& item,
+                              unsigned int col);
 
 private:
     wxDateTime    m_date;
 
 private:
     wxDateTime    m_date;