+void MyFrame::OnSize(wxSizeEvent&
+ #ifdef __WXUNIVERSAL__
+ event
+ #else
+ WXUNUSED(event)
+ #endif
+ )
+{
+ int w, h;
+ GetClientSize(&w, &h);
+
+ textWindow->SetSize(0, 0, 200, h);
+ GetClientWindow()->SetSize(200, 0, w - 200, h);
+
+ // FIXME: On wxX11, we need the MDI frame to process this
+ // event, but on other platforms this should not
+ // be done.
+#ifdef __WXUNIVERSAL__
+ event.Skip();
+#endif
+}
+
+#if wxUSE_TOOLBAR
+void MyFrame::InitToolBar(wxToolBar* toolBar)
+{
+ wxBitmap bitmaps[8];
+
+ bitmaps[0] = wxBitmap( new_xpm );
+ bitmaps[1] = wxBitmap( open_xpm );
+ bitmaps[2] = wxBitmap( save_xpm );
+ bitmaps[3] = wxBitmap( copy_xpm );
+ bitmaps[4] = wxBitmap( cut_xpm );
+ bitmaps[5] = wxBitmap( paste_xpm );
+ bitmaps[6] = wxBitmap( print_xpm );
+ bitmaps[7] = wxBitmap( help_xpm );
+
+ toolBar->AddTool(MDI_NEW_WINDOW, _T("New"), bitmaps[0], _T("New file"));
+ toolBar->AddTool(1, _T("Open"), bitmaps[1], _T("Open file"));
+ toolBar->AddTool(2, _T("Save"), bitmaps[2], _T("Save file"));
+ toolBar->AddSeparator();
+ toolBar->AddTool(3, _T("Copy"), bitmaps[3], _T("Copy"));
+ toolBar->AddTool(4, _T("Cut"), bitmaps[4], _T("Cut"));
+ toolBar->AddTool(5, _T("Paste"), bitmaps[5], _T("Paste"));
+ toolBar->AddSeparator();
+ toolBar->AddTool(6, _T("Print"), bitmaps[6], _T("Print"));
+ toolBar->AddSeparator();
+ toolBar->AddTool(MDI_ABOUT, _T("About"), bitmaps[7], _T("Help"));
+
+ toolBar->Realize();
+}
+#endif // wxUSE_TOOLBAR
+
+// ---------------------------------------------------------------------------
+// MyCanvas
+// ---------------------------------------------------------------------------