]> git.saurik.com Git - wxWidgets.git/blame - wxPython/src/_slider.i
wx.App
[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
28class wxSlider : public wxControl {
29public:
30 %addtofunc wxSlider "self._setOORInfo(self)"
31 %addtofunc wxSlider() ""
32
33 wxSlider(wxWindow* parent, wxWindowID id,
34 int value, int minValue, int maxValue,
35 const wxPoint& point = wxDefaultPosition,
36 const wxSize& size = wxDefaultSize,
37 long style = wxSL_HORIZONTAL,
38 const wxValidator& validator = wxDefaultValidator,
39 const wxString& name = wxPySliderNameStr);
40 %name(PreSlider)wxSlider();
41
42 bool Create(wxWindow* parent, wxWindowID id,
43 int value, int minValue, int maxValue,
44 const wxPoint& point = wxDefaultPosition,
45 const wxSize& size = wxDefaultSize,
46 long style = wxSL_HORIZONTAL,
47 const wxValidator& validator = wxDefaultValidator,
48 const wxString& name = wxPySliderNameStr);
49
50 // get/set the current slider value (should be in range)
51 virtual int GetValue() const;
52 virtual void SetValue(int value);
53
54 // retrieve/change the range
55 virtual void SetRange(int minValue, int maxValue);
56 virtual int GetMin() const;
57 virtual int GetMax() const;
58
59 void SetMin( int minValue );
60 void SetMax( int maxValue );
61
62 // the line/page size is the increment by which the slider moves when
63 // cursor arrow key/page up or down are pressed (clicking the mouse is like
64 // pressing PageUp/Down) and are by default set to 1 and 1/10 of the range
65 virtual void SetLineSize(int lineSize);
66 virtual void SetPageSize(int pageSize);
67 virtual int GetLineSize() const;
68 virtual int GetPageSize() const;
69
70 // these methods get/set the length of the slider pointer in pixels
71 virtual void SetThumbLength(int lenPixels);
72 virtual int GetThumbLength() const;
73
74 virtual void SetTickFreq(int n, int pos);
75 virtual int GetTickFreq() const;
76 virtual void ClearTicks();
77 virtual void SetTick(int tickPos);
78
79 virtual void ClearSel();
80 virtual int GetSelEnd() const;
81 virtual int GetSelStart() const;
82 virtual void SetSelection(int min, int max);
83
84};
85
86//---------------------------------------------------------------------------