]>
Commit | Line | Data |
---|---|---|
7c78e7c7 RR |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: slider.cpp | |
01b2eeec KB |
3 | // Purpose: wxSlider |
4 | // Author: AUTHOR | |
5 | // Modified by: | |
6 | // Created: ??/??/98 | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) AUTHOR | |
7c78e7c7 RR |
9 | // Licence: wxWindows licence |
10 | ///////////////////////////////////////////////////////////////////////////// | |
11 | ||
7c78e7c7 RR |
12 | #ifdef __GNUG__ |
13 | #pragma implementation "slider.h" | |
14 | #endif | |
15 | ||
01b2eeec | 16 | #include "wx/msw/slider.h" |
7c78e7c7 | 17 | |
01b2eeec | 18 | IMPLEMENT_DYNAMIC_CLASS(wxSlider, wxControl) |
7c78e7c7 | 19 | |
01b2eeec KB |
20 | // Slider |
21 | wxSlider::wxSlider() | |
7c78e7c7 | 22 | { |
01b2eeec KB |
23 | m_pageSize = 1; |
24 | m_lineSize = 1; | |
25 | m_rangeMax = 0; | |
26 | m_rangeMin = 0; | |
27 | m_tickFreq = 0; | |
28 | } | |
7c78e7c7 | 29 | |
01b2eeec KB |
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) | |
7c78e7c7 | 36 | { |
01b2eeec KB |
37 | SetName(name); |
38 | SetValidator(validator); | |
7c78e7c7 | 39 | |
01b2eeec | 40 | if (parent) parent->AddChild(this); |
7c78e7c7 | 41 | |
01b2eeec KB |
42 | m_lineSize = 1; |
43 | m_windowStyle = style; | |
44 | m_tickFreq = 0; | |
7c78e7c7 | 45 | |
01b2eeec KB |
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() | |
7c78e7c7 | 62 | { |
01b2eeec | 63 | } |
7c78e7c7 | 64 | |
01b2eeec | 65 | int wxSlider::GetValue() const |
7c78e7c7 | 66 | { |
01b2eeec KB |
67 | // TODO |
68 | return 0; | |
69 | } | |
7c78e7c7 | 70 | |
01b2eeec | 71 | void wxSlider::SetValue(int value) |
7c78e7c7 | 72 | { |
01b2eeec KB |
73 | // TODO |
74 | } | |
7c78e7c7 | 75 | |
01b2eeec | 76 | void wxSlider::GetSize(int *width, int *height) const |
7c78e7c7 | 77 | { |
01b2eeec KB |
78 | // TODO |
79 | } | |
7c78e7c7 | 80 | |
01b2eeec | 81 | void wxSlider::GetPosition(int *x, int *y) const |
7c78e7c7 | 82 | { |
01b2eeec KB |
83 | // TODO |
84 | } | |
7c78e7c7 | 85 | |
01b2eeec | 86 | void wxSlider::SetSize(int x, int y, int width, int height, int sizeFlags) |
7c78e7c7 | 87 | { |
01b2eeec KB |
88 | // TODO |
89 | } | |
7c78e7c7 | 90 | |
01b2eeec | 91 | void wxSlider::SetRange(int minValue, int maxValue) |
7c78e7c7 | 92 | { |
01b2eeec KB |
93 | m_rangeMin = minValue; |
94 | m_rangeMax = maxValue; | |
95 | ||
96 | // TODO | |
97 | } | |
7c78e7c7 | 98 | |
01b2eeec KB |
99 | // For trackbars only |
100 | void wxSlider::SetTickFreq(int n, int pos) | |
7c78e7c7 | 101 | { |
01b2eeec KB |
102 | // TODO |
103 | m_tickFreq = n; | |
104 | } | |
7c78e7c7 | 105 | |
01b2eeec | 106 | void wxSlider::SetPageSize(int pageSize) |
7c78e7c7 | 107 | { |
01b2eeec KB |
108 | // TODO |
109 | m_pageSize = pageSize; | |
110 | } | |
7c78e7c7 | 111 | |
01b2eeec | 112 | int wxSlider::GetPageSize() const |
7c78e7c7 | 113 | { |
01b2eeec KB |
114 | return m_pageSize; |
115 | } | |
7c78e7c7 | 116 | |
01b2eeec | 117 | void wxSlider::ClearSel() |
7c78e7c7 | 118 | { |
01b2eeec KB |
119 | // TODO |
120 | } | |
7c78e7c7 | 121 | |
01b2eeec | 122 | void wxSlider::ClearTicks() |
7c78e7c7 | 123 | { |
01b2eeec KB |
124 | // TODO |
125 | } | |
7c78e7c7 | 126 | |
01b2eeec | 127 | void wxSlider::SetLineSize(int lineSize) |
7c78e7c7 | 128 | { |
01b2eeec KB |
129 | m_lineSize = lineSize; |
130 | // TODO | |
131 | } | |
7c78e7c7 | 132 | |
01b2eeec | 133 | int wxSlider::GetLineSize() const |
7c78e7c7 | 134 | { |
01b2eeec KB |
135 | // TODO |
136 | return 0; | |
137 | } | |
7c78e7c7 | 138 | |
01b2eeec | 139 | int wxSlider::GetSelEnd() const |
7c78e7c7 | 140 | { |
01b2eeec KB |
141 | // TODO |
142 | return 0; | |
143 | } | |
7c78e7c7 | 144 | |
01b2eeec | 145 | int wxSlider::GetSelStart() const |
7c78e7c7 | 146 | { |
01b2eeec KB |
147 | // TODO |
148 | return 0; | |
149 | } | |
7c78e7c7 | 150 | |
01b2eeec | 151 | void wxSlider::SetSelection(int minPos, int maxPos) |
7c78e7c7 | 152 | { |
01b2eeec KB |
153 | // TODO |
154 | } | |
7c78e7c7 | 155 | |
01b2eeec | 156 | void wxSlider::SetThumbLength(int len) |
7c78e7c7 | 157 | { |
01b2eeec KB |
158 | // TODO |
159 | } | |
7c78e7c7 | 160 | |
01b2eeec | 161 | int wxSlider::GetThumbLength() const |
7c78e7c7 | 162 | { |
01b2eeec KB |
163 | // TODO |
164 | return 0; | |
165 | } | |
7c78e7c7 | 166 | |
01b2eeec | 167 | void wxSlider::SetTick(int tickPos) |
7c78e7c7 | 168 | { |
01b2eeec KB |
169 | // TODO |
170 | } | |
7c78e7c7 | 171 | |
01b2eeec | 172 | void wxSlider::Command (wxCommandEvent & event) |
7c78e7c7 | 173 | { |
01b2eeec KB |
174 | SetValue (event.GetInt()); |
175 | ProcessCommand (event); | |
176 | } | |
7c78e7c7 | 177 | |
01b2eeec | 178 | bool wxSlider::Show(bool show) |
7c78e7c7 | 179 | { |
01b2eeec KB |
180 | // TODO |
181 | return TRUE; | |
182 | } | |
7c78e7c7 | 183 |