- wxSize size = s ;
- Rect bounds ;
- Str255 title ;
- m_rangeMax = range ;
- m_macHorizontalBorder = 2 ; // additional pixels around the real control
- m_macVerticalBorder = 2 ;
-
- if ( size.x == wxDefaultSize.x && size.y == wxDefaultSize.y)
- {
- size = wxSize( 200 , 16 ) ;
- }
-
- MacPreControlCreate( parent , id , "" , pos , size ,style, validator , name , &bounds , title ) ;
-
- m_macControl = UMANewControl( parent->GetMacRootWindow() , &bounds , title , true , 0 , 0 , range,
- kControlProgressBarProc , (long) this ) ;
-
- MacPostControlCreate() ;
-
- return TRUE;
-}
-
-void wxGauge::SetShadowWidth(int w)
-{
-}
-
-void wxGauge::SetBezelFace(int w)
-{
+ m_macIsUserPane = FALSE ;
+
+ if ( !wxGaugeBase::Create(parent, id, range, pos, s, style & 0xE0FFFFFF, validator, name) )
+ return false;
+
+ wxSize size = s ;
+ /*
+ if ( size.x == wxDefaultSize.x && size.y == wxDefaultSize.y)
+ {
+ size = wxSize( 200 , 16 ) ;
+ }
+ */
+ Rect bounds = wxMacGetBoundsForControl( this , pos , size ) ;
+ m_peer = new wxMacControl() ;
+ verify_noerr ( CreateProgressBarControl( MAC_WXHWND(parent->MacGetTopLevelWindowRef()) , &bounds ,
+ GetValue() , 0 , GetRange() , false /* not indeterminate */ , m_peer->GetControlRefAddr() ) );
+
+
+ MacPostControlCreate(pos,size) ;
+
+ return TRUE;