// resources
// --------------------------------------------------------------------------
-#if defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXMAC__) || defined(__WXMGL__) || defined(__WXX11__)
+#ifndef wxHAS_IMAGES_IN_RESOURCES
// application icon
#include "mondrian.xpm"
// some shortcuts
#define ADD_TOOL(id, bmp, tooltip, help) \
- toolBar->AddTool(id, bmp, wxNullBitmap, false, wxDefaultCoord, wxDefaultCoord, (wxObject *)NULL, tooltip, help)
+ toolBar->AddTool(id, wxEmptyString, bmp, wxNullBitmap, wxITEM_NORMAL, tooltip, help)
// --------------------------------------------------------------------------
// create the main application window
LifeFrame *frame = new LifeFrame();
- // show it and tell the application that it's our main window
+ // show it
frame->Show(true);
- SetTopWindow(frame);
// just for Motif
#ifdef __WXMOTIF__
toolBar->AddSeparator();
#endif // __POCKETPC__
ADD_TOOL(ID_START, tbBitmaps[5], _("Start"), _("Start"));
- ADD_TOOL(wxID_STOP, tbBitmaps[6], wxSTOCK_NOFLAGS, _("Stop"));
+ ADD_TOOL(wxID_STOP, tbBitmaps[6], _("Stop"), _("Stop"));
toolBar->Realize();
toolBar->EnableTool(wxID_STOP, false); // must be after Realize() !
{
wxString msg;
- msg.Printf(_(" Generation: %u (T: %u ms), Population: %u "),
+ msg.Printf(_(" Generation: %lu (T: %lu ms), Population: %lu "),
m_tics,
m_topspeed? 0 : m_interval,
- m_life->GetNumCells());
+ static_cast<unsigned long>(m_life->GetNumCells()));
m_text->SetLabel(msg);
}
// canvas constructor
LifeCanvas::LifeCanvas(wxWindow *parent, Life *life, bool interactive)
: wxWindow(parent, wxID_ANY, wxDefaultPosition, wxSize(100, 100),
- wxFULL_REPAINT_ON_RESIZE
+ wxFULL_REPAINT_ON_RESIZE | wxHSCROLL | wxVSCROLL
#if !defined(__SMARTPHONE__) && !defined(__POCKETPC__)
|wxSUNKEN_BORDER
#else