/////////////////////////////////////////////////////////////////////////////
-// Name: spinbutt.cpp
+// Name: src/osx/spinbutt_osx.cpp
// Purpose: wxSpinButton
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
-// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
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;
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 );
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()
newValue = oldValue;
}
- m_peer->SetValue( newValue );
+ GetPeer()->SetValue( newValue );
// always send a thumbtrack event
SendThumbTrackEvent() ;