From: Vadim Zeitlin Date: Tue, 14 Sep 2004 15:15:24 +0000 (+0000) Subject: allow to use any window, not just wxFrame, as wxLogFrame parent (patch from Paul... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/55c9a18696a2bedb4fb15a0986e418aafb46f2ec?ds=inline allow to use any window, not just wxFrame, as wxLogFrame parent (patch from Paul Gammans) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29140 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/generic/logg.h b/include/wx/generic/logg.h index 16418df233..26caf21bb0 100644 --- a/include/wx/generic/logg.h +++ b/include/wx/generic/logg.h @@ -88,7 +88,7 @@ protected: class WXDLLEXPORT wxLogWindow : public wxLogPassThrough { public: - wxLogWindow(wxFrame *pParent, // the parent frame (can be NULL) + wxLogWindow(wxWindow *pParent, // the parent frame (can be NULL) const wxChar *szTitle, // the title of the frame bool bShow = true, // show window immediately? bool bPassToOld = true); // pass messages to the old target? diff --git a/include/wx/log.h b/include/wx/log.h index 89e0d41dc2..08e21c1717 100644 --- a/include/wx/log.h +++ b/include/wx/log.h @@ -76,6 +76,7 @@ typedef unsigned long wxLogLevel; class WXDLLIMPEXP_CORE wxTextCtrl; class WXDLLIMPEXP_CORE wxLogFrame; class WXDLLIMPEXP_CORE wxFrame; + class WXDLLIMPEXP_CORE wxWindow; #endif // wxUSE_GUI // ---------------------------------------------------------------------------- diff --git a/src/generic/logg.cpp b/src/generic/logg.cpp index 27e75a9097..a0b7a1aa5c 100644 --- a/src/generic/logg.cpp +++ b/src/generic/logg.cpp @@ -434,7 +434,7 @@ class wxLogFrame : public wxFrame { public: // ctor & dtor - wxLogFrame(wxFrame *pParent, wxLogWindow *log, const wxChar *szTitle); + wxLogFrame(wxWindow *pParent, wxLogWindow *log, const wxChar *szTitle); virtual ~wxLogFrame(); // menu callbacks @@ -478,7 +478,7 @@ BEGIN_EVENT_TABLE(wxLogFrame, wxFrame) EVT_CLOSE(wxLogFrame::OnCloseWindow) END_EVENT_TABLE() -wxLogFrame::wxLogFrame(wxFrame *pParent, wxLogWindow *log, const wxChar *szTitle) +wxLogFrame::wxLogFrame(wxWindow *pParent, wxLogWindow *log, const wxChar *szTitle) : wxFrame(pParent, wxID_ANY, szTitle) { m_log = log; @@ -585,7 +585,7 @@ wxLogFrame::~wxLogFrame() // wxLogWindow // ----------- -wxLogWindow::wxLogWindow(wxFrame *pParent, +wxLogWindow::wxLogWindow(wxWindow *pParent, const wxChar *szTitle, bool bShow, bool bDoPass)