Allow custom wxDataViewCtrl renderers to easily use attributes.
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 10 Nov 2009 17:41:11 +0000 (17:41 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 10 Nov 2009 17:41:11 +0000 (17:41 +0000)
commit62265c2c67bd9ee1c78e57700277dc0baf2f14d6
tree8af8d82a1eeaa5d091d9df389879a8c1ae8c99b8
parent6eec70b984525aac09528c32411f19113620e284
Allow custom wxDataViewCtrl renderers to easily use attributes.

Set up the DC passed to wxDataViewCustomRenderer::Render() to use the font and
colour defined by the item attribute by default so that any calls to
RenderText() from it will use them automatically.

Also added public wxDataViewCustomRenderer::GetAttr() to allow retrieving the
attribute explicitly in Render().

The column using custom renderer in the dataview sample now works as expected
in the generic version; the native ones will be corrected in the upcoming
commits.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62590 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
12 files changed:
include/wx/dvrenderers.h
include/wx/generic/dvrenderer.h
include/wx/generic/dvrenderers.h
include/wx/gtk/dvrenderers.h
include/wx/osx/dvrenderers.h
interface/wx/dataview.h
src/common/datavcmn.cpp
src/generic/datavgen.cpp
src/gtk/dataview.cpp
src/osx/carbon/dataview.cpp
src/osx/cocoa/dataview.mm
src/osx/dataview_osx.cpp