X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b1dfbb7ad894afb95c58932926540b6972a50567..8715875f72af75123d13bb69d6ec6b185f568ea9:/wxPython/src/_spin.i diff --git a/wxPython/src/_spin.i b/wxPython/src/_spin.i index 0045d2733d..dd8283985c 100644 --- a/wxPython/src/_spin.i +++ b/wxPython/src/_spin.i @@ -38,18 +38,19 @@ enum { // wxSP_VERTICAL: vertical spin button (the default) // wxSP_ARROW_KEYS: arrow keys increment/decrement value // wxSP_WRAP: value wraps at either end +MustHaveApp(wxSpinButton); class wxSpinButton : public wxControl { public: - %addtofunc wxSpinButton "self._setOORInfo(self)" - %addtofunc wxSpinButton() "" + %pythonAppend wxSpinButton "self._setOORInfo(self)" + %pythonAppend wxSpinButton() "" wxSpinButton(wxWindow* parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxSP_HORIZONTAL, const wxString& name = wxPySPIN_BUTTON_NAME); - %name(PreSpinButton)wxSpinButton(); + %RenameCtor(PreSpinButton, wxSpinButton()); bool Create(wxWindow* parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, @@ -68,6 +69,9 @@ public: // is this spin button vertically oriented? bool IsVertical() const; + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); }; @@ -77,11 +81,13 @@ public: // a spin ctrl is a text control with a spin button which is usually used to // prompt the user for a numeric input +MustHaveApp(wxSpinCtrl); + class wxSpinCtrl : public wxControl { public: - %addtofunc wxSpinCtrl "self._setOORInfo(self)" - %addtofunc wxSpinCtrl() "" + %pythonAppend wxSpinCtrl "self._setOORInfo(self)" + %pythonAppend wxSpinCtrl() "" wxSpinCtrl(wxWindow *parent, wxWindowID id = -1, @@ -91,7 +97,7 @@ public: long style = wxSP_ARROW_KEYS, int min = 0, int max = 100, int initial = 0, const wxString& name = wxPySpinCtrlNameStr); - %name(PreSpinCtrl)wxSpinCtrl(); + %RenameCtor(PreSpinCtrl, wxSpinCtrl()); bool Create(wxWindow *parent, wxWindowID id = -1, @@ -104,19 +110,15 @@ public: virtual int GetValue() const; virtual void SetValue( int value ); - %name(SetValueString) void SetValue(const wxString& text); + %Rename(SetValueString, void, SetValue(const wxString& text)); 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 + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); };