- m_gaugePos = pos;
- ::SetControl32BitValue( (ControlRef) m_macControl , m_gaugePos ) ;
-}
-
-int wxGauge::GetShadowWidth() const
-{
- return 0;
-}
-
-int wxGauge::GetBezelFace() const
-{
- return 0;
-}
-
-int wxGauge::GetRange() const
-{
- return m_rangeMax;
+ // we are going via the base class in case there is
+ // some change behind the values by it
+ wxGaugeBase::SetValue(pos) ;
+ if ( m_peer && m_peer->Ok() )
+ {
+ m_peer->SetValue( GetValue() ) ;
+ // we turn off animation in the unnecessary situations as this is eating a lot of CPU otherwise
+ Boolean shouldAnimate = ( GetValue() > 0 && GetValue() < GetRange() ) ;
+ if ( m_peer->GetData<Boolean>( kControlEntireControl , kControlProgressBarAnimatingTag ) != shouldAnimate )
+ {
+ m_peer->SetData<Boolean>( kControlEntireControl , kControlProgressBarAnimatingTag , shouldAnimate ) ;
+ if ( !shouldAnimate )
+ {
+ Refresh() ;
+ }
+ }
+ }