]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/widgets/spinbtn.cpp
Needed adv library for xrcdemo
[wxWidgets.git] / samples / widgets / spinbtn.cpp
index aadc2ffd3058d6ca71df1c5c6cf18007ce378c4f..1082559a93a6390cd94cbd0f74709132fe73b570 100644 (file)
@@ -42,7 +42,7 @@
 #include "wx/sizer.h"
 
 #include "widgets.h"
-#if 1
+#if wxUSE_SPINBTN
 #include "icons/spinbtn.xpm"
 
 // ----------------------------------------------------------------------------
@@ -83,10 +83,10 @@ protected:
 
     void OnCheckOrRadioBox(wxCommandEvent& event);
 
-    void OnSpinBtn(wxCommandEvent& event);
-    void OnSpinBtnUp(wxCommandEvent& event);
-    void OnSpinBtnDown(wxCommandEvent& event);
-    void OnSpinCtrl(wxCommandEvent& event);
+    void OnSpinBtn(wxSpinEvent& event);
+    void OnSpinBtnUp(wxSpinEvent& event);
+    void OnSpinBtnDown(wxSpinEvent& event);
+    void OnSpinCtrl(wxSpinEvent& event);
 
     void OnUpdateUIValueButton(wxUpdateUIEvent& event);
     void OnUpdateUIMinMaxButton(wxUpdateUIEvent& event);
@@ -384,7 +384,7 @@ void SpinBtnWidgetsPage::OnUpdateUIResetButton(wxUpdateUIEvent& event)
     event.Enable( !m_chkVert->GetValue() || m_chkWrap->GetValue() );
 }
 
-void SpinBtnWidgetsPage::OnCheckOrRadioBox(wxCommandEvent& event)
+void SpinBtnWidgetsPage::OnCheckOrRadioBox(wxCommandEvent& WXUNUSED(event))
 {
     CreateSpin();
 }
@@ -394,7 +394,7 @@ void SpinBtnWidgetsPage::OnUpdateUICurValueText(wxUpdateUIEvent& event)
     event.SetText( wxString::Format(_T("%d"), m_spinbtn->GetValue()));
 }
 
-void SpinBtnWidgetsPage::OnSpinBtn(wxCommandEvent& event)
+void SpinBtnWidgetsPage::OnSpinBtn(wxSpinEvent& event)
 {
     int value = event.GetInt();
 
@@ -404,19 +404,19 @@ void SpinBtnWidgetsPage::OnSpinBtn(wxCommandEvent& event)
     wxLogMessage(_T("Spin button value changed, now %d"), value);
 }
 
-void SpinBtnWidgetsPage::OnSpinBtnUp(wxCommandEvent& event)
+void SpinBtnWidgetsPage::OnSpinBtnUp(wxSpinEvent& event)
 {
     wxLogMessage( _T("Spin button value incremented, will be %ld (was %d)"),
                   event.GetInt(), m_spinbtn->GetValue() );
 }
 
-void SpinBtnWidgetsPage::OnSpinBtnDown(wxCommandEvent& event)
+void SpinBtnWidgetsPage::OnSpinBtnDown(wxSpinEvent& event)
 {
     wxLogMessage( _T("Spin button value decremented, will be %ld (was %d)"),
                   event.GetInt(), m_spinbtn->GetValue() );
 }
 
-void SpinBtnWidgetsPage::OnSpinCtrl(wxCommandEvent& event)
+void SpinBtnWidgetsPage::OnSpinCtrl(wxSpinEvent& event)
 {
     if (!m_spinctrl)
         return;
@@ -428,3 +428,4 @@ void SpinBtnWidgetsPage::OnSpinCtrl(wxCommandEvent& event)
     wxLogMessage(_T("Spin control value changed, now %d"), value);
 }
 #endif
+    // wxUSE_SPINBTN