X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/03647350fc7cd141953c72e0284e928847d30f44..0d53638f7147c18153f63fdfc096b17be6e22a27:/src/osx/spinbutt_osx.cpp diff --git a/src/osx/spinbutt_osx.cpp b/src/osx/spinbutt_osx.cpp index d9b99b02b0..16732ab9a4 100644 --- a/src/osx/spinbutt_osx.cpp +++ b/src/osx/spinbutt_osx.cpp @@ -1,10 +1,9 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: spinbutt.cpp +// Name: src/osx/spinbutt_osx.cpp // Purpose: wxSpinButton // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: spinbutt.cpp 54129 2008-06-11 19:30:52Z SC $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -17,10 +16,6 @@ #include "wx/osx/private.h" -IMPLEMENT_DYNAMIC_CLASS(wxSpinButton, wxControl) -IMPLEMENT_DYNAMIC_CLASS(wxSpinEvent, wxScrollEvent) - - wxSpinButton::wxSpinButton() : wxSpinButtonBase() { @@ -29,9 +24,8 @@ wxSpinButton::wxSpinButton() bool wxSpinButton::Create( wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) -{ - m_macIsUserPane = false; - +{ + DontCreatePeer(); if ( !wxSpinButtonBase::Create( parent, id, pos, size, style, wxDefaultValidator, name ) ) return false; @@ -41,8 +35,8 @@ bool wxSpinButton::Create( wxWindow *parent, if (!parent) return false; - m_peer = wxWidgetImpl::CreateSpinButton( this , parent, id, 0, m_min, m_max, pos, size, - style, GetExtraStyle() ); + SetPeer(wxWidgetImpl::CreateSpinButton( this , parent, id, 0, m_min, m_max, pos, size, + style, GetExtraStyle() )); MacPostControlCreate( pos, size ); @@ -55,20 +49,20 @@ wxSpinButton::~wxSpinButton() void wxSpinButton::SetValue( int val ) { - m_peer->SetValue( val ); + GetPeer()->SetValue( val ); } int wxSpinButton::GetValue() const { - return m_peer->GetValue(); + return GetPeer()->GetValue(); } void wxSpinButton::SetRange(int minVal, int maxVal) { m_min = minVal; m_max = maxVal; - m_peer->SetMaximum( maxVal ); - m_peer->SetMinimum( minVal ); + GetPeer()->SetMaximum( maxVal ); + GetPeer()->SetMinimum( minVal ); } void wxSpinButton::SendThumbTrackEvent() @@ -147,7 +141,7 @@ void wxSpinButton::TriggerScrollEvent(wxEventType scrollEvent) newValue = oldValue; } - m_peer->SetValue( newValue ); + GetPeer()->SetValue( newValue ); // always send a thumbtrack event SendThumbTrackEvent() ;