No changes, just simplify docview sample a bit.

Remove some unnecessary function arguments and m_frame member variable.

Closes #12374.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66079 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2010-11-10 00:36:39 +00:00
parent 0c46625036
commit 9b341e6fa1
4 changed files with 55 additions and 76 deletions

View File

@@ -228,8 +228,8 @@ bool MyApp::OnInit()
CreateMenuBarForFrame(frame, menuFile, m_menuEdit);
frame->SetIcon(wxICON(doc));
frame->Centre(wxBOTH);
frame->Show(true);
frame->Centre();
frame->Show();
SetTopWindow(frame);
return true;
@@ -285,10 +285,11 @@ void MyApp::CreateMenuBarForFrame(wxFrame *frame, wxMenu *file, wxMenu *edit)
frame->SetMenuBar(menubar);
}
wxFrame *MyApp::CreateChildFrame(wxDocument *doc, wxView *view, bool isCanvas)
wxFrame *MyApp::CreateChildFrame(wxView *view, bool isCanvas)
{
// create a child frame of appropriate class for the current mode
wxFrame *subframe;
wxDocument *doc = view->GetDocument();
#if wxUSE_MDI_ARCHITECTURE
if ( GetMode() == Mode_MDI )
{
@@ -317,7 +318,7 @@ wxFrame *MyApp::CreateChildFrame(wxDocument *doc, wxView *view, bool isCanvas)
wxSize(300, 300)
);
subframe->Centre(wxBOTH);
subframe->Centre();
}
wxMenu *menuFile = new wxMenu;