]> git.saurik.com Git - wxWidgets.git/commitdiff
Added wx.LogBuffer
authorRobin Dunn <robin@alldunn.com>
Thu, 9 Jun 2005 18:48:41 +0000 (18:48 +0000)
committerRobin Dunn <robin@alldunn.com>
Thu, 9 Jun 2005 18:48:41 +0000 (18:48 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34611 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/src/_log.i

index 4797f9fe7d83dd543b7891f9ff910a69082df888..8084857b0aff8b611f3eece52e336ea992b510b2 100644 (file)
@@ -202,6 +202,20 @@ public:
     wxLog *GetOldLog();
 };
 
+// log everything to a buffer
+class wxLogBuffer : public wxLog
+{
+public:
+    wxLogBuffer();
+
+    // get the string contents with all messages logged
+    const wxString& GetBuffer() const { return m_str; }
+
+    // show the buffer contents to the user in the best possible way (this uses
+    // wxMessageOutputMessageBox) and clear it
+    virtual void Flush();
+};
+
 
 //---------------------------------------------------------------------------