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