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:
Václav Slavík
2016-11-21 18:07:32 +01:00
committed by Václav Slavík
parent 13862ad8e6
commit ff1dba498e
9 changed files with 152 additions and 6 deletions

View File

@@ -52,6 +52,12 @@ public:
const wxMouseEvent* WXUNUSED(mouseEvent))
{ return false; }
void SetState(int state) { m_state = state; }
protected:
virtual bool IsHighlighted() const wxOVERRIDE
{ return m_state & wxDATAVIEW_CELL_SELECTED; }
private:
int m_align;
wxDataViewCellMode m_mode;
@@ -60,6 +66,8 @@ private:
wxDC *m_dc;
int m_state;
wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewRenderer);
};