From fb57a95e700187e35b780a4596fa0bbe1c75bd72 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Fri, 21 Oct 2011 16:34:32 +0000 Subject: [PATCH] Move wxDataViewCustomRendererBase::ActivateCell() to datavcmn.cpp. It triggered deprecation warnings in user code when it was inline. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69498 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/dvrenderers.h | 9 +-------- src/common/datavcmn.cpp | 13 +++++++++++++ 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/include/wx/dvrenderers.h b/include/wx/dvrenderers.h index 7cbb7b220e..9e34a32c87 100644 --- a/include/wx/dvrenderers.h +++ b/include/wx/dvrenderers.h @@ -236,14 +236,7 @@ public: wxDataViewModel *model, const wxDataViewItem & item, unsigned int col, - const wxMouseEvent* mouseEvent) - { - // Compatibility code - if ( mouseEvent ) - return LeftClick(mouseEvent->GetPosition(), cell, model, item, col); - else - return Activate(cell, model, item, col); - } + const wxMouseEvent* mouseEvent); // Deprecated, use (and override) ActivateCell() instead wxDEPRECATED_BUT_USED_INTERNALLY_INLINE( diff --git a/src/common/datavcmn.cpp b/src/common/datavcmn.cpp index 858aa98a9a..ad62ddae04 100644 --- a/src/common/datavcmn.cpp +++ b/src/common/datavcmn.cpp @@ -807,6 +807,19 @@ void wxDataViewRendererBase::PrepareForItem(const wxDataViewModel *model, // wxDataViewCustomRendererBase // ---------------------------------------------------------------------------- +bool wxDataViewCustomRendererBase::ActivateCell(const wxRect& cell, + wxDataViewModel *model, + const wxDataViewItem & item, + unsigned int col, + const wxMouseEvent* mouseEvent) +{ + // Compatibility code + if ( mouseEvent ) + return LeftClick(mouseEvent->GetPosition(), cell, model, item, col); + else + return Activate(cell, model, item, col); +} + void wxDataViewCustomRendererBase::WXCallRender(wxRect rectCell, wxDC *dc, int state) { -- 2.45.2