1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: SWIG interface defs for wxSlider
7 // Created: 10-June-1998
9 // Copyright: (c) 2003 by Total Control Software
10 // Licence: wxWindows license
11 /////////////////////////////////////////////////////////////////////////////
16 //---------------------------------------------------------------------------
19 #include <wx/slider.h>
23 MAKE_CONST_WXSTRING(SliderNameStr);
25 //---------------------------------------------------------------------------
43 MustHaveApp(wxSlider);
45 class wxSlider : public wxControl {
47 %pythonPrepend wxSlider "if kwargs.has_key('point'): kwargs['pos'] = kwargs['point'];del kwargs['point']"
48 %pythonPrepend wxSlider() ""
49 %pythonAppend wxSlider "self._setOORInfo(self)"
50 %pythonAppend wxSlider() ""
52 wxSlider(wxWindow* parent, wxWindowID id=-1,
53 int value=0, int minValue=0, int maxValue=100,
54 const wxPoint& pos = wxDefaultPosition,
55 const wxSize& size = wxDefaultSize,
56 long style = wxSL_HORIZONTAL,
57 const wxValidator& validator = wxDefaultValidator,
58 const wxString& name = wxPySliderNameStr);
59 %RenameCtor(PreSlider, wxSlider());
61 bool Create(wxWindow* parent, wxWindowID id=-1,
62 int value=0, int minValue=0, int maxValue=100,
63 const wxPoint& pos = wxDefaultPosition,
64 const wxSize& size = wxDefaultSize,
65 long style = wxSL_HORIZONTAL,
66 const wxValidator& validator = wxDefaultValidator,
67 const wxString& name = wxPySliderNameStr);
69 // get/set the current slider value (should be in range)
70 virtual int GetValue() const;
71 virtual void SetValue(int value);
73 // retrieve/change the range
74 virtual void SetRange(int minValue, int maxValue);
75 virtual int GetMin() const;
76 virtual int GetMax() const;
78 void SetMin( int minValue );
79 void SetMax( int maxValue );
81 // the line/page size is the increment by which the slider moves when
82 // cursor arrow key/page up or down are pressed (clicking the mouse is like
83 // pressing PageUp/Down) and are by default set to 1 and 1/10 of the range
84 virtual void SetLineSize(int lineSize);
85 virtual void SetPageSize(int pageSize);
86 virtual int GetLineSize() const;
87 virtual int GetPageSize() const;
89 // these methods get/set the length of the slider pointer in pixels
90 virtual void SetThumbLength(int lenPixels);
91 virtual int GetThumbLength() const;
93 virtual void SetTickFreq(int n, int pos=1);
94 virtual int GetTickFreq() const;
95 virtual void ClearTicks();
96 virtual void SetTick(int tickPos);
98 virtual void ClearSel();
99 virtual int GetSelEnd() const;
100 virtual int GetSelStart() const;
101 virtual void SetSelection(int min, int max);
104 static wxVisualAttributes
105 GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
108 //---------------------------------------------------------------------------