add Create to wxDocParentFrame
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41225 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -27,6 +27,10 @@ See the example application in {\tt samples/docview}.
|
|||||||
|
|
||||||
\membersection{wxDocParentFrame::wxDocParentFrame}\label{wxdocparentframector}
|
\membersection{wxDocParentFrame::wxDocParentFrame}\label{wxdocparentframector}
|
||||||
|
|
||||||
|
\func{}{wxDocParentFrame}{\void}
|
||||||
|
|
||||||
|
Default constructor.
|
||||||
|
|
||||||
\func{}{wxDocParentFrame}{\param{wxDocManager*}{ manager}, \param{wxFrame *}{parent}, \param{wxWindowID}{ id},
|
\func{}{wxDocParentFrame}{\param{wxDocManager*}{ manager}, \param{wxFrame *}{parent}, \param{wxWindowID}{ id},
|
||||||
\param{const wxString\& }{title}, \param{const wxPoint\&}{ pos = wxDefaultPosition},
|
\param{const wxString\& }{title}, \param{const wxPoint\&}{ pos = wxDefaultPosition},
|
||||||
\param{const wxSize\&}{ size = wxDefaultSize},
|
\param{const wxSize\&}{ size = wxDefaultSize},
|
||||||
@@ -40,6 +44,15 @@ Constructor.
|
|||||||
|
|
||||||
Destructor.
|
Destructor.
|
||||||
|
|
||||||
|
\membersection{wxDocParentFrame::Create}\label{wxdocparentframecreate}
|
||||||
|
|
||||||
|
\func{bool}{Create}{\param{wxDocManager*}{ manager}, \param{wxFrame *}{parent}, \param{wxWindowID}{ id},
|
||||||
|
\param{const wxString\& }{title}, \param{const wxPoint\&}{ pos = wxDefaultPosition},
|
||||||
|
\param{const wxSize\&}{ size = wxDefaultSize},
|
||||||
|
\param{long}{ style = wxDEFAULT\_FRAME\_STYLE}, \param{const wxString\& }{name = "frame"}}
|
||||||
|
|
||||||
|
Used in two-step construction.
|
||||||
|
|
||||||
\membersection{wxDocParentFrame::OnCloseWindow}\label{wxdocparentframeonclosewindow}
|
\membersection{wxDocParentFrame::OnCloseWindow}\label{wxdocparentframeonclosewindow}
|
||||||
|
|
||||||
\func{void}{OnCloseWindow}{\param{wxCloseEvent\&}{ event}}
|
\func{void}{OnCloseWindow}{\param{wxCloseEvent\&}{ event}}
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
#if wxUSE_DOC_VIEW_ARCHITECTURE
|
#if wxUSE_DOC_VIEW_ARCHITECTURE
|
||||||
|
|
||||||
#include "wx/list.h"
|
#include "wx/list.h"
|
||||||
#include "wx/cmndata.h"
|
|
||||||
#include "wx/string.h"
|
#include "wx/string.h"
|
||||||
#include "wx/frame.h"
|
#include "wx/frame.h"
|
||||||
|
|
||||||
@@ -499,14 +498,24 @@ private:
|
|||||||
class WXDLLEXPORT wxDocParentFrame : public wxFrame
|
class WXDLLEXPORT wxDocParentFrame : public wxFrame
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
wxDocParentFrame();
|
||||||
wxDocParentFrame(wxDocManager *manager,
|
wxDocParentFrame(wxDocManager *manager,
|
||||||
wxFrame *frame,
|
wxFrame *frame,
|
||||||
wxWindowID id,
|
wxWindowID id,
|
||||||
const wxString& title,
|
const wxString& title,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long type = wxDEFAULT_FRAME_STYLE,
|
long style = wxDEFAULT_FRAME_STYLE,
|
||||||
const wxString& name = wxT("frame"));
|
const wxString& name = wxFrameNameStr);
|
||||||
|
|
||||||
|
bool Create(wxDocManager *manager,
|
||||||
|
wxFrame *frame,
|
||||||
|
wxWindowID id,
|
||||||
|
const wxString& title,
|
||||||
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
|
const wxSize& size = wxDefaultSize,
|
||||||
|
long style = wxDEFAULT_FRAME_STYLE,
|
||||||
|
const wxString& name = wxFrameNameStr);
|
||||||
|
|
||||||
// Extend event processing to search the document manager's event table
|
// Extend event processing to search the document manager's event table
|
||||||
virtual bool ProcessEvent(wxEvent& event);
|
virtual bool ProcessEvent(wxEvent& event);
|
||||||
@@ -521,6 +530,7 @@ protected:
|
|||||||
wxDocManager *m_docManager;
|
wxDocManager *m_docManager;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
typedef wxFrame base_type;
|
||||||
DECLARE_CLASS(wxDocParentFrame)
|
DECLARE_CLASS(wxDocParentFrame)
|
||||||
DECLARE_EVENT_TABLE()
|
DECLARE_EVENT_TABLE()
|
||||||
DECLARE_NO_COPY_CLASS(wxDocParentFrame)
|
DECLARE_NO_COPY_CLASS(wxDocParentFrame)
|
||||||
|
@@ -1923,6 +1923,11 @@ BEGIN_EVENT_TABLE(wxDocParentFrame, wxFrame)
|
|||||||
EVT_CLOSE(wxDocParentFrame::OnCloseWindow)
|
EVT_CLOSE(wxDocParentFrame::OnCloseWindow)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
|
wxDocParentFrame::wxDocParentFrame()
|
||||||
|
{
|
||||||
|
m_docManager = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
wxDocParentFrame::wxDocParentFrame(wxDocManager *manager,
|
wxDocParentFrame::wxDocParentFrame(wxDocManager *manager,
|
||||||
wxFrame *frame,
|
wxFrame *frame,
|
||||||
wxWindowID id,
|
wxWindowID id,
|
||||||
@@ -1936,6 +1941,19 @@ wxDocParentFrame::wxDocParentFrame(wxDocManager *manager,
|
|||||||
m_docManager = manager;
|
m_docManager = manager;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool wxDocParentFrame::Create(wxDocManager *manager,
|
||||||
|
wxFrame *frame,
|
||||||
|
wxWindowID id,
|
||||||
|
const wxString& title,
|
||||||
|
const wxPoint& pos,
|
||||||
|
const wxSize& size,
|
||||||
|
long style,
|
||||||
|
const wxString& name)
|
||||||
|
{
|
||||||
|
m_docManager = manager;
|
||||||
|
return base_type::Create(frame, id, title, pos, size, style, name);
|
||||||
|
}
|
||||||
|
|
||||||
void wxDocParentFrame::OnExit(wxCommandEvent& WXUNUSED(event))
|
void wxDocParentFrame::OnExit(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
Close();
|
Close();
|
||||||
|
Reference in New Issue
Block a user