//---------------------------------------------------------------------------
-%{
- DECLARE_DEF_STRING(SPIN_BUTTON_NAME);
- wxChar* wxSpinCtrlNameStr = _T("wxSpinCtrl");
- DECLARE_DEF_STRING(SpinCtrlNameStr);
-%}
+MAKE_CONST_WXSTRING(SPIN_BUTTON_NAME);
+MAKE_CONST_WXSTRING2(SpinCtrlNameStr, _T("wxSpinCtrl"));
//---------------------------------------------------------------------------
%newgroup
virtual void SetRange( int minVal, int maxVal );
virtual int GetMin() const;
virtual int GetMax() const;
-#ifdef __WXGTK__
- %extend {
- void SetSelection(long from, long to) {
- }
- }
-#else
void SetSelection(long from, long to);
-#endif
+};
+
+
+//---------------------------------------------------------------------------
+
+class wxSpinEvent : public wxNotifyEvent
+{
+public:
+ wxSpinEvent(wxEventType commandType = wxEVT_NULL, int winid = 0);
+
+ // get the current value of the control
+ int GetPosition() const;
+ void SetPosition(int pos);
};
%pythoncode {
-EVT_SPINCTRL = wx.PyEventBinder( wxEVT_COMMAND_SPINCTRL_UPDATED, 1)
+EVT_SPIN_UP = wx.PyEventBinder( wx.wxEVT_SCROLL_LINEUP, 1)
+EVT_SPIN_DOWN = wx.PyEventBinder( wx.wxEVT_SCROLL_LINEDOWN, 1)
+EVT_SPIN = wx.PyEventBinder( wx.wxEVT_SCROLL_THUMBTRACK, 1)
+EVT_SPINCTRL = wx.PyEventBinder( wxEVT_COMMAND_SPINCTRL_UPDATED, 1)
}