Changing the value of a "choice" cell in wxDataViewCtrl didn't work correctly
in wxOSX/Cocoa because wxDataViewChoiceRenderer used the base class version of
OSXOnCellChanged() which passed the integer index we received from NSOutlineView
to the model instead of the expected string.
Fix this by overriding OSXOnCellChanged() in wxDataViewChoiceRenderer itself
and using its argument as an integer index of the selection because this is
what it is, at least under OS X 10.7.
Closes#14373.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71939 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
These checks were not unnecessary at all, this file is used for both Cocoa and
Carbon, fix this momentary lapse of reason.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62606 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Virtualize applying the attributes in a new OSXApplyAttr() function and simply
store the attribute in its wxDataViewCustomRenderer version so that it could
be reused later in Render().
The attributes now work correctly in wxOSX/Cocoa dataview sample too.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62599 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
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
This commit adds no changes in functionality but paves way for the upcoming
improvements of wxDataViewCustomRenderer.
First, introduce wxDataViewCustomRendererBase class in order to allow
implementing behaviour common to custom renderers in all ports in this class
instead of triplicating it.
This required splitting monolithic dataview.h in more parts, now we have
wx/dvrenderer.h which defines wxDataViewRendererBase and the new
wxDataViewCustomRendererBase and includes wx/port/dvrenderer.h which define
wxDataViewRenderer and wx/port/dvrenderers.h which defines all the other
renderer classes.
Also bring renderers hierarchy in the generic version closer to other ports:
all standard renderer classes now inherit from wxDataViewRenderer and not
wxDataViewCustomRenderer in for consistency with the other ports.
wxDataViewRenderer itself still does derive from wxDataViewCustomRendererBase,
unlike elsewhere, but this is unavoidable considering that all generic
renderers are custom ones.
Finally do some cleanup in OS X part of the code: correct indentation,
spacing, comment style.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62589 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775