Added MDI support for Document/view, plus an example.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@387 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
1998-07-28 13:33:23 +00:00
parent 22c248be96
commit 2108f33a68
28 changed files with 1628 additions and 17 deletions

View File

@@ -88,7 +88,7 @@ bool MyApp::OnInit(void)
CLASSINFO(TextEditDocument), CLASSINFO(TextEditView));
//// Create the main frame window
frame = new MyFrame(m_docManager, NULL, "DocView Demo", wxPoint(0, 0), wxSize(500, 400), wxDEFAULT_FRAME_STYLE);
frame = new MyFrame(m_docManager, NULL, -1, "DocView Demo", wxPoint(0, 0), wxSize(500, 400), wxDEFAULT_FRAME_STYLE);
//// Give it an icon (this is ignored in MDI mode: uses resources)
#ifdef __WXMSW__
@@ -168,7 +168,7 @@ int MyApp::OnExit(void)
wxFrame *MyApp::CreateChildFrame(wxDocument *doc, wxView *view, bool isCanvas)
{
//// Make a child frame
wxDocChildFrame *subframe = new wxDocChildFrame(doc, view, GetMainFrame(), "Child Frame",
wxDocChildFrame *subframe = new wxDocChildFrame(doc, view, GetMainFrame(), -1, "Child Frame",
wxPoint(10, 10), wxSize(300, 300), wxDEFAULT_FRAME_STYLE);
#ifdef __WXMSW__
@@ -235,9 +235,9 @@ BEGIN_EVENT_TABLE(MyFrame, wxDocParentFrame)
EVT_MENU(DOCVIEW_ABOUT, MyFrame::OnAbout)
END_EVENT_TABLE()
MyFrame::MyFrame(wxDocManager *manager, wxFrame *frame, const wxString& title,
MyFrame::MyFrame(wxDocManager *manager, wxFrame *frame, wxWindowID id, const wxString& title,
const wxPoint& pos, const wxSize& size, const long type):
wxDocParentFrame(manager, frame, title, pos, size, type)
wxDocParentFrame(manager, frame, id, title, pos, size, type)
{
// This pointer only needed if in single window mode
canvas = NULL;