// items must be different
unsigned long litem1 = (unsigned long) item1.GetID();
unsigned long litem2 = (unsigned long) item2.GetID();
-
+
if (!ascending)
return litem2-litem2;
return wxDataViewItem( m_hash[row] );
}
-int wxDataViewIndexListModel::Compare( const wxDataViewItem &item1, const wxDataViewItem &item2,
- unsigned int column, bool ascending )
+int wxDataViewIndexListModel::Compare(const wxDataViewItem& item1,
+ const wxDataViewItem& item2,
+ unsigned int WXUNUSED(column),
+ bool ascending)
{
if (ascending)
return GetRow(item1) - GetRow(item2);
-
+
return GetRow(item2) - GetRow(item1);
}
return 0;
children = m_hash;
-
+
return m_hash.GetCount();
}
GetOwner()->GetOwner()->GetModel()->ValueChanged( m_item, col );
// m_editorCtrl->PopEventHandler( true );
-
+
// Now we should send Editing Done event
wxDataViewEvent event( wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_DONE, GetOwner()->GetOwner()->GetId() );
event.SetDataViewColumn( GetOwner() );
wxDataViewCtrlBase::AppendToggleColumn( const wxString &label, unsigned int model_column,
wxDataViewCellMode mode, int width, wxAlignment align, int flags )
{
-
+
wxDataViewColumn *ret = new wxDataViewColumn( label,
new wxDataViewToggleRenderer( wxT("bool"), mode, (int)align ),
model_column, width, align, flags );
IMPLEMENT_DYNAMIC_CLASS(wxDataViewEvent,wxNotifyEvent)
-DEFINE_EVENT_TYPE(wxEVT_COMMAND_DATAVIEW_ITEM_SELECTED)
-DEFINE_EVENT_TYPE(wxEVT_COMMAND_DATAVIEW_ITEM_DESELECTED)
+DEFINE_EVENT_TYPE(wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED)
+
DEFINE_EVENT_TYPE(wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_DATAVIEW_ITEM_COLLAPSING)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_DATAVIEW_ITEM_COLLAPSED)