+ m_rangeMax = maxValue;
+ m_rangeMin = minValue;
+
+ m_pageSize = (int)((maxValue-minValue)/10);
+
+ // Must modify bounds to that of the slider dimensions from slider
+ // dimensions plus text labels.
+ if (style & wxSL_LABELS)
+ {
+ if ( style & wxSL_HORIZONTAL )
+ {
+ bounds.bottom = bounds.top + 15;
+ bounds.right -= (5 + maxtextwidth);
+ }
+ else // Vertical slider
+ {
+ bounds.right = bounds.left + 15;
+ bounds.bottom -= (5 + textheight);
+ }
+ }
+
+ m_macControl = UMANewControl( parent->GetMacRootWindow() , &bounds ,
+ title , false , value , minValue , maxValue,
+ kControlSliderProc + kControlSliderLiveFeedback + ( ( style & wxSL_AUTOTICKS ) ? kControlSliderHasTickMarks : 0 ) , (long) this ) ;
+
+ wxASSERT_MSG( m_macControl != NULL , "No valid mac control" ) ;
+
+ ::SetControlAction( m_macControl , wxMacLiveScrollbarActionUPP ) ;
+
+ MacPostControlCreate() ;
+
+ if ( style & wxSL_LABELS )
+ {
+ if ( style & wxSL_HORIZONTAL )
+ {
+ wxPoint leftpos( 0 , 15 ) ;
+ wxPoint rightpos( m_width - (maxtextwidth + 20) , 15 ) ;
+ wxPoint valuepos( m_width - maxtextwidth , 0 ) ;
+ wxString valuestring ;
+
+ valuestring.Printf( "%d" , minValue ) ;
+ m_macMinimumStatic = new wxStaticText( this , -1 , valuestring , leftpos ) ;
+
+ valuestring.Printf( "%d" , maxValue ) ;
+ m_macMinimumStatic = new wxStaticText( this , -1 , valuestring , rightpos ) ;
+
+ valuestring.Printf( "%d" , value ) ;
+ m_macMinimumStatic = new wxStaticText( this , -1 , valuestring , valuepos ) ;
+ }
+ else // Vertical slider
+ {
+ wxPoint toppos( 17 , 0 ) ;
+ wxPoint bottompos( 17 , m_height - (textheight + 15) ) ;
+ wxPoint valuepos( 0 , m_height - textheight ) ;
+ wxString valuestring ;
+
+ valuestring.Printf( "%d" , minValue ) ;
+ m_macMinimumStatic = new wxStaticText( this , -1 , valuestring , bottompos ) ;
+
+ valuestring.Printf( "%d" , maxValue ) ;
+ m_macMinimumStatic = new wxStaticText( this , -1 , valuestring , toppos ) ;
+
+ valuestring.Printf( "%d" , value ) ;
+ m_macMinimumStatic = new wxStaticText( this , -1 , valuestring , valuepos ) ;
+ }
+ }
+
+ return true;