X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b2dc104421c340091342156d6b01f61f1ccff438..015fd9ef4833ec3d8b0043a1c7e448c8be4f734a:/wxPython/src/_slider.i diff --git a/wxPython/src/_slider.i b/wxPython/src/_slider.i index 21bae7b0ed..6ecb209afe 100644 --- a/wxPython/src/_slider.i +++ b/wxPython/src/_slider.i @@ -25,23 +25,27 @@ MAKE_CONST_WXSTRING(SliderNameStr); //--------------------------------------------------------------------------- %newgroup +MustHaveApp(wxSlider); + class wxSlider : public wxControl { public: - %addtofunc wxSlider "self._setOORInfo(self)" - %addtofunc wxSlider() "" - - wxSlider(wxWindow* parent, wxWindowID id, - int value, int minValue, int maxValue, - const wxPoint& point = wxDefaultPosition, + %pythonPrepend wxSlider "if kwargs.has_key('point'): kwargs['pos'] = kwargs['point'];del kwargs['point']" + %pythonPrepend wxSlider() "" + %pythonAppend wxSlider "self._setOORInfo(self)" + %pythonAppend wxSlider() "" + + wxSlider(wxWindow* parent, wxWindowID id=-1, + int value=0, int minValue=0, int maxValue=100, + const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxSL_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxPySliderNameStr); %name(PreSlider)wxSlider(); - bool Create(wxWindow* parent, wxWindowID id, - int value, int minValue, int maxValue, - const wxPoint& point = wxDefaultPosition, + bool Create(wxWindow* parent, wxWindowID id=-1, + int value=0, int minValue=0, int maxValue=100, + const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxSL_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, @@ -71,7 +75,7 @@ public: virtual void SetThumbLength(int lenPixels); virtual int GetThumbLength() const; - virtual void SetTickFreq(int n, int pos); + virtual void SetTickFreq(int n, int pos=1); virtual int GetTickFreq() const; virtual void ClearTicks(); virtual void SetTick(int tickPos); @@ -81,6 +85,9 @@ public: virtual int GetSelStart() const; virtual void SetSelection(int min, int max); + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); }; //---------------------------------------------------------------------------