made the multi-notebook the default view in the aui sample; added welcome screen to the notebook

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42489 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Benjamin Williams 2006-10-27 07:21:27 +00:00
parent 8c3dbc46b3
commit dbd2f79065

View File

@ -106,7 +106,7 @@ private:
wxTreeCtrl* CreateTreeCtrl();
wxSizeReportCtrl* CreateSizeReportCtrl(int width = 80, int height = 80);
wxPoint GetStartPosition();
wxHtmlWindow* CreateHTMLCtrl();
wxHtmlWindow* CreateHTMLCtrl(wxWindow* parent = NULL);
wxAuiMultiNotebook* CreateNotebook();
wxString GetIntroText();
@ -862,7 +862,7 @@ MyFrame::MyFrame(wxWindow* parent,
m_mgr.GetPane(wxT("tb6")).Hide();
m_mgr.GetPane(wxT("test8")).Show().Left().Layer(0).Row(0).Position(0);
m_mgr.GetPane(wxT("test10")).Show().Bottom().Layer(0).Row(0).Position(0);
m_mgr.GetPane(wxT("html_content")).Show();
m_mgr.GetPane(wxT("notebook_content")).Show();
wxString perspective_default = m_mgr.SavePerspective();
m_perspectives.Add(perspective_default);
@ -1219,9 +1219,12 @@ wxSizeReportCtrl* MyFrame::CreateSizeReportCtrl(int width, int height)
return ctrl;
}
wxHtmlWindow* MyFrame::CreateHTMLCtrl()
wxHtmlWindow* MyFrame::CreateHTMLCtrl(wxWindow* parent)
{
wxHtmlWindow* ctrl = new wxHtmlWindow(this, wxID_ANY,
if (!parent)
parent = this;
wxHtmlWindow* ctrl = new wxHtmlWindow(parent, wxID_ANY,
wxDefaultPosition,
wxSize(400,300));
ctrl->SetPage(GetIntroText());
@ -1233,6 +1236,8 @@ wxAuiMultiNotebook* MyFrame::CreateNotebook()
wxAuiMultiNotebook* ctrl = new wxAuiMultiNotebook( this, wxID_ANY,
wxDefaultPosition, wxSize(400,300), wxNO_BORDER );
ctrl->AddPage(CreateHTMLCtrl(ctrl), wxT("Welcome"));
wxPanel *panel = new wxPanel( ctrl, wxID_ANY );
wxFlexGridSizer *flex = new wxFlexGridSizer( 2 );
flex->AddGrowableRow( 0 );