X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d4cf50c8b2574caec6dc13f7dfb0f3ee2b92842e..85a39457f9edb69bf287c6d244966b514ce0bdbc:/src/common/datavcmn.cpp diff --git a/src/common/datavcmn.cpp b/src/common/datavcmn.cpp index febc1d1bf4..6dcf50fb56 100644 --- a/src/common/datavcmn.cpp +++ b/src/common/datavcmn.cpp @@ -672,6 +672,8 @@ wxDataViewRendererBase::wxDataViewRendererBase( const wxString &varianttype, wxDataViewRendererBase::~wxDataViewRendererBase() { + if ( m_editorCtrl ) + DestroyEditControl(); } wxDataViewCtrl* wxDataViewRendererBase::GetView() const @@ -820,6 +822,18 @@ bool wxDataViewCustomRendererBase::ActivateCell(const wxRect& cell, return Activate(cell, model, item, col); } +void wxDataViewCustomRendererBase::RenderBackground(wxDC* dc, const wxRect& rect) +{ + if ( !m_attr.HasBackgroundColour() ) + return; + + const wxColour& colour = m_attr.GetBackgroundColour(); + wxDCPenChanger changePen(*dc, colour); + wxDCBrushChanger changeBrush(*dc, colour); + + dc->DrawRectangle(rect); +} + void wxDataViewCustomRendererBase::WXCallRender(wxRect rectCell, wxDC *dc, int state) { @@ -1404,6 +1418,11 @@ wxDataViewCtrlBase::InsertColumn( unsigned int WXUNUSED(pos), wxDataViewColumn * return true; } +void wxDataViewCtrlBase::StartEditor(const wxDataViewItem& item, unsigned int column) +{ + EditItem(item, GetColumn(column)); +} + // --------------------------------------------------------- // wxDataViewEvent // ---------------------------------------------------------