X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/289532452089421ddadbd4726a8469511a19ab76..07aec89fe1e7bad8010911aa8863efecfa909946:/src/osx/gauge_osx.cpp diff --git a/src/osx/gauge_osx.cpp b/src/osx/gauge_osx.cpp index 284d7fc666..40e4c71cd8 100644 --- a/src/osx/gauge_osx.cpp +++ b/src/osx/gauge_osx.cpp @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id$ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -25,15 +24,15 @@ bool wxGauge::Create( wxWindow *parent, long style, const wxValidator& validator, const wxString& name ) -{ - m_macIsUserPane = false; - +{ + DontCreatePeer(); + if ( !wxGaugeBase::Create( parent, id, range, pos, s, style & 0xE0FFFFFF, validator, name ) ) return false; wxSize size = s; - m_peer = wxWidgetImpl::CreateGauge( this, parent, id, GetValue() , 0, GetRange(), pos, size, style, GetExtraStyle() ); + SetPeer(wxWidgetImpl::CreateGauge( this, parent, id, GetValue() , 0, GetRange(), pos, size, style, GetExtraStyle() )); MacPostControlCreate( pos, size ); @@ -45,8 +44,8 @@ void wxGauge::SetRange(int r) // we are going via the base class in case there is // some change behind the values by it wxGaugeBase::SetRange( r ) ; - if ( m_peer ) - m_peer->SetMaximum( GetRange() ) ; + if ( GetPeer() ) + GetPeer()->SetMaximum( GetRange() ) ; } void wxGauge::SetValue(int pos) @@ -55,8 +54,8 @@ void wxGauge::SetValue(int pos) // some change behind the values by it wxGaugeBase::SetValue( pos ) ; - if ( m_peer ) - m_peer->SetValue( GetValue() ) ; + if ( GetPeer() ) + GetPeer()->SetValue( GetValue() ) ; } int wxGauge::GetValue() const @@ -66,7 +65,7 @@ int wxGauge::GetValue() const void wxGauge::Pulse() { - m_peer->PulseGauge(); + GetPeer()->PulseGauge(); } #endif // wxUSE_GAUGE