From: Robin Dunn <robin@alldunn.com>
Date: Thu, 9 Jun 2005 18:48:41 +0000 (+0000)
Subject: Added wx.LogBuffer
X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/93649c2c50d221294f6068d9e2160ece5a5e947c

Added wx.LogBuffer


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34611 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---

diff --git a/wxPython/src/_log.i b/wxPython/src/_log.i
index 4797f9fe7d..8084857b0a 100644
--- a/wxPython/src/_log.i
+++ b/wxPython/src/_log.i
@@ -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();
+};
+
 
 //---------------------------------------------------------------------------