Use the new wxDataViewRenderer activation API in wxTreeListCtrl.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69499 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2011-10-21 16:34:35 +00:00
parent fb57a95e70
commit 60d6c7fd37

View File

@@ -549,23 +549,17 @@ public:
} }
// Event handlers toggling the items checkbox if it was clicked. // Event handlers toggling the items checkbox if it was clicked.
virtual bool Activate(const wxRect& WXUNUSED(cell), virtual bool ActivateCell(const wxRect& WXUNUSED(cell),
wxDataViewModel* model, wxDataViewModel *model,
const wxDataViewItem& item, const wxDataViewItem & item,
unsigned int WXUNUSED(col)) unsigned int WXUNUSED(col),
const wxMouseEvent *mouseEvent)
{ {
static_cast<wxTreeListModel*>(model)->ToggleItem(item); if ( mouseEvent )
return true; {
} if ( !wxRect(GetCheckSize()).Contains(mouseEvent->GetPosition()) )
return false;
virtual bool LeftClick(const wxPoint& pos, }
const wxRect& WXUNUSED(cell),
wxDataViewModel* model,
const wxDataViewItem& item,
unsigned int WXUNUSED(col))
{
if ( !wxRect(GetCheckSize()).Contains(pos) )
return false;
static_cast<wxTreeListModel*>(model)->ToggleItem(item); static_cast<wxTreeListModel*>(model)->ToggleItem(item);
return true; return true;