]> git.saurik.com Git - wxWidgets.git/commitdiff
added wxLogWindow::GetFrame()
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 4 Aug 1998 16:42:34 +0000 (16:42 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 4 Aug 1998 16:42:34 +0000 (16:42 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@434 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/log.h
src/common/log.cpp

index db850ff128a7beae0223f1a446719e1a5998b518..573d180eb3729bdb34dff376119c230dd93f8b39 100644 (file)
@@ -16,6 +16,8 @@
 #pragma interface "log.h"
 #endif
 
 #pragma interface "log.h"
 #endif
 
+#include "wx/intl.h"
+
 // ----------------------------------------------------------------------------
 // constants
 // ----------------------------------------------------------------------------
 // ----------------------------------------------------------------------------
 // constants
 // ----------------------------------------------------------------------------
@@ -68,7 +70,7 @@ public:
     // (FILE and iostream logs don't need it, but wxGuiLog does to avoid
     //  showing 17 modal dialogs one after another)
   virtual void Flush();
     // (FILE and iostream logs don't need it, but wxGuiLog does to avoid
     //  showing 17 modal dialogs one after another)
   virtual void Flush();
-    // call to Flush() may be optimized: call it only if this function 
+    // call to Flush() may be optimized: call it only if this function
     // returns true (although Flush() also returns immediately if there
     // is no messages, this functions is more efficient because inline)
   bool HasPendingMessages() const { return m_bHasMessages; }
     // returns true (although Flush() also returns immediately if there
     // is no messages, this functions is more efficient because inline)
   bool HasPendingMessages() const { return m_bHasMessages; }
@@ -119,7 +121,7 @@ protected:
     // default DoLogString does nothing but is not pure virtual because if
     // you override DoLog() you might not need it at all
   virtual void DoLogString(const char *szString);
     // default DoLogString does nothing but is not pure virtual because if
     // you override DoLog() you might not need it at all
   virtual void DoLogString(const char *szString);
-  
+
 private:
   // static variables
   // ----------------
 private:
   // static variables
   // ----------------
@@ -197,14 +199,18 @@ protected:
 // close it, clear the log contents or save it to the file.
 // ----------------------------------------------------------------------------
 class wxLogFrame;
 // close it, clear the log contents or save it to the file.
 // ----------------------------------------------------------------------------
 class wxLogFrame;
+class wxFrame;
 class WXDLLEXPORT wxLogWindow : public wxLog
 {
 public:
   wxLogWindow(const char *szTitle, bool bShow = TRUE);
   ~wxLogWindow();
 class WXDLLEXPORT wxLogWindow : public wxLog
 {
 public:
   wxLogWindow(const char *szTitle, bool bShow = TRUE);
   ~wxLogWindow();
-  
-  // show/hide the log window
+
+  // window operations
+    // show/hide the log window
   void Show(bool bShow = TRUE);
   void Show(bool bShow = TRUE);
+    // get the frame pointer (you shouldn't close it!)
+  wxFrame *GetFrame() const;
 
   // accessors
   wxLog *GetOldLog() const { return m_pOldLog; }
 
   // accessors
   wxLog *GetOldLog() const { return m_pOldLog; }
@@ -212,7 +218,7 @@ public:
 protected:
   virtual void DoLog(wxLogLevel level, const char *szString);
   virtual void DoLogString(const char *szString);
 protected:
   virtual void DoLog(wxLogLevel level, const char *szString);
   virtual void DoLogString(const char *szString);
-  
+
 private:
   wxLog      *m_pOldLog;    // previous log target
   wxLogFrame *m_pLogFrame;  // the log frame
 private:
   wxLog      *m_pOldLog;    // previous log target
   wxLogFrame *m_pLogFrame;  // the log frame
index 94e4db061fcb62a9028bac9befe924d179ad393b..66b2caa787ff3bf10e40bd9fe0ea1c5c3bdd0f64 100644 (file)
@@ -655,6 +655,11 @@ void wxLogWindow::Show(bool bShow)
   m_pLogFrame->Show(bShow);
 }
 
   m_pLogFrame->Show(bShow);
 }
 
+wxFrame *wxLogWindow::GetFrame() const
+{
+  return m_pLogFrame;
+}
+
 void wxLogWindow::DoLog(wxLogLevel level, const char *szString)
 {
   // first let the previous logger show it
 void wxLogWindow::DoLog(wxLogLevel level, const char *szString)
 {
   // first let the previous logger show it