Get rid of unnecessary helper function in the svg sample
No real changes, just remove the trivial CreateNewPage() function which made the code less clear without any real gain.
This commit is contained in:
@@ -62,8 +62,6 @@ public:
|
|||||||
MyFrame(wxWindow *parent, const wxWindowID id, const wxString& title,
|
MyFrame(wxWindow *parent, const wxWindowID id, const wxString& title,
|
||||||
const wxPoint& pos, const wxSize& size);
|
const wxPoint& pos, const wxSize& size);
|
||||||
|
|
||||||
MyPage *CreateNewPage(int index);
|
|
||||||
|
|
||||||
void FileSavePicture(wxCommandEvent& event);
|
void FileSavePicture(wxCommandEvent& event);
|
||||||
void OnAbout(wxCommandEvent& event);
|
void OnAbout(wxCommandEvent& event);
|
||||||
void OnQuit(wxCommandEvent& event);
|
void OnQuit(wxCommandEvent& event);
|
||||||
@@ -148,17 +146,11 @@ MyFrame::MyFrame(wxWindow *parent, const wxWindowID id, const wxString& title,
|
|||||||
{
|
{
|
||||||
wxString svgTitle;
|
wxString svgTitle;
|
||||||
svgTitle.Printf(wxT("SVG Test %d"), i);
|
svgTitle.Printf(wxT("SVG Test %d"), i);
|
||||||
m_notebook->AddPage(CreateNewPage(i), svgTitle);
|
m_notebook->AddPage(new MyPage(m_notebook, i), svgTitle);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MyPage *MyFrame::CreateNewPage(int index)
|
|
||||||
{
|
|
||||||
MyPage *page = new MyPage(m_notebook, index);
|
|
||||||
return page;
|
|
||||||
}
|
|
||||||
|
|
||||||
void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
|
void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
Close();
|
Close();
|
||||||
|
Reference in New Issue
Block a user