]> git.saurik.com Git - wxWidgets.git/blob - wxPython/src/_slider.i
Added
[wxWidgets.git] / wxPython / src / _slider.i
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: _slider.i
3 // Purpose: SWIG interface defs for wxSlider
4 //
5 // Author: Robin Dunn
6 //
7 // Created: 10-June-1998
8 // RCS-ID: $Id$
9 // Copyright: (c) 2003 by Total Control Software
10 // Licence: wxWindows license
11 /////////////////////////////////////////////////////////////////////////////
12
13 // Not a %module
14
15
16 //---------------------------------------------------------------------------
17
18 %{
19 #include <wx/slider.h>
20
21 %}
22
23 MAKE_CONST_WXSTRING(SliderNameStr);
24
25 //---------------------------------------------------------------------------
26 %newgroup
27
28 MustHaveApp(wxSlider);
29
30 class wxSlider : public wxControl {
31 public:
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() ""
36
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 %name(PreSlider)wxSlider();
45
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);
53
54 // get/set the current slider value (should be in range)
55 virtual int GetValue() const;
56 virtual void SetValue(int value);
57
58 // retrieve/change the range
59 virtual void SetRange(int minValue, int maxValue);
60 virtual int GetMin() const;
61 virtual int GetMax() const;
62
63 void SetMin( int minValue );
64 void SetMax( int maxValue );
65
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;
73
74 // these methods get/set the length of the slider pointer in pixels
75 virtual void SetThumbLength(int lenPixels);
76 virtual int GetThumbLength() const;
77
78 virtual void SetTickFreq(int n, int pos=1);
79 virtual int GetTickFreq() const;
80 virtual void ClearTicks();
81 virtual void SetTick(int tickPos);
82
83 virtual void ClearSel();
84 virtual int GetSelEnd() const;
85 virtual int GetSelStart() const;
86 virtual void SetSelection(int min, int max);
87
88
89 static wxVisualAttributes
90 GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
91 };
92
93 //---------------------------------------------------------------------------