+ wrapping_sizer->Add( m_wrappingText );
+
+ wxStaticBoxSizer *non_wrapping_sizer = new wxStaticBoxSizer( wxVERTICAL, panel, wxT("Non-wrapping") );
+ main_sizer->Add( non_wrapping_sizer, 0, wxALL, 5 );
+
+ m_nonWrappingText = new wxStaticText( panel, wxID_ANY,
+ _T("This static text has two lines.\nThey do not wrap."),
+ wxDefaultPosition,
+ wxDefaultSize
+ );
+ non_wrapping_sizer->Add( m_nonWrappingText );
+
+ (void)new wxButton( panel, ID_BTNNEWTEXT, wxT("New text"), wxPoint(450, 160) );
+
+ int initialSpinValue = -5;
+ wxString s;
+ s << initialSpinValue;
+ m_spintext = new wxTextCtrl( panel, wxID_ANY, s, wxPoint(20,160), wxSize(80,wxDefaultCoord) );
+#if wxUSE_SPINBTN
+ m_spinbutton = new wxSpinButton( panel, ID_SPIN, wxPoint(103,160) );
+ m_spinbutton->SetRange(-40,30);
+ m_spinbutton->SetValue(initialSpinValue);
+
+#if wxUSE_PROGRESSDLG
+ m_btnProgress = new wxButton( panel, ID_BTNPROGRESS, _T("&Show progress dialog"),
+ wxPoint(300, 160) );
+#endif // wxUSE_PROGRESSDLG
+#endif // wxUSE_SPINBTN
+
+#if wxUSE_SPINCTRL
+ m_spinctrl = new wxSpinCtrl( panel, ID_SPINCTRL, wxEmptyString, wxPoint(200, 160), wxSize(80, wxDefaultCoord) );
+ //m_spinctrl->SetRange(10,30);
+ m_spinctrl->SetValue(15);
+#endif // wxUSE_SPINCTRL
+
+ m_book->AddPage(panel, _T("wxGauge"), false, Image_Gauge);
+#endif // wxUSE_SLIDER && wxUSE_GAUGE
+
+
+ panel = new wxPanel(m_book);
+
+#if !defined(__WXMOTIF__) // wxStaticBitmap not working under Motif yet.
+ wxIcon icon = wxArtProvider::GetIcon(wxART_INFORMATION);
+ (void) new wxStaticBitmap( panel, wxID_ANY, icon, wxPoint(10, 10) );
+
+ // VZ: don't leak memory
+ // bmpStatic = new wxStaticBitmap(panel, wxID_ANY, wxNullIcon, wxPoint(50, 10));
+ // bmpStatic->SetIcon(wxArtProvider::GetIcon(wxART_QUESTION));
+#endif // !Motif
+
+ wxBitmap bitmap( 100, 100 );
+ wxMemoryDC dc;
+ dc.SelectObject( bitmap );
+ dc.SetBackground(*wxGREEN);
+ dc.SetPen(*wxRED_PEN);
+ dc.Clear();
+ dc.DrawEllipse(5, 5, 90, 90);
+ dc.DrawText(_T("Bitmap"), 30, 40);
+ dc.SelectObject( wxNullBitmap );
+
+ (void)new wxBitmapButton(panel, ID_BITMAP_BTN, bitmap, wxPoint(100, 20));
+ (void)new wxToggleButton(panel, ID_BITMAP_BTN_ENABLE,
+ _T("Enable/disable &bitmap"), wxPoint(100, 140));
+
+#if defined(__WXMSW__) || defined(__WXMOTIF__)
+ // test for masked bitmap display
+ bitmap = wxBitmap(_T("test2.bmp"), wxBITMAP_TYPE_BMP);
+ if (bitmap.Ok())
+ {
+ bitmap.SetMask(new wxMask(bitmap, *wxBLUE));
+
+ (void)new wxStaticBitmap(panel, wxID_ANY, bitmap, wxPoint(300, 120));
+ }
+#endif
+
+ wxBitmap bmp1(wxArtProvider::GetBitmap(wxART_INFORMATION)),
+ bmp2(wxArtProvider::GetBitmap(wxART_WARNING)),
+ bmp3(wxArtProvider::GetBitmap(wxART_QUESTION));
+ wxBitmapButton *bmpBtn = new wxBitmapButton
+ (
+ panel, wxID_ANY,
+ bmp1,
+ wxPoint(30, 70)
+ );
+
+ bmpBtn->SetBitmapSelected(bmp2);
+ bmpBtn->SetBitmapFocus(bmp3);
+
+ (void)new wxToggleButton(panel, ID_BUTTON_LABEL,
+ _T("&Toggle label"), wxPoint(250, 20));
+
+ m_label = new wxStaticText(panel, wxID_ANY, _T("Label with some long text"),
+ wxPoint(250, 60), wxDefaultSize,
+ wxALIGN_RIGHT /*| wxST_NO_AUTORESIZE*/);
+ m_label->SetForegroundColour( *wxBLUE );
+
+ m_book->AddPage(panel, _T("wxBitmapXXX"));
+
+ // sizer
+ panel = new wxPanel(m_book);
+ panel->SetAutoLayout( true );
+
+ wxBoxSizer *sizer = new wxBoxSizer( wxVERTICAL );
+
+ wxStaticBoxSizer *csizer =
+ new wxStaticBoxSizer (new wxStaticBox (panel, wxID_ANY, _T("Show Buttons")), wxHORIZONTAL );
+
+ wxCheckBox *check1, *check2, *check3, *check4, *check14, *checkBig;
+ check1 = new wxCheckBox (panel, ID_SIZER_CHECK1, _T("1"));
+ check1->SetValue (true);
+ csizer->Add (check1);
+ check2 = new wxCheckBox (panel, ID_SIZER_CHECK2, _T("2"));
+ check2->SetValue (true);
+ csizer->Add (check2);
+ check3 = new wxCheckBox (panel, ID_SIZER_CHECK3, _T("3"));
+ check3->SetValue (true);
+ csizer->Add (check3);
+ check4 = new wxCheckBox (panel, ID_SIZER_CHECK4, _T("4"));
+ check4->SetValue (true);
+ csizer->Add (check4);
+ check14 = new wxCheckBox (panel, ID_SIZER_CHECK14, _T("1-4"));
+ check14->SetValue (true);
+ csizer->Add (check14);
+ checkBig = new wxCheckBox (panel, ID_SIZER_CHECKBIG, _T("Big"));
+ checkBig->SetValue (true);
+ csizer->Add (checkBig);
+
+ sizer->Add (csizer);
+
+ m_hsizer = new wxBoxSizer( wxHORIZONTAL );
+
+ m_buttonSizer = new wxBoxSizer (wxVERTICAL);
+
+ m_sizerBtn1 = new wxButton(panel, wxID_ANY, _T("Test Button &1 (tab order 1)") );
+ m_buttonSizer->Add( m_sizerBtn1, 0, wxALL, 10 );
+ m_sizerBtn2 = new wxButton(panel, wxID_ANY, _T("Test Button &2 (tab order 3)") );
+ m_buttonSizer->Add( m_sizerBtn2, 0, wxALL, 10 );
+ m_sizerBtn3 = new wxButton(panel, wxID_ANY, _T("Test Button &3 (tab order 2)") );
+ m_buttonSizer->Add( m_sizerBtn3, 0, wxALL, 10 );
+ m_sizerBtn4 = new wxButton(panel, wxID_ANY, _T("Test Button &4 (tab order 4)") );
+ m_buttonSizer->Add( m_sizerBtn4, 0, wxALL, 10 );
+
+ m_sizerBtn3->MoveBeforeInTabOrder(m_sizerBtn2);
+
+ m_hsizer->Add (m_buttonSizer);
+ m_hsizer->Add( 20,20, 1 );
+ m_bigBtn = new wxButton(panel, wxID_ANY, _T("Multiline\nbutton") );
+ m_hsizer->Add( m_bigBtn , 3, wxGROW|wxALL, 10 );
+
+ sizer->Add (m_hsizer, 1, wxGROW);
+
+ panel->SetSizer( sizer );
+
+ m_book->AddPage(panel, _T("wxSizer"));
+
+ // set the sizer for the panel itself
+ sizer = new wxBoxSizer(wxVERTICAL);
+ sizer->Add(m_book, wxSizerFlags().Border().Expand());
+ sizer->Add(m_text, wxSizerFlags(1).Border().Expand());
+ SetSizer(sizer);