]> git.saurik.com Git - wxWidgets.git/commitdiff
Added wrappers for the missing wxSpinEvent, which fixes the deadlock
authorRobin Dunn <robin@alldunn.com>
Thu, 15 Jan 2004 01:04:38 +0000 (01:04 +0000)
committerRobin Dunn <robin@alldunn.com>
Thu, 15 Jan 2004 01:04:38 +0000 (01:04 +0000)
when trying to catch events from wxSpinButton.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25175 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/src/_controls_rename.i
wxPython/src/_event.i
wxPython/src/_spin.i

index 6eae0ff8634213608f375c3ba77c3d7d544fdcfa..c3207198fb87e32d9fa00d523d16bd7820dc2078 100644 (file)
@@ -77,6 +77,7 @@
 %rename(SP_WRAP)                            wxSP_WRAP;
 %rename(SpinButton)                         wxSpinButton;
 %rename(SpinCtrl)                           wxSpinCtrl;
+%rename(SpinEvent)                          wxSpinEvent;
 %rename(RadioBox)                           wxRadioBox;
 %rename(RadioButton)                        wxRadioButton;
 %rename(Slider)                             wxSlider;
index 877fab6d122e3b5568240a28fa850d025e501d0c..3ddc61936a0777eaa7e4385e058afd34274a6d21 100644 (file)
@@ -314,10 +314,6 @@ EVT_COMMAND_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK, 1)
 EVT_COMMAND_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE, 1)
 EVT_COMMAND_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL, 1)
 
-EVT_SPIN_UP   = wx.PyEventBinder( wxEVT_SCROLL_LINEUP, 1)
-EVT_SPIN_DOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN, 1)
-EVT_SPIN      = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK, 1)
-
 EVT_BUTTON = wx.PyEventBinder( wxEVT_COMMAND_BUTTON_CLICKED, 1)
 EVT_CHECKBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKBOX_CLICKED, 1)
 EVT_CHOICE = wx.PyEventBinder( wxEVT_COMMAND_CHOICE_SELECTED, 1)
index c092ec83036396c4c8669aab291079f05c2d1e02..0045d2733d37ec75f497b6c87e6d4995c3687ad4 100644 (file)
@@ -120,11 +120,27 @@ public:
 };
 
 
+//---------------------------------------------------------------------------
+
+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);
+};
+
+
 %constant wxEventType wxEVT_COMMAND_SPINCTRL_UPDATED;
 
 
 %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)
 }