]> git.saurik.com Git - wxWidgets.git/blame - wxPython/src/_slider.i
doc tweaks
[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
ab1f7d2a
RD
28MustHaveApp(wxSlider);
29
d14a1e28
RD
30class wxSlider : public wxControl {
31public:
94eaeb1b 32 %pythonPrepend wxSlider "if kwargs.has_key('point'): kwargs['pos'] = kwargs['point'];del kwargs['point']"
2b9048c5
RD
33 %pythonPrepend wxSlider() ""
34 %pythonAppend wxSlider "self._setOORInfo(self)"
35 %pythonAppend wxSlider() ""
d14a1e28 36
d5573410
RD
37 wxSlider(wxWindow* parent, wxWindowID id=-1,
38 int value=0, int minValue=0, int maxValue=100,
2b9048c5 39 const wxPoint& pos = wxDefaultPosition,
d14a1e28
RD
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
d5573410
RD
46 bool Create(wxWindow* parent, wxWindowID id=-1,
47 int value=0, int minValue=0, int maxValue=100,
2b9048c5 48 const wxPoint& pos = wxDefaultPosition,
d14a1e28
RD
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
2b9048c5 78 virtual void SetTickFreq(int n, int pos=1);
d14a1e28
RD
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
880715c9
RD
88
89 static wxVisualAttributes
90 GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
d14a1e28
RD
91};
92
93//---------------------------------------------------------------------------