git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30789
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
void OnSpinUp( wxSpinEvent &event );
void OnSpinDown( wxSpinEvent &event );
void OnSpinUpdate( wxSpinEvent &event );
void OnSpinUp( wxSpinEvent &event );
void OnSpinDown( wxSpinEvent &event );
void OnSpinUpdate( wxSpinEvent &event );
void OnUpdateShowProgress( wxUpdateUIEvent& event );
void OnShowProgress( wxCommandEvent &event );
void OnUpdateShowProgress( wxUpdateUIEvent& event );
void OnShowProgress( wxCommandEvent &event );
+#endif // wxUSE_PROGRESSDLG
#endif // wxUSE_SPINBTN
#if wxUSE_SPINCTRL
#endif // wxUSE_SPINBTN
#if wxUSE_SPINCTRL
wxComboBox *m_combo;
wxRadioBox *m_radio;
wxComboBox *m_combo;
wxRadioBox *m_radio;
wxGauge *m_gauge,
*m_gaugeVert;
wxGauge *m_gauge,
*m_gaugeVert;
#if wxUSE_SLIDER
wxSlider *m_slider;
#endif // wxUSE_SLIDER
#if wxUSE_SLIDER
wxSlider *m_slider;
#endif // wxUSE_SLIDER
wxButton *m_lbSelectThis;
#if wxUSE_SPINBTN
wxSpinButton *m_spinbutton;
wxButton *m_lbSelectThis;
#if wxUSE_SPINBTN
wxSpinButton *m_spinbutton;
+#endif // wxUSE_PROGRESSDLG
#endif // wxUSE_SPINBTN
#if wxUSE_SPINCTRL
#endif // wxUSE_SPINBTN
#if wxUSE_SPINCTRL
const int ID_SET_FONT = 170;
const int ID_SET_FONT = 170;
const int ID_GAUGE = 180;
const int ID_GAUGE = 180;
#if wxUSE_SLIDER
const int ID_SLIDER = 181;
#endif // wxUSE_SLIDER
const int ID_SPIN = 182;
#if wxUSE_SLIDER
const int ID_SLIDER = 181;
#endif // wxUSE_SLIDER
const int ID_SPIN = 182;
const int ID_BTNPROGRESS = 183;
const int ID_BTNPROGRESS = 183;
+#endif // wxUSE_PROGRESSDLG
const int ID_BUTTON_LABEL = 184;
const int ID_SPINCTRL = 185;
const int ID_BUTTON_LABEL = 184;
const int ID_SPINCTRL = 185;
EVT_SPIN (ID_SPIN, MyPanel::OnSpinUpdate)
EVT_SPIN_UP (ID_SPIN, MyPanel::OnSpinUp)
EVT_SPIN_DOWN (ID_SPIN, MyPanel::OnSpinDown)
EVT_SPIN (ID_SPIN, MyPanel::OnSpinUpdate)
EVT_SPIN_UP (ID_SPIN, MyPanel::OnSpinUp)
EVT_SPIN_DOWN (ID_SPIN, MyPanel::OnSpinDown)
EVT_UPDATE_UI (ID_BTNPROGRESS, MyPanel::OnUpdateShowProgress)
EVT_BUTTON (ID_BTNPROGRESS, MyPanel::OnShowProgress)
EVT_UPDATE_UI (ID_BTNPROGRESS, MyPanel::OnUpdateShowProgress)
EVT_BUTTON (ID_BTNPROGRESS, MyPanel::OnShowProgress)
+#endif // wxUSE_PROGRESSDLG
#endif // wxUSE_SPINBTN
#if wxUSE_SPINCTRL
EVT_SPINCTRL (ID_SPINCTRL, MyPanel::OnSpinCtrl)
#endif // wxUSE_SPINBTN
#if wxUSE_SPINCTRL
EVT_SPINCTRL (ID_SPINCTRL, MyPanel::OnSpinCtrl)
#endif // wxUSE_CHOICE
m_combo = NULL;
m_radio = NULL;
#endif // wxUSE_CHOICE
m_combo = NULL;
m_radio = NULL;
m_gauge = NULL;
m_gaugeVert = NULL;
m_gauge = NULL;
m_gaugeVert = NULL;
#if wxUSE_SLIDER
m_slider = NULL;
#endif // wxUSE_SLIDER
#if wxUSE_SLIDER
m_slider = NULL;
#endif // wxUSE_SLIDER
m_lbSelectThis = NULL;
#if wxUSE_SPINBTN
m_spinbutton = NULL;
m_lbSelectThis = NULL;
#if wxUSE_SPINBTN
m_spinbutton = NULL;
+#endif // wxUSE_PROGRESSDLG
#endif // wxUSE_SPINBTN
#if wxUSE_SPINCTRL
m_spinctrl = NULL;
#endif // wxUSE_SPINBTN
#if wxUSE_SPINCTRL
m_spinctrl = NULL;
- Image_List, Image_Choice, Image_Combo, Image_Text, Image_Radio, Image_Gauge, Image_Max
+ Image_List,
+ Image_Choice,
+ Image_Combo,
+ Image_Text,
+ Image_Radio,
+#if wxUSE_GAUGE
+ Image_Gauge,
+#endif // wxUSE_GAUGE
+ Image_Max
};
// fill the image list
};
// fill the image list
imagelist-> Add( wxBitmap( combo_xpm ));
imagelist-> Add( wxBitmap( text_xpm ));
imagelist-> Add( wxBitmap( radio_xpm ));
imagelist-> Add( wxBitmap( combo_xpm ));
imagelist-> Add( wxBitmap( text_xpm ));
imagelist-> Add( wxBitmap( radio_xpm ));
imagelist-> Add( wxBitmap( gauge_xpm ));
imagelist-> Add( wxBitmap( gauge_xpm ));
m_book->SetImageList(imagelist);
#elif defined(__WXMSW__)
// load images from resources
enum
{
m_book->SetImageList(imagelist);
#elif defined(__WXMSW__)
// load images from resources
enum
{
- Image_List, Image_Choice, Image_Combo, Image_Text, Image_Radio, Image_Gauge, Image_Max
+ Image_List,
+ Image_Choice,
+ Image_Combo,
+ Image_Text,
+ Image_Radio,
+#if wxUSE_GAUGE
+ Image_Gauge,
+#endif // wxUSE_GAUGE
+ Image_Max
};
wxImageList *imagelist = new wxImageList(16, 16, false, Image_Max);
static const wxChar *s_iconNames[Image_Max] =
{
};
wxImageList *imagelist = new wxImageList(16, 16, false, Image_Max);
static const wxChar *s_iconNames[Image_Max] =
{
- _T("list"), _T("choice"), _T("combo"), _T("text"), _T("radio"),
- _T("gauge")
+ _T("list")
+ , _T("choice")
+ , _T("combo")
+ , _T("text")
+ , _T("radio")
+#if wxUSE_GAUGE
+ , _T("gauge")
+#endif // wxUSE_GAUGE
};
for ( size_t n = 0; n < Image_Max; n++ )
};
for ( size_t n = 0; n < Image_Max; n++ )
#define Image_Combo -1
#define Image_Text -1
#define Image_Radio -1
#define Image_Combo -1
#define Image_Text -1
#define Image_Radio -1
#define Image_Max -1
#endif
#define Image_Max -1
#endif
m_spinbutton->SetRange(-40,30);
m_spinbutton->SetValue(initialSpinValue);
m_spinbutton->SetRange(-40,30);
m_spinbutton->SetValue(initialSpinValue);
m_btnProgress = new wxButton( panel, ID_BTNPROGRESS, _T("&Show progress dialog"),
wxPoint(300, 160) );
m_btnProgress = new wxButton( panel, ID_BTNPROGRESS, _T("&Show progress dialog"),
wxPoint(300, 160) );
+#endif // wxUSE_PROGRESSDLG
#endif // wxUSE_SPINBTN
#if wxUSE_SPINCTRL
#endif // wxUSE_SPINBTN
#if wxUSE_SPINCTRL
void MyPanel::OnSliderUpdate( wxCommandEvent &WXUNUSED(event) )
{
void MyPanel::OnSliderUpdate( wxCommandEvent &WXUNUSED(event) )
{
m_gauge->SetValue( m_slider->GetValue() );
m_gaugeVert->SetValue( m_slider->GetValue() / 2 );
m_gauge->SetValue( m_slider->GetValue() );
m_gaugeVert->SetValue( m_slider->GetValue() / 2 );
m_text->AppendText(value);
}
m_text->AppendText(value);
}
void MyPanel::OnUpdateShowProgress( wxUpdateUIEvent& event )
{
event.Enable( m_spinbutton->GetValue() > 0 );
void MyPanel::OnUpdateShowProgress( wxUpdateUIEvent& event )
{
event.Enable( m_spinbutton->GetValue() > 0 );
+#endif // wxUSE_PROGRESSDLG
#endif // wxUSE_SPINBTN
void MyPanel::OnSizerCheck( wxCommandEvent &event)
#endif // wxUSE_SPINBTN
void MyPanel::OnSizerCheck( wxCommandEvent &event)