]> git.saurik.com Git - wxWidgets.git/blame - wxPython/src/_slider.i
No animate contrib anymore
[wxWidgets.git] / wxPython / src / _slider.i
CommitLineData
d14a1e28
RD
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
d14a1e28
RD
21%}
22
b2dc1044
RD
23MAKE_CONST_WXSTRING(SliderNameStr);
24
d14a1e28
RD
25//---------------------------------------------------------------------------
26%newgroup
27
aeee37c3
RD
28enum {
29 wxSL_HORIZONTAL,
30 wxSL_VERTICAL,
6f9fcc82 31 wxSL_TICKS,
aeee37c3
RD
32 wxSL_AUTOTICKS,
33 wxSL_LABELS,
34 wxSL_LEFT,
35 wxSL_TOP,
36 wxSL_RIGHT,
37 wxSL_BOTTOM,
38 wxSL_BOTH,
39 wxSL_SELRANGE,
40 wxSL_INVERSE
41};
42
43
ab1f7d2a
RD
44MustHaveApp(wxSlider);
45
d14a1e28
RD
46class wxSlider : public wxControl {
47public:
94eaeb1b 48 %pythonPrepend wxSlider "if kwargs.has_key('point'): kwargs['pos'] = kwargs['point'];del kwargs['point']"
2b9048c5
RD
49 %pythonPrepend wxSlider() ""
50 %pythonAppend wxSlider "self._setOORInfo(self)"
51 %pythonAppend wxSlider() ""
d14a1e28 52
d5573410
RD
53 wxSlider(wxWindow* parent, wxWindowID id=-1,
54 int value=0, int minValue=0, int maxValue=100,
2b9048c5 55 const wxPoint& pos = wxDefaultPosition,
d14a1e28
RD
56 const wxSize& size = wxDefaultSize,
57 long style = wxSL_HORIZONTAL,
58 const wxValidator& validator = wxDefaultValidator,
59 const wxString& name = wxPySliderNameStr);
1b8c7ba6 60 %RenameCtor(PreSlider, wxSlider());
d14a1e28 61
d5573410
RD
62 bool Create(wxWindow* parent, wxWindowID id=-1,
63 int value=0, int minValue=0, int maxValue=100,
2b9048c5 64 const wxPoint& pos = wxDefaultPosition,
d14a1e28
RD
65 const wxSize& size = wxDefaultSize,
66 long style = wxSL_HORIZONTAL,
67 const wxValidator& validator = wxDefaultValidator,
68 const wxString& name = wxPySliderNameStr);
69
70 // get/set the current slider value (should be in range)
71 virtual int GetValue() const;
72 virtual void SetValue(int value);
73
74 // retrieve/change the range
75 virtual void SetRange(int minValue, int maxValue);
76 virtual int GetMin() const;
77 virtual int GetMax() const;
78
79 void SetMin( int minValue );
80 void SetMax( int maxValue );
81
82 // the line/page size is the increment by which the slider moves when
83 // cursor arrow key/page up or down are pressed (clicking the mouse is like
84 // pressing PageUp/Down) and are by default set to 1 and 1/10 of the range
85 virtual void SetLineSize(int lineSize);
86 virtual void SetPageSize(int pageSize);
87 virtual int GetLineSize() const;
88 virtual int GetPageSize() const;
89
90 // these methods get/set the length of the slider pointer in pixels
91 virtual void SetThumbLength(int lenPixels);
92 virtual int GetThumbLength() const;
93
2b9048c5 94 virtual void SetTickFreq(int n, int pos=1);
d14a1e28
RD
95 virtual int GetTickFreq() const;
96 virtual void ClearTicks();
97 virtual void SetTick(int tickPos);
98
99 virtual void ClearSel();
100 virtual int GetSelEnd() const;
101 virtual int GetSelStart() const;
102 virtual void SetSelection(int min, int max);
103
880715c9
RD
104
105 static wxVisualAttributes
106 GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
7012bb9f
RD
107
108 %property(LineSize, GetLineSize, SetLineSize, doc="See `GetLineSize` and `SetLineSize`");
109 %property(Max, GetMax, SetMax, doc="See `GetMax` and `SetMax`");
110 %property(Min, GetMin, SetMin, doc="See `GetMin` and `SetMin`");
111 %property(PageSize, GetPageSize, SetPageSize, doc="See `GetPageSize` and `SetPageSize`");
112 %property(SelEnd, GetSelEnd, doc="See `GetSelEnd`");
113 %property(SelStart, GetSelStart, doc="See `GetSelStart`");
114 %property(ThumbLength, GetThumbLength, SetThumbLength, doc="See `GetThumbLength` and `SetThumbLength`");
115 %property(TickFreq, GetTickFreq, SetTickFreq, doc="See `GetTickFreq` and `SetTickFreq`");
116 %property(Value, GetValue, SetValue, doc="See `GetValue` and `SetValue`");
d14a1e28
RD
117};
118
119//---------------------------------------------------------------------------