return true;
}
-bool wxDataViewToggleRenderer::WXOnActivate(wxRect WXUNUSED(cell),
- wxDataViewModel *model,
- const wxDataViewItem& item,
- unsigned int col)
+bool wxDataViewToggleRenderer::WXOnLeftClick(const wxPoint& WXUNUSED(cursor),
+ const wxRect& WXUNUSED(cell),
+ wxDataViewModel *model,
+ const wxDataViewItem& item,
+ unsigned int col)
{
if (model->IsEnabled(item, col))
{
return GetTextExtent(m_date.FormatDate());
}
-bool wxDataViewDateRenderer::WXOnActivate(wxRect WXUNUSED(cell),
+bool wxDataViewDateRenderer::WXOnActivate(const wxRect& WXUNUSED(cell),
wxDataViewModel *model,
const wxDataViewItem& item,
unsigned int col)
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();
+
+ // Send the event to wxDataViewCtrl itself.
+ wxWindow * const parent = GetParent();
wxDataViewEvent cache_event(wxEVT_COMMAND_DATAVIEW_CACHE_HINT, parent->GetId());
- cache_event.SetEventObject(GetParent());
+ cache_event.SetEventObject(parent);
cache_event.SetCache(item_start, item_last - 1);
parent->ProcessWindowEvent(cache_event);