Implement text ellipsizing for wxDataViewCustomRenderer in wxGTK.

Add another virtual function (GtkGetTextRenderer()) to the base class which
allows us to reuse the same code setting the "ellipsize" property that we
already used for wxDataViewTextRenderer for wxDataViewCustomRenderer as well.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62608 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-11-11 01:50:06 +00:00
parent 061a5c21db
commit 17cbc2446b
3 changed files with 43 additions and 9 deletions

View File

@@ -13,7 +13,6 @@
#define _WX_GTK_DVRENDERERS_H_
typedef struct _GdkRectangle GdkRectangle;
typedef struct _GtkCellRendererText GtkCellRendererText;
// ---------------------------------------------------------
// wxDataViewTextRenderer
@@ -47,6 +46,8 @@ public:
virtual bool GtkSupportsAttrs() const { return true; }
virtual bool GtkSetAttr(const wxDataViewItemAttr& attr);
virtual GtkCellRendererText *GtkGetTextRenderer() const;
protected:
// implementation of Set/GetValue()
bool SetTextValue(const wxString& str);
@@ -140,6 +141,8 @@ public:
return !attr.IsDefault();
}
virtual GtkCellRendererText *GtkGetTextRenderer() const;
protected:
bool Init(wxDataViewCellMode mode, int align);