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