Add wxDataViewValueAdjuster
Add wxDataViewRenderer:: SetValueAdjuster() and a wxDataViewValueAdjuster class. This can be used to customize rendering of values depending on whether they are highlighted (selection) or not, without having to implement an entire new custom renderer.
This commit is contained in:
committed by
Václav Slavík
parent
13862ad8e6
commit
ff1dba498e
@@ -64,6 +64,8 @@ public:
|
||||
// different from the editor control widget for the custom renderers
|
||||
virtual GtkWidget* GtkGetEditorWidget() const;
|
||||
|
||||
void GtkSetCurrentItem(const wxDataViewItem& item) { m_itemBeingRendered = item; }
|
||||
|
||||
private:
|
||||
// Change the mode at GTK level without touching m_mode, this is useful for
|
||||
// temporarily making the renderer insensitive but does mean that GetMode()
|
||||
@@ -74,6 +76,8 @@ protected:
|
||||
virtual void SetAttr(const wxDataViewItemAttr& attr) wxOVERRIDE;
|
||||
virtual void SetEnabled(bool enabled) wxOVERRIDE;
|
||||
|
||||
virtual bool IsHighlighted() const wxOVERRIDE;
|
||||
|
||||
virtual void GtkOnCellChanged(const wxVariant& value,
|
||||
const wxDataViewItem& item,
|
||||
unsigned col);
|
||||
@@ -93,6 +97,9 @@ protected:
|
||||
// doing this
|
||||
bool m_usingDefaultAttrs;
|
||||
|
||||
// the item currently being rendered
|
||||
wxDataViewItem m_itemBeingRendered;
|
||||
|
||||
protected:
|
||||
wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewRenderer);
|
||||
};
|
||||
|
Reference in New Issue
Block a user