]> git.saurik.com Git - wxWidgets.git/commitdiff
Added a proper log frame to the propgrid sample
authorJaakko Salli <jaakko.salli@dnainternet.net>
Sat, 12 Dec 2009 09:59:20 +0000 (09:59 +0000)
committerJaakko Salli <jaakko.salli@dnainternet.net>
Sat, 12 Dec 2009 09:59:20 +0000 (09:59 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62862 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/propgrid/propgrid.cpp
samples/propgrid/propgrid.h

index 4e80fe3e3ca4945dae102e7c14e7a787a9b95081..efef59ef59f92121f0904eb1b73179e0461fcc18 100644 (file)
@@ -1033,16 +1033,16 @@ void FormMain::OnPropertyGridPageChange( wxPropertyGridEvent& WXUNUSED(event) )
 
 void FormMain::OnPropertyGridLabelEditBegin( wxPropertyGridEvent& event )
 {
-    wxLogDebug("wxPG_EVT_LABEL_EDIT_BEGIN(%s)",
-               event.GetProperty()->GetLabel().c_str());
+    wxLogMessage("wxPG_EVT_LABEL_EDIT_BEGIN(%s)",
+                 event.GetProperty()->GetLabel().c_str());
 }
 
 // -----------------------------------------------------------------------
 
 void FormMain::OnPropertyGridLabelEditEnding( wxPropertyGridEvent& event )
 {
-    wxLogDebug("wxPG_EVT_LABEL_EDIT_ENDING(%s)",
-               event.GetProperty()->GetLabel().c_str());
+    wxLogMessage("wxPG_EVT_LABEL_EDIT_ENDING(%s)",
+                 event.GetProperty()->GetLabel().c_str());
 }
 
 // -----------------------------------------------------------------------
@@ -1121,14 +1121,14 @@ void FormMain::OnPropertyGridButtonClick ( wxCommandEvent& )
 
 void FormMain::OnPropertyGridItemCollapse( wxPropertyGridEvent& )
 {
-    wxLogDebug(wxT("Item was Collapsed"));
+    wxLogMessage(wxT("Item was Collapsed"));
 }
 
 // -----------------------------------------------------------------------
 
 void FormMain::OnPropertyGridItemExpand( wxPropertyGridEvent& )
 {
-    wxLogDebug(wxT("Item was Expanded"));
+    wxLogMessage(wxT("Item was Expanded"));
 }
 
 // -----------------------------------------------------------------------
@@ -1137,12 +1137,12 @@ void FormMain::OnPropertyGridColBeginDrag( wxPropertyGridEvent& event )
 {
     if ( m_itemVetoDragging->IsChecked() )
     {
-        wxLogDebug("Splitter %i resize was vetoed", event.GetColumn());
+        wxLogMessage("Splitter %i resize was vetoed", event.GetColumn());
         event.Veto();
     }
     else
     {
-        wxLogDebug("Splitter %i resize began", event.GetColumn());
+        wxLogMessage("Splitter %i resize began", event.GetColumn());
     }
 }
 
@@ -1150,15 +1150,16 @@ void FormMain::OnPropertyGridColBeginDrag( wxPropertyGridEvent& event )
 
 void FormMain::OnPropertyGridColDragging( wxPropertyGridEvent& event )
 {
+    wxUnusedVar(event);
     // For now, let's not spam the log output
-    //wxLogDebug("Splitter %i is being resized", event.GetColumn());
+    //wxLogMessage("Splitter %i is being resized", event.GetColumn());
 }
 
 // -----------------------------------------------------------------------
 
 void FormMain::OnPropertyGridColEndDrag( wxPropertyGridEvent& event )
 {
-    wxLogDebug("Splitter %i resize ended", event.GetColumn());
+    wxLogMessage("Splitter %i resize ended", event.GetColumn());
 }
 
 // -----------------------------------------------------------------------
@@ -2339,6 +2340,14 @@ FormMain::FormMain(const wxString& title, const wxPoint& pos, const wxSize& size
 #endif // wxUSE_STATUSBAR
 
     FinalizeFramePosition();
+
+#if wxUSE_LOGWINDOW
+    // Create log window
+    m_logWindow = new wxLogWindow(this, "Log Messages", false);
+    m_logWindow->GetFrame()->Move(GetPosition().x + GetSize().x + 10,
+                                  GetPosition().y);
+    m_logWindow->Show();
+#endif
 }
 
 void FormMain::FinalizeFramePosition()
index 9ae5c9832fffd21656c78e3484f24a1e83057bb8..7af74f31c5d1ccc6b3d738c16d5be9eb03fbf0fa 100644 (file)
@@ -139,6 +139,10 @@ public:
     wxWindow*       m_panel;
     wxBoxSizer*     m_topSizer;
 
+#if wxUSE_LOGWINDOW
+    wxLogWindow*    m_logWindow;
+#endif
+
     wxPGEditor*     m_pSampleMultiButtonEditor;
     wxPGChoices     m_combinedFlags;