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:
@@ -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;
|
||||||
|
Reference in New Issue
Block a user