Return non-const pointer from wxDataViewRendererBase::GetView().
Non-const wxWindow pointers are unfortunately needed quite often in wx API so return a non-const pointer here to allow using it with e.g. wxRendererNative (whose methods all take non-const wxWindow pointers) in the derived classes. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68852 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -173,8 +173,9 @@ protected:
|
||||
wxWeakRef<wxWindow> m_editorCtrl;
|
||||
wxDataViewItem m_item; // for m_editorCtrl
|
||||
|
||||
// internal utility:
|
||||
const wxDataViewCtrl* GetView() const;
|
||||
// internal utility, may be used anywhere the window associated with the
|
||||
// renderer is required
|
||||
wxDataViewCtrl* GetView() const;
|
||||
|
||||
protected:
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewRendererBase)
|
||||
|
@@ -673,7 +673,7 @@ wxDataViewRendererBase::~wxDataViewRendererBase()
|
||||
{
|
||||
}
|
||||
|
||||
const wxDataViewCtrl* wxDataViewRendererBase::GetView() const
|
||||
wxDataViewCtrl* wxDataViewRendererBase::GetView() const
|
||||
{
|
||||
return const_cast<wxDataViewRendererBase*>(this)->GetOwner()->GetOwner();
|
||||
}
|
||||
|
Reference in New Issue
Block a user