]> git.saurik.com Git - wxWidgets.git/blob - src/msw/slider95.cpp
use wxImage to load icons in non-native formats
[wxWidgets.git] / src / msw / slider95.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/msw/slider.cpp
3 // Purpose: wxSlider, using the Win95 (and later) trackbar control
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 04/01/98
7 // RCS-ID: $Id$
8 // Copyright: (c) Julian Smart 1998
9 // Vadim Zeitlin 2004
10 // Licence: wxWindows licence
11 /////////////////////////////////////////////////////////////////////////////
12
13 // ============================================================================
14 // declarations
15 // ============================================================================
16
17 // ----------------------------------------------------------------------------
18 // headers
19 // ----------------------------------------------------------------------------
20
21 // For compilers that support precompilation, includes "wx.h".
22 #include "wx/wxprec.h"
23
24 #ifdef __BORLANDC__
25 #pragma hdrstop
26 #endif
27
28 #if wxUSE_SLIDER
29
30 #ifndef WX_PRECOMP
31 #include "wx/brush.h"
32 #endif
33
34 #include "wx/slider.h"
35 #include "wx/msw/subwin.h"
36
37 // include <commctrl.h> "properly"
38 #include "wx/msw/wrapcctl.h"
39
40 // ----------------------------------------------------------------------------
41 // constants
42 // ----------------------------------------------------------------------------
43
44 // indices of labels in wxSlider::m_labels
45 enum
46 {
47 SliderLabel_Min,
48 SliderLabel_Max,
49 SliderLabel_Value,
50 SliderLabel_Last
51 };
52
53 // the gap between the slider and the labels, in pixels
54 static const int HGAP = 5;
55
56 // ----------------------------------------------------------------------------
57 // XTI
58 // ----------------------------------------------------------------------------
59
60 #if wxUSE_EXTENDED_RTTI
61 WX_DEFINE_FLAGS( wxSliderStyle )
62
63 wxBEGIN_FLAGS( wxSliderStyle )
64 // new style border flags, we put them first to
65 // use them for streaming out
66 wxFLAGS_MEMBER(wxBORDER_SIMPLE)
67 wxFLAGS_MEMBER(wxBORDER_SUNKEN)
68 wxFLAGS_MEMBER(wxBORDER_DOUBLE)
69 wxFLAGS_MEMBER(wxBORDER_RAISED)
70 wxFLAGS_MEMBER(wxBORDER_STATIC)
71 wxFLAGS_MEMBER(wxBORDER_NONE)
72
73 // old style border flags
74 wxFLAGS_MEMBER(wxSIMPLE_BORDER)
75 wxFLAGS_MEMBER(wxSUNKEN_BORDER)
76 wxFLAGS_MEMBER(wxDOUBLE_BORDER)
77 wxFLAGS_MEMBER(wxRAISED_BORDER)
78 wxFLAGS_MEMBER(wxSTATIC_BORDER)
79 wxFLAGS_MEMBER(wxBORDER)
80
81 // standard window styles
82 wxFLAGS_MEMBER(wxTAB_TRAVERSAL)
83 wxFLAGS_MEMBER(wxCLIP_CHILDREN)
84 wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW)
85 wxFLAGS_MEMBER(wxWANTS_CHARS)
86 wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE)
87 wxFLAGS_MEMBER(wxALWAYS_SHOW_SB )
88 wxFLAGS_MEMBER(wxVSCROLL)
89 wxFLAGS_MEMBER(wxHSCROLL)
90
91 wxFLAGS_MEMBER(wxSL_HORIZONTAL)
92 wxFLAGS_MEMBER(wxSL_VERTICAL)
93 wxFLAGS_MEMBER(wxSL_AUTOTICKS)
94 wxFLAGS_MEMBER(wxSL_LABELS)
95 wxFLAGS_MEMBER(wxSL_LEFT)
96 wxFLAGS_MEMBER(wxSL_TOP)
97 wxFLAGS_MEMBER(wxSL_RIGHT)
98 wxFLAGS_MEMBER(wxSL_BOTTOM)
99 wxFLAGS_MEMBER(wxSL_BOTH)
100 wxFLAGS_MEMBER(wxSL_SELRANGE)
101 wxFLAGS_MEMBER(wxSL_INVERSE)
102
103 wxEND_FLAGS( wxSliderStyle )
104
105 IMPLEMENT_DYNAMIC_CLASS_XTI(wxSlider, wxControl,"wx/slider.h")
106
107 wxBEGIN_PROPERTIES_TABLE(wxSlider)
108 wxEVENT_RANGE_PROPERTY( Scroll , wxEVT_SCROLL_TOP , wxEVT_SCROLL_CHANGED , wxScrollEvent )
109 wxEVENT_PROPERTY( Updated , wxEVT_COMMAND_SLIDER_UPDATED , wxCommandEvent )
110
111 wxPROPERTY( Value , int , SetValue, GetValue , 0, 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
112 wxPROPERTY( Minimum , int , SetMin, GetMin, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
113 wxPROPERTY( Maximum , int , SetMax, GetMax, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
114 wxPROPERTY( PageSize , int , SetPageSize, GetLineSize, 1 , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
115 wxPROPERTY( LineSize , int , SetLineSize, GetLineSize, 1 , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
116 wxPROPERTY( ThumbLength , int , SetThumbLength, GetThumbLength, 1 , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
117 wxPROPERTY_FLAGS( WindowStyle , wxSliderStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style
118 wxEND_PROPERTIES_TABLE()
119
120 wxBEGIN_HANDLERS_TABLE(wxSlider)
121 wxEND_HANDLERS_TABLE()
122
123 wxCONSTRUCTOR_8( wxSlider , wxWindow* , Parent , wxWindowID , Id , int , Value , int , Minimum , int , Maximum , wxPoint , Position , wxSize , Size , long , WindowStyle )
124 #else
125 IMPLEMENT_DYNAMIC_CLASS(wxSlider, wxControl)
126 #endif
127
128 // ============================================================================
129 // wxSlider implementation
130 // ============================================================================
131
132 // ----------------------------------------------------------------------------
133 // construction
134 // ----------------------------------------------------------------------------
135
136 void wxSlider::Init()
137 {
138 m_labels = NULL;
139
140 m_pageSize = 1;
141 m_lineSize = 1;
142 m_rangeMax = 0;
143 m_rangeMin = 0;
144 m_tickFreq = 0;
145
146 m_isDragging = false;
147 }
148
149 bool
150 wxSlider::Create(wxWindow *parent,
151 wxWindowID id,
152 int value,
153 int minValue,
154 int maxValue,
155 const wxPoint& pos,
156 const wxSize& size,
157 long style,
158 const wxValidator& validator,
159 const wxString& name)
160 {
161 // our styles are redundant: wxSL_LEFT/RIGHT imply wxSL_VERTICAL and
162 // wxSL_TOP/BOTTOM imply wxSL_HORIZONTAL, but for backwards compatibility
163 // reasons we can't really change it, instead try to infer the orientation
164 // from the flags given to us here
165 switch ( style & (wxSL_LEFT | wxSL_RIGHT | wxSL_TOP | wxSL_BOTTOM) )
166 {
167 case wxSL_LEFT:
168 case wxSL_RIGHT:
169 style |= wxSL_VERTICAL;
170 break;
171
172 case wxSL_TOP:
173 case wxSL_BOTTOM:
174 style |= wxSL_HORIZONTAL;
175 break;
176
177 case 0:
178 // no specific direction, do we have at least the orientation?
179 if ( !(style & (wxSL_HORIZONTAL | wxSL_VERTICAL)) )
180 {
181 // no, choose default
182 style |= wxSL_BOTTOM | wxSL_HORIZONTAL;
183 }
184 };
185
186 wxASSERT_MSG( !(style & wxSL_VERTICAL) || !(style & wxSL_HORIZONTAL),
187 _T("incompatible slider direction and orientation") );
188
189
190 // initialize everything
191 if ( !CreateControl(parent, id, pos, size, style, validator, name) )
192 return false;
193
194 // ensure that we have correct values for GetLabelsSize()
195 m_rangeMin = minValue;
196 m_rangeMax = maxValue;
197
198 // create the labels first, so that our DoGetBestSize() could take them
199 // into account
200 //
201 // note that we could simply create 3 wxStaticTexts here but it could
202 // result in some observable side effects at wx level (e.g. the parent of
203 // wxSlider would have 3 more children than expected) and so we prefer not
204 // to do it like this
205 if ( m_windowStyle & wxSL_LABELS )
206 {
207 m_labels = new wxSubwindows(SliderLabel_Last);
208
209 HWND hwndParent = GetHwndOf(parent);
210 for ( size_t n = 0; n < SliderLabel_Last; n++ )
211 {
212 (*m_labels)[n] = ::CreateWindow
213 (
214 wxT("STATIC"),
215 NULL,
216 WS_CHILD | WS_VISIBLE | SS_CENTER,
217 0, 0, 0, 0,
218 hwndParent,
219 (HMENU)NewControlId(),
220 wxGetInstance(),
221 NULL
222 );
223 }
224
225 m_labels->SetFont(GetFont());
226 }
227
228 // now create the main control too
229 if ( !MSWCreateControl(TRACKBAR_CLASS, wxEmptyString, pos, size) )
230 return false;
231
232 // and initialize everything
233 SetRange(minValue, maxValue);
234 SetValue(value);
235 SetPageSize((maxValue - minValue)/10);
236
237 // we need to position the labels correctly if we have them and if
238 // SetSize() hadn't been called before (when best size was determined by
239 // MSWCreateControl()) as in this case they haven't been put in place yet
240 if ( m_labels && size.x != wxDefaultCoord && size.y != wxDefaultCoord )
241 {
242 SetSize(size);
243 }
244
245 return true;
246 }
247
248 WXDWORD wxSlider::MSWGetStyle(long style, WXDWORD *exstyle) const
249 {
250 WXDWORD msStyle = wxControl::MSWGetStyle(style, exstyle);
251
252 // TBS_HORZ, TBS_RIGHT and TBS_BOTTOM are 0 but do include them for clarity
253 msStyle |= style & wxSL_VERTICAL ? TBS_VERT : TBS_HORZ;
254
255 if ( style & wxSL_BOTH )
256 {
257 // this fully specifies the style combined with TBS_VERT/HORZ above
258 msStyle |= TBS_BOTH;
259 }
260 else // choose one direction
261 {
262 if ( style & wxSL_LEFT )
263 msStyle |= TBS_LEFT;
264 else if ( style & wxSL_RIGHT )
265 msStyle |= TBS_RIGHT;
266 else if ( style & wxSL_TOP )
267 msStyle |= TBS_TOP;
268 else if ( style & wxSL_BOTTOM )
269 msStyle |= TBS_BOTTOM;
270 }
271
272 if ( style & wxSL_AUTOTICKS )
273 msStyle |= TBS_AUTOTICKS;
274 else
275 msStyle |= TBS_NOTICKS;
276
277 if ( style & wxSL_SELRANGE )
278 msStyle |= TBS_ENABLESELRANGE;
279
280 return msStyle;
281 }
282
283 wxSlider::~wxSlider()
284 {
285 delete m_labels;
286 }
287
288 // ----------------------------------------------------------------------------
289 // event handling
290 // ----------------------------------------------------------------------------
291
292 bool wxSlider::MSWOnScroll(int WXUNUSED(orientation),
293 WXWORD wParam,
294 WXWORD WXUNUSED(pos),
295 WXHWND control)
296 {
297 wxEventType scrollEvent;
298 switch ( wParam )
299 {
300 case SB_TOP:
301 scrollEvent = wxEVT_SCROLL_TOP;
302 break;
303
304 case SB_BOTTOM:
305 scrollEvent = wxEVT_SCROLL_BOTTOM;
306 break;
307
308 case SB_LINEUP:
309 scrollEvent = wxEVT_SCROLL_LINEUP;
310 break;
311
312 case SB_LINEDOWN:
313 scrollEvent = wxEVT_SCROLL_LINEDOWN;
314 break;
315
316 case SB_PAGEUP:
317 scrollEvent = wxEVT_SCROLL_PAGEUP;
318 break;
319
320 case SB_PAGEDOWN:
321 scrollEvent = wxEVT_SCROLL_PAGEDOWN;
322 break;
323
324 case SB_THUMBTRACK:
325 scrollEvent = wxEVT_SCROLL_THUMBTRACK;
326 m_isDragging = true;
327 break;
328
329 case SB_THUMBPOSITION:
330 if ( m_isDragging )
331 {
332 scrollEvent = wxEVT_SCROLL_THUMBRELEASE;
333 m_isDragging = false;
334 }
335 else
336 {
337 // this seems to only happen when the mouse wheel is used: in
338 // this case, as it might be unexpected to get THUMBRELEASE
339 // without preceding THUMBTRACKs, we don't generate it at all
340 // but generate CHANGED event because the control itself does
341 // not send us SB_ENDSCROLL for whatever reason when mouse
342 // wheel is used
343 scrollEvent = wxEVT_SCROLL_CHANGED;
344 }
345 break;
346
347 case SB_ENDSCROLL:
348 scrollEvent = wxEVT_SCROLL_CHANGED;
349 break;
350
351 default:
352 // unknown scroll event?
353 return false;
354 }
355
356 int newPos = ValueInvertOrNot((int) ::SendMessage((HWND) control, TBM_GETPOS, 0, 0));
357 if ( (newPos < GetMin()) || (newPos > GetMax()) )
358 {
359 // out of range - but we did process it
360 return true;
361 }
362
363 SetValue(newPos);
364
365 wxScrollEvent event(scrollEvent, m_windowId);
366 event.SetPosition(newPos);
367 event.SetEventObject( this );
368 GetEventHandler()->ProcessEvent(event);
369
370 wxCommandEvent cevent( wxEVT_COMMAND_SLIDER_UPDATED, GetId() );
371 cevent.SetInt( newPos );
372 cevent.SetEventObject( this );
373
374 return GetEventHandler()->ProcessEvent( cevent );
375 }
376
377 void wxSlider::Command (wxCommandEvent & event)
378 {
379 SetValue (event.GetInt());
380 ProcessCommand (event);
381 }
382
383 // ----------------------------------------------------------------------------
384 // geometry stuff
385 // ----------------------------------------------------------------------------
386
387 wxRect wxSlider::GetBoundingBox() const
388 {
389 // take care not to call our own functions which would call us recursively
390 int x, y, w, h;
391 wxSliderBase::DoGetPosition(&x, &y);
392 wxSliderBase::DoGetSize(&w, &h);
393
394 wxRect rect(x, y, w, h);
395 if ( m_labels )
396 {
397 wxRect lrect = m_labels->GetBoundingBox();
398 GetParent()->ScreenToClient(&lrect.x, &lrect.y);
399 rect.Union(lrect);
400 }
401
402 return rect;
403 }
404
405 void wxSlider::DoGetSize(int *width, int *height) const
406 {
407 wxRect rect = GetBoundingBox();
408
409 if ( width )
410 *width = rect.width;
411 if ( height )
412 *height = rect.height;
413 }
414
415 void wxSlider::DoGetPosition(int *x, int *y) const
416 {
417 wxRect rect = GetBoundingBox();
418
419 if ( x )
420 *x = rect.x;
421 if ( y )
422 *y = rect.y;
423 }
424
425 int wxSlider::GetLabelsSize(int *width) const
426 {
427 int cy;
428
429 if ( width )
430 {
431 // find the max label width
432 int wLabelMin, wLabelMax;
433 GetTextExtent(Format(m_rangeMin), &wLabelMin, &cy);
434 GetTextExtent(Format(m_rangeMax), &wLabelMax, &cy);
435
436 *width = wxMax(wLabelMin, wLabelMax);
437 }
438 else
439 {
440 cy = GetCharHeight();
441 }
442
443 return EDIT_HEIGHT_FROM_CHAR_HEIGHT(cy);
444 }
445
446 void wxSlider::DoMoveWindow(int x, int y, int width, int height)
447 {
448 // all complications below are because we need to position the labels,
449 // without them everything is easy
450 if ( !m_labels )
451 {
452 wxSliderBase::DoMoveWindow(x, y, width, height);
453 return;
454 }
455
456 // be careful to position the slider itself after moving the labels as
457 // otherwise our GetBoundingBox(), which is called from WM_SIZE handler,
458 // would return a wrong result and wrong size would be cached internally
459 if ( HasFlag(wxSL_VERTICAL) )
460 {
461 int wLabel;
462 int hLabel = GetLabelsSize(&wLabel);
463
464 int xLabel = HasFlag(wxSL_LEFT) ? x + width - wLabel : x;
465
466 // position all labels: min at the top, value in the middle and max at
467 // the bottom
468 DoMoveSibling((HWND)(*m_labels)[SliderLabel_Min],
469 xLabel, y, wLabel, hLabel);
470
471 DoMoveSibling((HWND)(*m_labels)[SliderLabel_Value],
472 xLabel, y + (height - hLabel)/2, wLabel, hLabel);
473
474 DoMoveSibling((HWND)(*m_labels)[SliderLabel_Max],
475 xLabel, y + height - hLabel, wLabel, hLabel);
476
477 // position the slider itself along the left/right edge
478 wxSliderBase::DoMoveWindow(HasFlag(wxSL_LEFT) ? x : x + wLabel + HGAP,
479 y + hLabel/2,
480 width - wLabel - HGAP,
481 height - hLabel);
482 }
483 else // horizontal
484 {
485 int wLabel;
486 int hLabel = GetLabelsSize(&wLabel);
487
488 int yLabel = HasFlag(wxSL_TOP) ? y + height - hLabel : y;
489
490 // position all labels: min on the left, value in the middle and max to
491 // the right
492 DoMoveSibling((HWND)(*m_labels)[SliderLabel_Min],
493 x, yLabel, wLabel, hLabel);
494
495 DoMoveSibling((HWND)(*m_labels)[SliderLabel_Value],
496 x + (width - wLabel)/2, yLabel, wLabel, hLabel);
497
498 DoMoveSibling((HWND)(*m_labels)[SliderLabel_Max],
499 x + width - wLabel, yLabel, wLabel, hLabel);
500
501 // position the slider itself along the top/bottom edge
502 wxSliderBase::DoMoveWindow(x,
503 HasFlag(wxSL_TOP) ? y : y + hLabel,
504 width,
505 height - hLabel);
506 }
507 }
508
509 wxSize wxSlider::DoGetBestSize() const
510 {
511 // these values are arbitrary
512 static const int length = 100;
513 static const int thumb = 24;
514 static const int ticks = 8;
515
516 int *width;
517 wxSize size;
518 if ( HasFlag(wxSL_VERTICAL) )
519 {
520 size.x = thumb;
521 size.y = length;
522 width = &size.x;
523
524 if ( m_labels )
525 {
526 int wLabel;
527 int hLabel = GetLabelsSize(&wLabel);
528
529 // account for the labels
530 size.x += HGAP + wLabel;
531
532 // labels are indented relative to the slider itself
533 size.y += hLabel;
534 }
535 }
536 else // horizontal
537 {
538 size.x = length;
539 size.y = thumb;
540 width = &size.y;
541
542 if ( m_labels )
543 {
544 // labels add extra height
545 size.y += GetLabelsSize();
546 }
547 }
548
549 // need extra space to show ticks
550 if ( HasFlag(wxSL_TICKS) )
551 {
552 *width += ticks;
553
554 // and maybe twice as much if we show them on both sides
555 if ( HasFlag(wxSL_BOTH) )
556 *width += ticks;
557 }
558
559 return size;
560 }
561
562 // ----------------------------------------------------------------------------
563 // slider-specific methods
564 // ----------------------------------------------------------------------------
565
566 int wxSlider::GetValue() const
567 {
568 return ValueInvertOrNot(::SendMessage(GetHwnd(), TBM_GETPOS, 0, 0));
569 }
570
571 void wxSlider::SetValue(int value)
572 {
573 ::SendMessage(GetHwnd(), TBM_SETPOS, (WPARAM)TRUE, (LPARAM)ValueInvertOrNot(value));
574
575 if ( m_labels )
576 {
577 ::SetWindowText((*m_labels)[SliderLabel_Value], Format(value));
578 }
579 }
580
581 void wxSlider::SetRange(int minValue, int maxValue)
582 {
583 m_rangeMin = minValue;
584 m_rangeMax = maxValue;
585
586 ::SendMessage(GetHwnd(), TBM_SETRANGEMIN, TRUE, m_rangeMin);
587 ::SendMessage(GetHwnd(), TBM_SETRANGEMAX, TRUE, m_rangeMax);
588
589 if ( m_labels )
590 {
591 ::SetWindowText((*m_labels)[SliderLabel_Min], Format(ValueInvertOrNot(m_rangeMin)));
592 ::SetWindowText((*m_labels)[SliderLabel_Max], Format(ValueInvertOrNot(m_rangeMax)));
593 }
594 }
595
596 void wxSlider::SetTickFreq(int n, int pos)
597 {
598 m_tickFreq = n;
599 ::SendMessage( GetHwnd(), TBM_SETTICFREQ, (WPARAM) n, (LPARAM) pos );
600 }
601
602 void wxSlider::SetPageSize(int pageSize)
603 {
604 ::SendMessage( GetHwnd(), TBM_SETPAGESIZE, (WPARAM) 0, (LPARAM) pageSize );
605 m_pageSize = pageSize;
606 }
607
608 int wxSlider::GetPageSize() const
609 {
610 return m_pageSize;
611 }
612
613 void wxSlider::ClearSel()
614 {
615 ::SendMessage(GetHwnd(), TBM_CLEARSEL, (WPARAM) TRUE, (LPARAM) 0);
616 }
617
618 void wxSlider::ClearTicks()
619 {
620 ::SendMessage(GetHwnd(), TBM_CLEARTICS, (WPARAM) TRUE, (LPARAM) 0);
621 }
622
623 void wxSlider::SetLineSize(int lineSize)
624 {
625 m_lineSize = lineSize;
626 ::SendMessage(GetHwnd(), TBM_SETLINESIZE, (WPARAM) 0, (LPARAM) lineSize);
627 }
628
629 int wxSlider::GetLineSize() const
630 {
631 return (int)::SendMessage(GetHwnd(), TBM_GETLINESIZE, 0, 0);
632 }
633
634 int wxSlider::GetSelEnd() const
635 {
636 return (int)::SendMessage(GetHwnd(), TBM_GETSELEND, 0, 0);
637 }
638
639 int wxSlider::GetSelStart() const
640 {
641 return (int)::SendMessage(GetHwnd(), TBM_GETSELSTART, 0, 0);
642 }
643
644 void wxSlider::SetSelection(int minPos, int maxPos)
645 {
646 ::SendMessage(GetHwnd(), TBM_SETSEL,
647 (WPARAM) TRUE /* redraw */,
648 (LPARAM) MAKELONG( minPos, maxPos) );
649 }
650
651 void wxSlider::SetThumbLength(int len)
652 {
653 ::SendMessage(GetHwnd(), TBM_SETTHUMBLENGTH, (WPARAM) len, (LPARAM) 0);
654 }
655
656 int wxSlider::GetThumbLength() const
657 {
658 return (int)::SendMessage( GetHwnd(), TBM_GETTHUMBLENGTH, 0, 0);
659 }
660
661 void wxSlider::SetTick(int tickPos)
662 {
663 ::SendMessage( GetHwnd(), TBM_SETTIC, (WPARAM) 0, (LPARAM) tickPos );
664 }
665
666 // ----------------------------------------------------------------------------
667 // composite control methods
668 // ----------------------------------------------------------------------------
669
670 WXHWND wxSlider::GetStaticMin() const
671 {
672 return m_labels ? (WXHWND)(*m_labels)[SliderLabel_Min] : NULL;
673 }
674
675 WXHWND wxSlider::GetStaticMax() const
676 {
677 return m_labels ? (WXHWND)(*m_labels)[SliderLabel_Max] : NULL;
678 }
679
680 WXHWND wxSlider::GetEditValue() const
681 {
682 return m_labels ? (WXHWND)(*m_labels)[SliderLabel_Value] : NULL;
683 }
684
685 WX_FORWARD_STD_METHODS_TO_SUBWINDOWS(wxSlider, wxSliderBase, m_labels)
686
687 #endif // wxUSE_SLIDER