X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/32b8ec418aee4e38877d4cb79e2984c766dcc358..19e30148e18cc99296b26503c155e5cef59045f4:/samples/widgets/widgets.cpp diff --git a/samples/widgets/widgets.cpp b/samples/widgets/widgets.cpp index ff4cee53d8..af1bb21272 100644 --- a/samples/widgets/widgets.cpp +++ b/samples/widgets/widgets.cpp @@ -28,7 +28,6 @@ #ifndef WX_PRECOMP #include "wx/app.h" #include "wx/log.h" - #include "wx/panel.h" #include "wx/frame.h" #include "wx/button.h" #include "wx/checkbox.h" @@ -173,13 +172,6 @@ WX_DEFINE_ARRAY(WidgetsPage *, ArrayWidgetsPage); IMPLEMENT_APP(WidgetsApp) -#ifdef __WXUNIVERSAL__ - #include "wx/univ/theme.h" - - WX_USE_THEME(win32); - WX_USE_THEME(gtk); -#endif // __WXUNIVERSAL__ - // ---------------------------------------------------------------------------- // event tables // ---------------------------------------------------------------------------- @@ -199,19 +191,27 @@ END_EVENT_TABLE() bool WidgetsApp::OnInit() { + if ( !wxApp::OnInit() ) + return FALSE; + // the reason for having these ifdef's is that I often run two copies of // this sample side by side and it is useful to see which one is which - wxString title = + wxString title; #if defined(__WXUNIVERSAL__) - _T("wxUniv") -#elif defined(__WXMSW__) - _T("wxMSW") + title = _T("wxUniv/"); +#endif + +#if defined(__WXMSW__) + title += _T("wxMSW"); #elif defined(__WXGTK__) - _T("wxGTK") + title += _T("wxGTK"); +#elif defined(__WXMAC__) + title += _T("wxMAC"); +#elif defined(__WXMOTIF__) + title += _T("wxMOTIF"); #else - _T("wxWindows") + title += _T("wxWindows"); #endif - ; wxFrame *frame = new WidgetsFrame(title + _T(" widgets demo")); frame->Show(); @@ -255,6 +255,8 @@ WidgetsFrame::WidgetsFrame(const wxString& title) ); m_lboxLog = new wxListBox(m_panel, -1); sizerDown->Add(m_lboxLog, 1, wxGROW | wxALL, 5); + sizerDown->SetMinSize(100, 150); + wxBoxSizer *sizerBtns = new wxBoxSizer(wxHORIZONTAL); wxButton *btn = new wxButton(m_panel, Widgets_ClearLog, _T("Clear &log")); sizerBtns->Add(btn);