- SetName(name);
- SetValidator(validator);
- m_rangeMax = range;
- m_windowStyle = style;
-
- if (parent) parent->AddChild(this);
-
- if ( id == -1 )
- m_windowId = (int)NewControlId();
- else
- m_windowId = id;
-
-
- // TODO
- return FALSE;
-}
-
-void wxGauge::SetSize(int x, int y, int width, int height, int sizeFlags)
-{
- // TODO
-}
-
-void wxGauge::SetShadowWidth(int w)
-{
- // TODO optional
-}
-
-void wxGauge::SetBezelFace(int w)
-{
- // TODO optional
+ m_macIsUserPane = FALSE ;
+
+ if ( !wxGaugeBase::Create(parent, id, range, pos, s, style & 0xE0FFFFFF, validator, name) )
+ return false;
+
+ wxSize size = s ;
+ /*
+ if ( size.x == wxDefaultCoord && size.y == wxDefaultCoord)
+ {
+ 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() ) );
+
+ if ( GetValue() == 0 )
+ m_peer->SetData<Boolean>( kControlEntireControl , kControlProgressBarAnimatingTag , (Boolean) false ) ;
+
+ MacPostControlCreate(pos,size) ;
+
+ return TRUE;