]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/generic/dataview.h
Document wxRendererNative::DrawTitleBarBitmap() and use it properly.
[wxWidgets.git] / include / wx / generic / dataview.h
index 66090fa892c8b13c085dd5d8a4729c06f1a069db..a9c57e1c4e6f7a7cfa4f11e70742e5be2c0b9685 100644 (file)
@@ -57,6 +57,11 @@ public:
     virtual void SetAlignment( int align );
     virtual int GetAlignment() const;
 
+    virtual void EnableEllipsize(wxEllipsizeMode mode = wxELLIPSIZE_MIDDLE)
+        { m_ellipsizeMode = mode; }
+    virtual wxEllipsizeMode GetEllipsizeMode() const
+        { return m_ellipsizeMode; }
+
     virtual void SetMode( wxDataViewCellMode mode )
         { m_mode=mode; }
     virtual wxDataViewCellMode GetMode() const
@@ -110,6 +115,8 @@ private:
     int                          m_align;
     wxDataViewCellMode           m_mode;
 
+    wxEllipsizeMode m_ellipsizeMode;
+
     DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewRenderer)
 };
 
@@ -134,7 +141,14 @@ public:
                     int xoffset = 0);
 
     // Overload using standard attributes
-    void RenderText( const wxString &text, int xoffset, wxRect cell, wxDC *dc, int state );
+    void RenderText(const wxString& text,
+                    int xoffset,
+                    wxRect cell,
+                    wxDC *dc,
+                    int state)
+    {
+        RenderText(*dc, cell, wxALIGN_NOT, text, NULL, state, xoffset);
+    }
 
 protected:
     DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewCustomRenderer)
@@ -275,12 +289,19 @@ public:
     wxDataViewIconTextRenderer( const wxString &varianttype = wxT("wxDataViewIconText"),
                                 wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
                                 int align = wxDVR_DEFAULT_ALIGNMENT );
-    virtual ~wxDataViewIconTextRenderer();
 
     bool SetValue( const wxVariant &value );
     bool GetValue( wxVariant &value ) const;
 
-    virtual bool Render( wxRect cell, wxDC *dc, int state );
+    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 wxSize GetSize() const;
 
     virtual bool HasEditorCtrl() const { return true; }