]>
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 KB |
18 | #if !USE_SHARED_LIBRARY |
19 | IMPLEMENT_DYNAMIC_CLASS(wxSlider, wxControl) | |
20 | #endif | |
7c78e7c7 | 21 | |
01b2eeec KB |
22 | // Slider |
23 | wxSlider::wxSlider() | |
7c78e7c7 | 24 | { |
01b2eeec KB |
25 | m_pageSize = 1; |
26 | m_lineSize = 1; | |
27 | m_rangeMax = 0; | |
28 | m_rangeMin = 0; | |
29 | m_tickFreq = 0; | |
30 | } | |
7c78e7c7 | 31 | |
01b2eeec KB |
32 | bool wxSlider::Create(wxWindow *parent, wxWindowID id, |
33 | int value, int minValue, int maxValue, | |
34 | const wxPoint& pos, | |
35 | const wxSize& size, long style, | |
36 | const wxValidator& validator, | |
37 | const wxString& name) | |
7c78e7c7 | 38 | { |
01b2eeec KB |
39 | SetName(name); |
40 | SetValidator(validator); | |
7c78e7c7 | 41 | |
01b2eeec | 42 | if (parent) parent->AddChild(this); |
7c78e7c7 | 43 | |
01b2eeec KB |
44 | m_lineSize = 1; |
45 | m_windowStyle = style; | |
46 | m_tickFreq = 0; | |
7c78e7c7 | 47 | |
01b2eeec KB |
48 | if ( id == -1 ) |
49 | m_windowId = (int)NewControlId(); | |
50 | else | |
51 | m_windowId = id; | |
52 | ||
53 | m_rangeMax = maxValue; | |
54 | m_rangeMin = minValue; | |
55 | ||
56 | m_pageSize = (int)((maxValue-minValue)/10); | |
57 | ||
58 | // TODO create slider | |
59 | ||
60 | return FALSE; | |
61 | } | |
62 | ||
63 | wxSlider::~wxSlider() | |
7c78e7c7 | 64 | { |
01b2eeec | 65 | } |
7c78e7c7 | 66 | |
01b2eeec | 67 | int wxSlider::GetValue() const |
7c78e7c7 | 68 | { |
01b2eeec KB |
69 | // TODO |
70 | return 0; | |
71 | } | |
7c78e7c7 | 72 | |
01b2eeec | 73 | void wxSlider::SetValue(int value) |
7c78e7c7 | 74 | { |
01b2eeec KB |
75 | // TODO |
76 | } | |
7c78e7c7 | 77 | |
01b2eeec | 78 | void wxSlider::GetSize(int *width, int *height) const |
7c78e7c7 | 79 | { |
01b2eeec KB |
80 | // TODO |
81 | } | |
7c78e7c7 | 82 | |
01b2eeec | 83 | void wxSlider::GetPosition(int *x, int *y) const |
7c78e7c7 | 84 | { |
01b2eeec KB |
85 | // TODO |
86 | } | |
7c78e7c7 | 87 | |
01b2eeec | 88 | void wxSlider::SetSize(int x, int y, int width, int height, int sizeFlags) |
7c78e7c7 | 89 | { |
01b2eeec KB |
90 | // TODO |
91 | } | |
7c78e7c7 | 92 | |
01b2eeec | 93 | void wxSlider::SetRange(int minValue, int maxValue) |
7c78e7c7 | 94 | { |
01b2eeec KB |
95 | m_rangeMin = minValue; |
96 | m_rangeMax = maxValue; | |
97 | ||
98 | // TODO | |
99 | } | |
7c78e7c7 | 100 | |
01b2eeec KB |
101 | // For trackbars only |
102 | void wxSlider::SetTickFreq(int n, int pos) | |
7c78e7c7 | 103 | { |
01b2eeec KB |
104 | // TODO |
105 | m_tickFreq = n; | |
106 | } | |
7c78e7c7 | 107 | |
01b2eeec | 108 | void wxSlider::SetPageSize(int pageSize) |
7c78e7c7 | 109 | { |
01b2eeec KB |
110 | // TODO |
111 | m_pageSize = pageSize; | |
112 | } | |
7c78e7c7 | 113 | |
01b2eeec | 114 | int wxSlider::GetPageSize() const |
7c78e7c7 | 115 | { |
01b2eeec KB |
116 | return m_pageSize; |
117 | } | |
7c78e7c7 | 118 | |
01b2eeec | 119 | void wxSlider::ClearSel() |
7c78e7c7 | 120 | { |
01b2eeec KB |
121 | // TODO |
122 | } | |
7c78e7c7 | 123 | |
01b2eeec | 124 | void wxSlider::ClearTicks() |
7c78e7c7 | 125 | { |
01b2eeec KB |
126 | // TODO |
127 | } | |
7c78e7c7 | 128 | |
01b2eeec | 129 | void wxSlider::SetLineSize(int lineSize) |
7c78e7c7 | 130 | { |
01b2eeec KB |
131 | m_lineSize = lineSize; |
132 | // TODO | |
133 | } | |
7c78e7c7 | 134 | |
01b2eeec | 135 | int wxSlider::GetLineSize() const |
7c78e7c7 | 136 | { |
01b2eeec KB |
137 | // TODO |
138 | return 0; | |
139 | } | |
7c78e7c7 | 140 | |
01b2eeec | 141 | int wxSlider::GetSelEnd() const |
7c78e7c7 | 142 | { |
01b2eeec KB |
143 | // TODO |
144 | return 0; | |
145 | } | |
7c78e7c7 | 146 | |
01b2eeec | 147 | int wxSlider::GetSelStart() const |
7c78e7c7 | 148 | { |
01b2eeec KB |
149 | // TODO |
150 | return 0; | |
151 | } | |
7c78e7c7 | 152 | |
01b2eeec | 153 | void wxSlider::SetSelection(int minPos, int maxPos) |
7c78e7c7 | 154 | { |
01b2eeec KB |
155 | // TODO |
156 | } | |
7c78e7c7 | 157 | |
01b2eeec | 158 | void wxSlider::SetThumbLength(int len) |
7c78e7c7 | 159 | { |
01b2eeec KB |
160 | // TODO |
161 | } | |
7c78e7c7 | 162 | |
01b2eeec | 163 | int wxSlider::GetThumbLength() const |
7c78e7c7 | 164 | { |
01b2eeec KB |
165 | // TODO |
166 | return 0; | |
167 | } | |
7c78e7c7 | 168 | |
01b2eeec | 169 | void wxSlider::SetTick(int tickPos) |
7c78e7c7 | 170 | { |
01b2eeec KB |
171 | // TODO |
172 | } | |
7c78e7c7 | 173 | |
01b2eeec | 174 | void wxSlider::Command (wxCommandEvent & event) |
7c78e7c7 | 175 | { |
01b2eeec KB |
176 | SetValue (event.GetInt()); |
177 | ProcessCommand (event); | |
178 | } | |
7c78e7c7 | 179 | |
01b2eeec | 180 | bool wxSlider::Show(bool show) |
7c78e7c7 | 181 | { |
01b2eeec KB |
182 | // TODO |
183 | return TRUE; | |
184 | } | |
7c78e7c7 | 185 |