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:
@@ -1250,10 +1250,14 @@ wxDEFINE_EVENT( wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK, wxDataViewEven
|
||||
wxDEFINE_EVENT( wxEVT_COMMAND_DATAVIEW_COLUMN_SORTED, wxDataViewEvent );
|
||||
wxDEFINE_EVENT( wxEVT_COMMAND_DATAVIEW_COLUMN_REORDERED, wxDataViewEvent );
|
||||
|
||||
wxDEFINE_EVENT( wxEVT_COMMAND_DATAVIEW_CACHE_HINT, wxDataViewEvent );
|
||||
|
||||
wxDEFINE_EVENT( wxEVT_COMMAND_DATAVIEW_ITEM_BEGIN_DRAG, wxDataViewEvent );
|
||||
wxDEFINE_EVENT( wxEVT_COMMAND_DATAVIEW_ITEM_DROP_POSSIBLE, wxDataViewEvent );
|
||||
wxDEFINE_EVENT( wxEVT_COMMAND_DATAVIEW_ITEM_DROP, wxDataViewEvent );
|
||||
|
||||
|
||||
|
||||
// -------------------------------------
|
||||
// wxDataViewSpinRenderer
|
||||
// -------------------------------------
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user