]> git.saurik.com Git - wxWidgets.git/blob - src/qt/slider.cpp
Changed order of #ifdefs to get native version on OS/2, even if
[wxWidgets.git] / src / qt / slider.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: slider.cpp
3 // Purpose: wxSlider
4 // Author: AUTHOR
5 // Modified by:
6 // Created: ??/??/98
7 // RCS-ID: $Id$
8 // Copyright: (c) AUTHOR
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifdef __GNUG__
13 #pragma implementation "slider.h"
14 #endif
15
16 #include "wx/msw/slider.h"
17
18 IMPLEMENT_DYNAMIC_CLASS(wxSlider, wxControl)
19
20 // Slider
21 wxSlider::wxSlider()
22 {
23 m_pageSize = 1;
24 m_lineSize = 1;
25 m_rangeMax = 0;
26 m_rangeMin = 0;
27 m_tickFreq = 0;
28 }
29
30 bool wxSlider::Create(wxWindow *parent, wxWindowID id,
31 int value, int minValue, int maxValue,
32 const wxPoint& pos,
33 const wxSize& size, long style,
34 const wxValidator& validator,
35 const wxString& name)
36 {
37 SetName(name);
38 SetValidator(validator);
39
40 if (parent) parent->AddChild(this);
41
42 m_lineSize = 1;
43 m_windowStyle = style;
44 m_tickFreq = 0;
45
46 if ( id == -1 )
47 m_windowId = (int)NewControlId();
48 else
49 m_windowId = id;
50
51 m_rangeMax = maxValue;
52 m_rangeMin = minValue;
53
54 m_pageSize = (int)((maxValue-minValue)/10);
55
56 // TODO create slider
57
58 return FALSE;
59 }
60
61 wxSlider::~wxSlider()
62 {
63 }
64
65 int wxSlider::GetValue() const
66 {
67 // TODO
68 return 0;
69 }
70
71 void wxSlider::SetValue(int value)
72 {
73 // TODO
74 }
75
76 void wxSlider::GetSize(int *width, int *height) const
77 {
78 // TODO
79 }
80
81 void wxSlider::GetPosition(int *x, int *y) const
82 {
83 // TODO
84 }
85
86 void wxSlider::SetSize(int x, int y, int width, int height, int sizeFlags)
87 {
88 // TODO
89 }
90
91 void wxSlider::SetRange(int minValue, int maxValue)
92 {
93 m_rangeMin = minValue;
94 m_rangeMax = maxValue;
95
96 // TODO
97 }
98
99 // For trackbars only
100 void wxSlider::SetTickFreq(int n, int pos)
101 {
102 // TODO
103 m_tickFreq = n;
104 }
105
106 void wxSlider::SetPageSize(int pageSize)
107 {
108 // TODO
109 m_pageSize = pageSize;
110 }
111
112 int wxSlider::GetPageSize() const
113 {
114 return m_pageSize;
115 }
116
117 void wxSlider::ClearSel()
118 {
119 // TODO
120 }
121
122 void wxSlider::ClearTicks()
123 {
124 // TODO
125 }
126
127 void wxSlider::SetLineSize(int lineSize)
128 {
129 m_lineSize = lineSize;
130 // TODO
131 }
132
133 int wxSlider::GetLineSize() const
134 {
135 // TODO
136 return 0;
137 }
138
139 int wxSlider::GetSelEnd() const
140 {
141 // TODO
142 return 0;
143 }
144
145 int wxSlider::GetSelStart() const
146 {
147 // TODO
148 return 0;
149 }
150
151 void wxSlider::SetSelection(int minPos, int maxPos)
152 {
153 // TODO
154 }
155
156 void wxSlider::SetThumbLength(int len)
157 {
158 // TODO
159 }
160
161 int wxSlider::GetThumbLength() const
162 {
163 // TODO
164 return 0;
165 }
166
167 void wxSlider::SetTick(int tickPos)
168 {
169 // TODO
170 }
171
172 void wxSlider::Command (wxCommandEvent & event)
173 {
174 SetValue (event.GetInt());
175 ProcessCommand (event);
176 }
177
178 bool wxSlider::Show(bool show)
179 {
180 // TODO
181 return TRUE;
182 }
183