#ifndef _WX_GTK_DVRENDERER_H_
#define _WX_GTK_DVRENDERER_H_
+typedef struct _GtkCellRendererText GtkCellRendererText;
typedef struct _GtkTreeViewColumn GtkTreeViewColumn;
// ----------------------------------------------------------------------------
// for details
virtual bool GtkSupportsAttrs() const { return false; }
+ // if GtkSupportsAttrs() returns true, this function will be called to
+ // effectively set the attribute to use for rendering the next item
+ //
+ // it should return true if the attribute had any non-default properties
+ virtual bool GtkSetAttr(const wxDataViewItemAttr& WXUNUSED(attr))
+ { return false; }
+
+
// these functions are only called if GtkSupportsAttrs() returns true and
// are used to remember whether the renderer currently uses the default
// attributes or if we changed (and not reset them)
bool GtkIsUsingDefaultAttrs() const { return m_usingDefaultAttrs; }
void GtkSetUsingDefaultAttrs(bool def) { m_usingDefaultAttrs = def; }
+ // return the text renderer used by this renderer for setting text cell
+ // specific attributes: can return NULL if this renderer doesn't render any
+ // text
+ virtual GtkCellRendererText *GtkGetTextRenderer() const { return NULL; }
+
protected:
virtual void GtkOnCellChanged(const wxVariant& value,
const wxDataViewItem& item,