added wxLogWindow::GetFrame()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@434 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -16,6 +16,8 @@
|
|||||||
#pragma interface "log.h"
|
#pragma interface "log.h"
|
||||||
#endif
|
#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
|
// (FILE and iostream logs don't need it, but wxGuiLog does to avoid
|
||||||
// showing 17 modal dialogs one after another)
|
// showing 17 modal dialogs one after another)
|
||||||
virtual void Flush();
|
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
|
// returns true (although Flush() also returns immediately if there
|
||||||
// is no messages, this functions is more efficient because inline)
|
// is no messages, this functions is more efficient because inline)
|
||||||
bool HasPendingMessages() const { return m_bHasMessages; }
|
bool HasPendingMessages() const { return m_bHasMessages; }
|
||||||
@@ -119,7 +121,7 @@ protected:
|
|||||||
// default DoLogString does nothing but is not pure virtual because if
|
// default DoLogString does nothing but is not pure virtual because if
|
||||||
// you override DoLog() you might not need it at all
|
// you override DoLog() you might not need it at all
|
||||||
virtual void DoLogString(const char *szString);
|
virtual void DoLogString(const char *szString);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// static variables
|
// static variables
|
||||||
// ----------------
|
// ----------------
|
||||||
@@ -197,14 +199,18 @@ protected:
|
|||||||
// close it, clear the log contents or save it to the file.
|
// close it, clear the log contents or save it to the file.
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
class wxLogFrame;
|
class wxLogFrame;
|
||||||
|
class wxFrame;
|
||||||
class WXDLLEXPORT wxLogWindow : public wxLog
|
class WXDLLEXPORT wxLogWindow : public wxLog
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxLogWindow(const char *szTitle, bool bShow = TRUE);
|
wxLogWindow(const char *szTitle, bool bShow = TRUE);
|
||||||
~wxLogWindow();
|
~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
|
// accessors
|
||||||
wxLog *GetOldLog() const { return m_pOldLog; }
|
wxLog *GetOldLog() const { return m_pOldLog; }
|
||||||
@@ -212,7 +218,7 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
virtual void DoLog(wxLogLevel level, const char *szString);
|
virtual void DoLog(wxLogLevel level, const char *szString);
|
||||||
virtual void DoLogString(const char *szString);
|
virtual void DoLogString(const char *szString);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
wxLog *m_pOldLog; // previous log target
|
wxLog *m_pOldLog; // previous log target
|
||||||
wxLogFrame *m_pLogFrame; // the log frame
|
wxLogFrame *m_pLogFrame; // the log frame
|
||||||
|
@@ -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)
|
void wxLogWindow::DoLog(wxLogLevel level, const char *szString)
|
||||||
{
|
{
|
||||||
// first let the previous logger show it
|
// first let the previous logger show it
|
||||||
|
Reference in New Issue
Block a user