Implement attributes support in generic wxDataViewIconTextRenderer.

Simply override RenderWithAttr() instead of Render().

Update the sample to show that this works now.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62395 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-10-12 22:44:15 +00:00
parent 3e60a3c147
commit 38c349189a
3 changed files with 48 additions and 28 deletions

View File

@@ -275,12 +275,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; }