]> git.saurik.com Git - wxWidgets.git/blame - wxPython/src/_slider.i
use wxUSE_DATEPICKCTRL
[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,
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
ab1f7d2a
RD
43MustHaveApp(wxSlider);
44
d14a1e28
RD
45class wxSlider : public wxControl {
46public:
94eaeb1b 47 %pythonPrepend wxSlider "if kwargs.has_key('point'): kwargs['pos'] = kwargs['point'];del kwargs['point']"
2b9048c5
RD
48 %pythonPrepend wxSlider() ""
49 %pythonAppend wxSlider "self._setOORInfo(self)"
50 %pythonAppend wxSlider() ""
d14a1e28 51
d5573410
RD
52 wxSlider(wxWindow* parent, wxWindowID id=-1,
53 int value=0, int minValue=0, int maxValue=100,
2b9048c5 54 const wxPoint& pos = wxDefaultPosition,
d14a1e28
RD
55 const wxSize& size = wxDefaultSize,
56 long style = wxSL_HORIZONTAL,
57 const wxValidator& validator = wxDefaultValidator,
58 const wxString& name = wxPySliderNameStr);
1b8c7ba6 59 %RenameCtor(PreSlider, wxSlider());
d14a1e28 60
d5573410
RD
61 bool Create(wxWindow* parent, wxWindowID id=-1,
62 int value=0, int minValue=0, int maxValue=100,
2b9048c5 63 const wxPoint& pos = wxDefaultPosition,
d14a1e28
RD
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
2b9048c5 93 virtual void SetTickFreq(int n, int pos=1);
d14a1e28
RD
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
880715c9
RD
103
104 static wxVisualAttributes
105 GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
d14a1e28
RD
106};
107
108//---------------------------------------------------------------------------