]> git.saurik.com Git - wxWidgets.git/commitdiff
test editing_started and _done events
authorRobert Roebling <robert@roebling.de>
Sat, 25 Aug 2007 20:43:47 +0000 (20:43 +0000)
committerRobert Roebling <robert@roebling.de>
Sat, 25 Aug 2007 20:43:47 +0000 (20:43 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48385 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/dataview/dataview.cpp

index ed5013cc1c6281e62f057ca0dec5cd14b1061d4e..6877ef46271f77afdd41934d1f4cf08cdefead80 100644 (file)
@@ -440,6 +440,9 @@ public:
     void OnCollapsed( wxDataViewEvent &event );
     void OnSelected( wxDataViewEvent &event );
     
+    void OnEditingStarted( wxDataViewEvent &event );
+    void OnEditingDone( wxDataViewEvent &event );
+    
     void OnHeaderClick( wxDataViewEvent &event );
     void OnHeaderRightClick( wxDataViewEvent &event );
     void OnSorted( wxDataViewEvent &event );
@@ -530,6 +533,10 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
     EVT_DATAVIEW_ITEM_COLLAPSED(ID_MUSIC_CTRL, MyFrame::OnCollapsed)
     EVT_DATAVIEW_ITEM_SELECTED(ID_MUSIC_CTRL, MyFrame::OnSelected)
     
+    EVT_DATAVIEW_ITEM_EDITING_STARTED(ID_MUSIC_CTRL, MyFrame::OnEditingStarted)
+    EVT_DATAVIEW_ITEM_EDITING_DONE(ID_MUSIC_CTRL, MyFrame::OnEditingDone)
+    
+    
     EVT_DATAVIEW_COLUMN_HEADER_CLICK(ID_MUSIC_CTRL, MyFrame::OnHeaderClick)
     EVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICKED(ID_MUSIC_CTRL, MyFrame::OnHeaderRightClick)
     EVT_DATAVIEW_COLUMN_SORTED(ID_MUSIC_CTRL, MyFrame::OnSorted)
@@ -705,6 +712,23 @@ void MyFrame::OnExpanding( wxDataViewEvent &event )
     wxLogMessage("wxEVT_COMMAND_DATAVIEW_ITEM_EXPANDING, Item Id: %d", event.GetItem().GetID() );
 }
 
+
+void MyFrame::OnEditingStarted( wxDataViewEvent &event )
+{
+    if (!m_log)
+        return;
+        
+    wxLogMessage("wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_STARTED, Item Id: %d", event.GetItem().GetID() );
+}
+
+void MyFrame::OnEditingDone( wxDataViewEvent &event )
+{
+    if (!m_log)
+        return;
+        
+    wxLogMessage("wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_DONE, Item Id: %d", event.GetItem().GetID() );
+}
+
 void MyFrame::OnExpanded( wxDataViewEvent &event )
 {
     if (!m_log)