+void wxSlider::DoSetSize(int x, int y, int w, int h, int sizeFlags)
+{
+ int xborder, yborder;
+ int minValWidth, maxValWidth, textwidth, textheight;
+ int sliderBreadth;
+
+ xborder = yborder = 0;
+
+ if (GetWindowStyle() & wxSL_LABELS)
+ {
+ wxString text;
+ int ht;
+
+ // Get maximum text label width and height
+ text.Printf(wxT("%d"), m_rangeMin);
+ GetTextExtent(text, &minValWidth, &textheight);
+ text.Printf(wxT("%d"), m_rangeMax);
+ GetTextExtent(text, &maxValWidth, &ht);
+ if(ht > textheight) {
+ textheight = ht;
+ }
+ textwidth = (minValWidth > maxValWidth ? minValWidth : maxValWidth);
+
+ xborder = textwidth + wxSLIDER_BORDERTEXT;
+ yborder = textheight + wxSLIDER_BORDERTEXT;
+
+ // Get slider breadth
+ if(GetWindowStyle() & wxSL_AUTOTICKS) {
+ sliderBreadth = wxSLIDER_DIMENSIONACROSS_WITHTICKMARKS;
+ }
+ else {
+ sliderBreadth = wxSLIDER_DIMENSIONACROSS_ARROW;
+ }
+
+ if(GetWindowStyle() & wxSL_VERTICAL)
+ {
+
+ if ( m_macMinimumStatic )
+ m_macMinimumStatic->Move(x + sliderBreadth + wxSLIDER_BORDERTEXT,
+ y + h - yborder - textheight);
+ if ( m_macMaximumStatic )
+ m_macMaximumStatic->Move(x + sliderBreadth + wxSLIDER_BORDERTEXT, y + 0);
+ if ( m_macValueStatic )
+ m_macValueStatic->Move(0, y + h - textheight);
+ h = h - yborder ;
+ }
+ else
+ {
+ if ( m_macMinimumStatic )
+ m_macMinimumStatic->Move(x + 0, y + sliderBreadth + wxSLIDER_BORDERTEXT);
+ if ( m_macMaximumStatic )
+ m_macMaximumStatic->Move(x + w - xborder - maxValWidth / 2,
+ y + sliderBreadth + wxSLIDER_BORDERTEXT);
+ if ( m_macValueStatic )
+ m_macValueStatic->Move(x + w - textwidth, y + 0);
+ w = w - xborder ;
+ }
+ }
+
+ wxControl::DoSetSize( x, y , w , h ,sizeFlags ) ;
+}
+
+void wxSlider::DoMoveWindow(int x, int y, int width, int height)
+{