X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d14a1e28567de23c586bc80017073d0c39f8d18f..db679b8c836e69c111cdc31e62cf92cebe4f938f:/wxPython/src/_slider.i diff --git a/wxPython/src/_slider.i b/wxPython/src/_slider.i index f1eb5a9d4c..366f977114 100644 --- a/wxPython/src/_slider.i +++ b/wxPython/src/_slider.i @@ -18,29 +18,50 @@ %{ #include - DECLARE_DEF_STRING(SliderNameStr); %} +MAKE_CONST_WXSTRING(SliderNameStr); + //--------------------------------------------------------------------------- %newgroup +enum { + wxSL_HORIZONTAL, + wxSL_VERTICAL, + wxSL_TICKS, + wxSL_AUTOTICKS, + wxSL_LABELS, + wxSL_LEFT, + wxSL_TOP, + wxSL_RIGHT, + wxSL_BOTTOM, + wxSL_BOTH, + wxSL_SELRANGE, + wxSL_INVERSE +}; + + +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(); + %RenameCtor(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, @@ -70,7 +91,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); @@ -80,6 +101,9 @@ public: virtual int GetSelStart() const; virtual void SetSelection(int min, int max); + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); }; //---------------------------------------------------------------------------