]> git.saurik.com Git - wxWidgets.git/blob - wxPython/src/_slider.i
Added typemap for wxIndex*
[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 enum {
29 wxSL_HORIZONTAL,
30 wxSL_VERTICAL,
31 wxSL_AUTOTICKS,
32 wxSL_LABELS,
33 wxSL_LEFT,
34 wxSL_TOP,
35 wxSL_RIGHT,
36 wxSL_BOTTOM,
37 wxSL_BOTH,
38 wxSL_SELRANGE,
39 wxSL_INVERSE
40 };
41
42
43 MustHaveApp(wxSlider);
44
45 class wxSlider : public wxControl {
46 public:
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() ""
51
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());
60
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);
68
69 // get/set the current slider value (should be in range)
70 virtual int GetValue() const;
71 virtual void SetValue(int value);
72
73 // retrieve/change the range
74 virtual void SetRange(int minValue, int maxValue);
75 virtual int GetMin() const;
76 virtual int GetMax() const;
77
78 void SetMin( int minValue );
79 void SetMax( int maxValue );
80
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;
88
89 // these methods get/set the length of the slider pointer in pixels
90 virtual void SetThumbLength(int lenPixels);
91 virtual int GetThumbLength() const;
92
93 virtual void SetTickFreq(int n, int pos=1);
94 virtual int GetTickFreq() const;
95 virtual void ClearTicks();
96 virtual void SetTick(int tickPos);
97
98 virtual void ClearSel();
99 virtual int GetSelEnd() const;
100 virtual int GetSelStart() const;
101 virtual void SetSelection(int min, int max);
102
103
104 static wxVisualAttributes
105 GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
106 };
107
108 //---------------------------------------------------------------------------