// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
-// RCS-ID: $Id: gauge.cpp 54820 2008-07-29 20:04:11Z SC $
+// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#include "wx/gauge.h"
-IMPLEMENT_DYNAMIC_CLASS(wxGauge, wxControl)
-
#include "wx/osx/private.h"
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 );
// 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)
// 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
void wxGauge::Pulse()
{
- m_peer->PulseGauge();
+ GetPeer()->PulseGauge();
}
#endif // wxUSE_GAUGE