]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/datavcmn.cpp
extend wxXLocale with wxStrto[d,l,ul] functions; make wxXLocale::Init() a little...
[wxWidgets.git] / src / common / datavcmn.cpp
index 17f3e911d34e8b5173df39bf45e26ff0379d0912..4c3e52e99a6a9f8e47ea6760c1558660392ff9f7 100644 (file)
@@ -233,7 +233,7 @@ void wxDataViewModel::RemoveNotifier( wxDataViewModelNotifier *notifier )
 }
 
 int wxDataViewModel::Compare( const wxDataViewItem &item1, const wxDataViewItem &item2,
-                              unsigned int column, bool ascending )
+                              unsigned int column, bool ascending ) const
 {
     // sort branches before leaves
     bool item1_is_container = IsContainer(item1);
@@ -432,7 +432,7 @@ bool wxDataViewIndexListModel::HasDefaultCompare() const
 int wxDataViewIndexListModel::Compare(const wxDataViewItem& item1,
                                       const wxDataViewItem& item2,
                                       unsigned int WXUNUSED(column),
-                                      bool ascending)
+                                      bool ascending) const
 {
     if (m_ordered)
     {
@@ -587,7 +587,7 @@ bool wxDataViewVirtualListModel::HasDefaultCompare() const
 int wxDataViewVirtualListModel::Compare(const wxDataViewItem& item1,
                                       const wxDataViewItem& item2,
                                       unsigned int WXUNUSED(column),
-                                      bool ascending)
+                                      bool ascending) const
 {
     unsigned int pos1 = wxPtrToUInt(item1.GetID());
     unsigned int pos2 = wxPtrToUInt(item2.GetID());
@@ -702,6 +702,10 @@ bool wxDataViewRendererBase::StartEditing( const wxDataViewItem &item, wxRect la
 
     m_editorCtrl->PushEventHandler( handler );
 
+    // there might be no editor control for the given item
+    if (!m_editorCtrl)
+        return false;
+        
 #if defined(__WXGTK20__) && !defined(wxUSE_GENERICDATAVIEWCTRL)
     handler->SetFocusOnIdle();
 #else
@@ -1218,6 +1222,7 @@ wxDEFINE_EVENT( wxEVT_COMMAND_DATAVIEW_ITEM_COLLAPSED, wxDataViewEvent );
 wxDEFINE_EVENT( wxEVT_COMMAND_DATAVIEW_ITEM_EXPANDING, wxDataViewEvent );
 wxDEFINE_EVENT( wxEVT_COMMAND_DATAVIEW_ITEM_EXPANDED, wxDataViewEvent );
 wxDEFINE_EVENT( wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_STARTED, wxDataViewEvent );
+wxDEFINE_EVENT( wxEVT_COMMAND_DATAVIEW_ITEM_START_EDITING, wxDataViewEvent );
 wxDEFINE_EVENT( wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_DONE, wxDataViewEvent );
 wxDEFINE_EVENT( wxEVT_COMMAND_DATAVIEW_ITEM_VALUE_CHANGED, wxDataViewEvent );
 
@@ -1938,7 +1943,7 @@ unsigned int wxDataViewTreeStore::GetChildren( const wxDataViewItem &item, wxDat
 }
 
 int wxDataViewTreeStore::Compare( const wxDataViewItem &item1, const wxDataViewItem &item2,
-                         unsigned int WXUNUSED(column), bool WXUNUSED(ascending) )
+                         unsigned int WXUNUSED(column), bool WXUNUSED(ascending) ) const
 {
     wxDataViewTreeStoreNode *node1 = FindNode( item1 );
     wxDataViewTreeStoreNode *node2 = FindNode( item2 );