Handle cell alignment in the renderer itself in generic wxDVC.
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 12 Oct 2009 22:44:03 +0000 (22:44 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 12 Oct 2009 22:44:03 +0000 (22:44 +0000)
commita6f1201f979564c4fe025cb31f0cf65517d850f1
tree157f3f55b4af7f652e0fd627de372da641fd4540
parentb74399b98243cf446cc867410754c8d7d9ff60a2
Handle cell alignment in the renderer itself in generic wxDVC.

Instead of using wxDataViewRenderer::GetSize() and rendering the cell into the
appropriate part of the rectangle, pass the full rectangle and the alignment
of the cell contents in it to the renderer itself.

This fixes the bug with bold text being truncated in the "attributes" column
of the dataview sample and is also generally more flexible as the renderer may
decide itself what to do with the extra space.

It also somewhat reduces the code duplication between CreateItemBitmap() and
OnPaint().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62393 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
include/wx/generic/dataview.h
src/generic/datavgen.cpp