X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/01ca9e8ea7d4c6f00bd46653b96857998be0ae83..6c41903ced78c0b4115785aa80a934833abbc1ef:/samples/minimal/minimal.cpp diff --git a/samples/minimal/minimal.cpp b/samples/minimal/minimal.cpp index 8a7835efe4..d51eb10f59 100644 --- a/samples/minimal/minimal.cpp +++ b/samples/minimal/minimal.cpp @@ -16,9 +16,10 @@ // ---------------------------------------------------------------------------- // headers // ---------------------------------------------------------------------------- + #ifdef __GNUG__ - #pragma implementation "minimal.cpp" - #pragma interface "minimal.cpp" +// #pragma implementation "minimal.cpp" +// #pragma interface "minimal.cpp" #endif // For compilers that support precompilation, includes "wx/wx.h". @@ -29,16 +30,16 @@ #endif // for all others, include the necessary headers (this file is usually all you -// need because it includes almost all "standard" wxWindows headers +// need because it includes almost all "standard" wxWindows headers) #ifndef WX_PRECOMP #include "wx/wx.h" #endif // ---------------------------------------------------------------------------- -// ressources +// resources // ---------------------------------------------------------------------------- // the application icon -#if defined(__WXGTK__) || defined(__WXMOTIF__) +#if defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXMAC__) #include "mondrian.xpm" #endif @@ -106,6 +107,7 @@ END_EVENT_TABLE() // not wxApp) IMPLEMENT_APP(MyApp) + // ============================================================================ // implementation // ============================================================================ @@ -114,7 +116,7 @@ IMPLEMENT_APP(MyApp) // the application class // ---------------------------------------------------------------------------- -// `Main program' equivalent: the program execution "starts" here +// 'Main program' equivalent: the program execution "starts" here bool MyApp::OnInit() { // create the main application window @@ -148,6 +150,7 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size) // set the frame icon SetIcon(wxICON(mondrian)); +#if wxUSE_MENUS // create a menu bar wxMenu *menuFile = new wxMenu("", wxMENU_TEAROFF); @@ -164,24 +167,7 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size) // ... and attach this menu bar to the frame SetMenuBar(menuBar); - - wxPanel *panel = new wxPanel(this, -1); - wxStaticBox *box = new wxStaticBox(panel, -1, "box"); - wxComboBox *combo = new wxComboBox(panel, -1, "combo"); - wxLayoutConstraints *c; - c = new wxLayoutConstraints; - c->left.SameAs(panel, wxLeft); - c->right.SameAs(panel, wxRight); - c->top.SameAs(panel, wxTop); - c->bottom.SameAs(panel, wxBottom); - box->SetConstraints(c); - c = new wxLayoutConstraints; - c->left.SameAs(box, wxLeft, 20); - c->right.SameAs(box, wxRight, 10); - c->top.SameAs(box, wxTop, 10); - c->bottom.SameAs(box, wxBottom, 10); - combo->SetConstraints(c); - panel->SetAutoLayout(TRUE); +#endif // wxUSE_MENUS #if wxUSE_STATUSBAR // create a status bar just for fun (by default with 1 pane only)