From 93649c2c50d221294f6068d9e2160ece5a5e947c Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Thu, 9 Jun 2005 18:48:41 +0000 Subject: [PATCH 1/1] Added wx.LogBuffer git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34611 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/src/_log.i | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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(); +}; + //--------------------------------------------------------------------------- -- 2.47.2