From e4535381d59f63c50a3cad363ab62be81c8e8cbe Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Mon, 7 Feb 2005 14:55:41 +0000 Subject: [PATCH] Life! made more WinCE-friendly git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31819 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- demos/life/life.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/demos/life/life.cpp b/demos/life/life.cpp index ca0e56200d..023237c41b 100644 --- a/demos/life/life.cpp +++ b/demos/life/life.cpp @@ -184,7 +184,7 @@ bool LifeApp::OnInit() // frame constructor LifeFrame::LifeFrame() : wxFrame( (wxFrame *) NULL, wxID_ANY, - _("Life!"), wxPoint(200, 200) ) + _("Life!"), wxDefaultPosition ) { // frame icon SetIcon(wxICON(mondrian)); @@ -248,6 +248,9 @@ LifeFrame::LifeFrame() : wxFrame( (wxFrame *) NULL, wxID_ANY, ADD_TOOL(wxID_NEW, tbBitmaps[0], wxGetStockLabel(wxID_NEW, false), _("Start a new game")); ADD_TOOL(wxID_OPEN, tbBitmaps[1], wxGetStockLabel(wxID_OPEN, false), _("Open an existing Life pattern")); + + // PocketPC only works with standard identifiers, and there's restricted space +#ifndef __POCKETPC__ toolBar->AddSeparator(); ADD_TOOL(wxID_ZOOM_IN, tbBitmaps[2], wxGetStockLabel(wxID_ZOOM_IN, false), _("Zoom in")); ADD_TOOL(wxID_ZOOM_OUT, tbBitmaps[3], wxGetStockLabel(wxID_ZOOM_OUT, false), _("Zoom out")); @@ -255,6 +258,7 @@ LifeFrame::LifeFrame() : wxFrame( (wxFrame *) NULL, wxID_ANY, toolBar->AddSeparator(); ADD_TOOL(ID_START, tbBitmaps[5], _("Start"), _("Start")); ADD_TOOL(wxID_STOP, tbBitmaps[6], wxGetStockLabel(wxID_STOP, false), _("Stop")); +#endif toolBar->Realize(); toolBar->EnableTool(wxID_STOP, false); // must be after Realize() ! @@ -323,10 +327,12 @@ LifeFrame::LifeFrame() : wxFrame( (wxFrame *) NULL, wxID_ANY, sizer3->Add( panel1, 1, wxGROW ); sizer3->Add( panel2, 0, wxGROW ); SetSizer( sizer3 ); +#ifndef __WXWINCE__ sizer3->Fit( this ); // set minimum frame size sizer3->SetSizeHints( this ); +#endif // navigator frame m_navigator = new LifeNavigator(this); -- 2.45.2