added EVT_DATAVIEW_CACHE_HINT event (closes #9891)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61331 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-07-05 15:21:52 +00:00
parent c2e5ea68a1
commit 47a8b1e1ff
5 changed files with 40 additions and 2 deletions

View File

@@ -1676,6 +1676,12 @@ void wxDataViewMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
wxMin( (int)( GetLineAt( wxMax(0,update.y+update.height) ) - item_start + 1),
(int)(GetRowCount( ) - item_start));
unsigned int item_last = item_start + item_count;
// Get the parent of DataViewCtrl
wxWindow *parent = GetParent()->GetParent();
wxDataViewEvent cache_event(wxEVT_COMMAND_DATAVIEW_CACHE_HINT, parent->GetId());
cache_event.SetEventObject(GetParent());
cache_event.SetCache(item_start, item_last - 1);
parent->ProcessWindowEvent(cache_event);
// compute which columns needs to be redrawn
unsigned int cols = GetOwner()->GetColumnCount();