1//---------------------------------------------------------------------------
2// This file is generated by wxPython's SIP generator.  Do not edit by hand.
3//
4// Copyright: (c) 2018 by Total Control Software
5// License:   wxWindows License
6//
7// This file will be included by _core.sip
8//
9//---------------------------------------------------------------------------
10
11//---------------------------------------------------------------------------
12
13const int wxSL_HORIZONTAL;
14const int wxSL_VERTICAL;
15const int wxSL_TICKS;
16const int wxSL_AUTOTICKS;
17const int wxSL_LEFT;
18const int wxSL_TOP;
19const int wxSL_RIGHT;
20const int wxSL_BOTTOM;
21const int wxSL_BOTH;
22const int wxSL_SELRANGE;
23const int wxSL_INVERSE;
24const int wxSL_MIN_MAX_LABELS;
25const int wxSL_VALUE_LABEL;
26const int wxSL_LABELS;
27const char* wxSliderNameStr;
28
29class wxSlider : wxControl
30{
31    %Docstring
32        Slider()
33        Slider(parent, id=ID_ANY, value=0, minValue=0, maxValue=100, pos=DefaultPosition, size=DefaultSize, style=SL_HORIZONTAL, validator=DefaultValidator, name=SliderNameStr)
34
35        A slider is a control with a handle which can be pulled back and forth
36        to change the value.
37    %End
38    %TypeHeaderCode
39        #include <wx/slider.h>
40    %End
41
42public:
43    wxSlider();
44    %PreMethodCode
45        if (!wxPyCheckForApp()) return NULL;
46    %End
47
48    wxSlider(
49        wxWindow * parent   /TransferThis/,
50        wxWindowID id = wxID_ANY,
51        int value = 0,
52        int minValue = 0,
53        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 = wxSliderNameStr
59    );
60    %PreMethodCode
61        if (!wxPyCheckForApp()) return NULL;
62    %End
63
64    ~wxSlider();
65
66    void ClearSel();
67    %Docstring
68        ClearSel()
69
70        Clears the selection, for a slider with the wxSL_SELRANGE style.
71    %End
72
73    void ClearTicks();
74    %Docstring
75        ClearTicks()
76
77        Clears the ticks.
78    %End
79
80    bool Create(
81        wxWindow * parent   /TransferThis/,
82        wxWindowID id = wxID_ANY,
83        int value = 0,
84        int minValue = 0,
85        int maxValue = 100,
86        const wxPoint & point = wxDefaultPosition,
87        const wxSize & size = wxDefaultSize,
88        long style = wxSL_HORIZONTAL,
89        const wxValidator & validator = wxDefaultValidator,
90        const wxString & name = wxSliderNameStr
91    );
92    %Docstring
93        Create(parent, id=ID_ANY, value=0, minValue=0, maxValue=100, point=DefaultPosition, size=DefaultSize, style=SL_HORIZONTAL, validator=DefaultValidator, name=SliderNameStr) -> bool
94
95        Used for two-step slider construction.
96    %End
97
98    int GetLineSize() const;
99    %Docstring
100        GetLineSize() -> int
101
102        Returns the line size.
103    %End
104
105    int GetMax() const;
106    %Docstring
107        GetMax() -> int
108
109        Gets the maximum slider value.
110    %End
111
112    int GetMin() const;
113    %Docstring
114        GetMin() -> int
115
116        Gets the minimum slider value.
117    %End
118
119    int GetPageSize() const;
120    %Docstring
121        GetPageSize() -> int
122
123        Returns the page size.
124    %End
125
126    int GetSelEnd() const;
127    %Docstring
128        GetSelEnd() -> int
129
130        Returns the selection end point.
131    %End
132
133    int GetSelStart() const;
134    %Docstring
135        GetSelStart() -> int
136
137        Returns the selection start point.
138    %End
139
140    int GetThumbLength() const;
141    %Docstring
142        GetThumbLength() -> int
143
144        Returns the thumb length.
145    %End
146
147    int GetTickFreq() const;
148    %Docstring
149        GetTickFreq() -> int
150
151        Returns the tick frequency.
152    %End
153
154    int GetValue() const;
155    %Docstring
156        GetValue() -> int
157
158        Gets the current slider value.
159    %End
160
161    void SetLineSize(
162        int lineSize
163    );
164    %Docstring
165        SetLineSize(lineSize)
166
167        Sets the line size for the slider.
168    %End
169
170    void SetMin(
171        int minValue
172    );
173    %Docstring
174        SetMin(minValue)
175
176        Sets the minimum slider value.
177    %End
178
179    void SetMax(
180        int maxValue
181    );
182    %Docstring
183        SetMax(maxValue)
184
185        Sets the maximum slider value.
186    %End
187
188    void SetPageSize(
189        int pageSize
190    );
191    %Docstring
192        SetPageSize(pageSize)
193
194        Sets the page size for the slider.
195    %End
196
197    void SetRange(
198        int minValue,
199        int maxValue
200    );
201    %Docstring
202        SetRange(minValue, maxValue)
203
204        Sets the minimum and maximum slider values.
205    %End
206
207    void SetSelection(
208        int startPos,
209        int endPos
210    );
211    %Docstring
212        SetSelection(startPos, endPos)
213
214        Sets the selection.
215    %End
216
217    void SetThumbLength(
218        int len
219    );
220    %Docstring
221        SetThumbLength(len)
222
223        Sets the slider thumb length.
224    %End
225
226    void SetTick(
227        int tickPos
228    );
229    %Docstring
230        SetTick(tickPos)
231
232        Sets a tick position.
233    %End
234
235    void SetTickFreq(
236        int n
237    );
238    %Docstring
239        SetTickFreq(n)
240
241        Sets the tick mark frequency and position.
242    %End
243
244    void SetValue(
245        int value
246    );
247    %Docstring
248        SetValue(value)
249
250        Sets the slider position.
251    %End
252
253    public:
254    virtual wxPoint GetClientAreaOrigin() const;
255    virtual bool Validate();
256    virtual bool TransferDataToWindow();
257    virtual bool TransferDataFromWindow();
258    virtual void InitDialog();
259    virtual bool AcceptsFocus() const;
260    virtual bool AcceptsFocusRecursively() const;
261    virtual bool AcceptsFocusFromKeyboard() const;
262    virtual void AddChild( wxWindowBase *child );
263    virtual void RemoveChild( wxWindowBase *child );
264    virtual void InheritAttributes();
265    virtual bool ShouldInheritColours() const;
266    virtual void OnInternalIdle();
267    virtual wxWindow *GetMainWindowOfCompositeControl();
268    virtual bool InformFirstDirection(int direction, int size, int availableOtherDir);
269    virtual void SetCanFocus(bool canFocus);
270    virtual bool Destroy();
271    virtual void SetValidator( const wxValidator &validator );
272    virtual wxValidator* GetValidator();
273
274
275    protected:
276    virtual bool ProcessEvent(wxEvent & event);
277    virtual void DoEnable(bool enable);
278    virtual void DoGetPosition(int *x, int *y) const;
279    virtual void DoGetSize(int *width, int *height) const;
280    virtual void DoGetClientSize(int *width, int *height) const;
281    virtual wxSize DoGetBestSize() const;
282    virtual wxSize DoGetBestClientSize() const;
283    virtual void DoSetSize(int x, int y, int width, int height, int sizeFlags);
284    virtual void DoSetClientSize(int width, int height);
285    virtual void DoSetSizeHints( int minW, int minH, int maxW, int maxH, int incW, int incH );
286    virtual wxSize DoGetBorderSize() const;
287    virtual void DoMoveWindow(int x, int y, int width, int height);
288    virtual void DoSetWindowVariant( wxWindowVariant variant);
289    virtual wxBorder GetDefaultBorder() const;
290    virtual wxBorder GetDefaultBorderForControl() const;
291    virtual void DoFreeze();
292    virtual void DoThaw();
293    virtual bool HasTransparentBackground();
294    virtual bool TryBefore(wxEvent& event);
295    virtual bool TryAfter(wxEvent& event);
296
297
298    public:
299
300
301    static
302    wxVisualAttributes GetClassDefaultAttributes(
303        wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL
304    );
305    %Docstring
306        GetClassDefaultAttributes(variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
307    %End
308    %PreMethodCode
309        if (!wxPyCheckForApp()) return NULL;
310    %End
311
312    public:
313
314
315    %Property(name=LineSize, get=GetLineSize, set=SetLineSize)
316    %Property(name=Max, get=GetMax, set=SetMax)
317    %Property(name=Min, get=GetMin, set=SetMin)
318    %Property(name=PageSize, get=GetPageSize, set=SetPageSize)
319    %Property(name=SelEnd, get=GetSelEnd)
320    %Property(name=SelStart, get=GetSelStart)
321    %Property(name=ThumbLength, get=GetThumbLength, set=SetThumbLength)
322    %Property(name=TickFreq, get=GetTickFreq, set=SetTickFreq)
323    %Property(name=Value, get=GetValue, set=SetValue)
324};  // end of class wxSlider
325
326
327%Extract(id=pycode_core)
328def _Slider_GetRange(self):
329    return (self.GetMin(), self.GetMax())
330Slider.GetRange = _Slider_GetRange
331del _Slider_GetRange
332%End
333
334%Extract(id=pycode_core)
335Slider.Range = property(Slider.GetRange)
336%End
337
338
339//---------------------------------------------------------------------------
340
341