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 //---------------------------------------------------------------------------
28 MustHaveApp(wxSlider);
30 class wxSlider : public wxControl {
32 %pythonPrepend wxSlider "if kwargs.has_key('point'): kwargs['pos'] = kwargs['point'];del kwargs['point']"
33 %pythonPrepend wxSlider() ""
34 %pythonAppend wxSlider "self._setOORInfo(self)"
35 %pythonAppend wxSlider() ""
37 wxSlider(wxWindow* parent, wxWindowID id=-1,
38 int value=0, int minValue=0, int maxValue=100,
39 const wxPoint& pos = wxDefaultPosition,
40 const wxSize& size = wxDefaultSize,
41 long style = wxSL_HORIZONTAL,
42 const wxValidator& validator = wxDefaultValidator,
43 const wxString& name = wxPySliderNameStr);
44 %RenameCtor(PreSlider, wxSlider());
46 bool Create(wxWindow* parent, wxWindowID id=-1,
47 int value=0, int minValue=0, int maxValue=100,
48 const wxPoint& pos = wxDefaultPosition,
49 const wxSize& size = wxDefaultSize,
50 long style = wxSL_HORIZONTAL,
51 const wxValidator& validator = wxDefaultValidator,
52 const wxString& name = wxPySliderNameStr);
54 // get/set the current slider value (should be in range)
55 virtual int GetValue() const;
56 virtual void SetValue(int value);
58 // retrieve/change the range
59 virtual void SetRange(int minValue, int maxValue);
60 virtual int GetMin() const;
61 virtual int GetMax() const;
63 void SetMin( int minValue );
64 void SetMax( int maxValue );
66 // the line/page size is the increment by which the slider moves when
67 // cursor arrow key/page up or down are pressed (clicking the mouse is like
68 // pressing PageUp/Down) and are by default set to 1 and 1/10 of the range
69 virtual void SetLineSize(int lineSize);
70 virtual void SetPageSize(int pageSize);
71 virtual int GetLineSize() const;
72 virtual int GetPageSize() const;
74 // these methods get/set the length of the slider pointer in pixels
75 virtual void SetThumbLength(int lenPixels);
76 virtual int GetThumbLength() const;
78 virtual void SetTickFreq(int n, int pos=1);
79 virtual int GetTickFreq() const;
80 virtual void ClearTicks();
81 virtual void SetTick(int tickPos);
83 virtual void ClearSel();
84 virtual int GetSelEnd() const;
85 virtual int GetSelStart() const;
86 virtual void SetSelection(int min, int max);
89 static wxVisualAttributes
90 GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
93 //---------------------------------------------------------------------------