// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
-// RCS-ID: $Id: spinbutt.cpp 54129 2008-06-11 19:30:52Z SC $
+// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#include "wx/osx/private.h"
-IMPLEMENT_DYNAMIC_CLASS(wxSpinButton, wxControl)
-IMPLEMENT_DYNAMIC_CLASS(wxSpinEvent, wxScrollEvent)
-
-
wxSpinButton::wxSpinButton()
: wxSpinButtonBase()
{
if (!parent)
return false;
-
+
m_peer = wxWidgetImpl::CreateSpinButton( this , parent, id, 0, m_min, m_max, pos, size,
style, GetExtraStyle() );
-
+
MacPostControlCreate( pos, size );
return true;
m_max = maxVal;
m_peer->SetMaximum( maxVal );
m_peer->SetMinimum( minVal );
-}
-
-void wxSpinButton::SendThumbTrackEvent()
+}
+
+void wxSpinButton::SendThumbTrackEvent()
{
wxSpinEvent event( wxEVT_SCROLL_THUMBTRACK, GetId() );
event.SetPosition( GetValue() );
HandleWindowEvent( event );
}
-bool wxSpinButton::OSXHandleClicked( double timestampsec )
+bool wxSpinButton::OSXHandleClicked( double WXUNUSED(timestampsec) )
{
// all events have already been processed
return true;
{
int inc = 0;
- if ( scrollEvent == wxEVT_SCROLL_LINEUP )
+ if ( scrollEvent == wxEVT_SCROLL_LINEUP )
{
inc = 1;
}
{
inc = -1;
}
-
+
// trigger scroll events
-
+
int oldValue = GetValue() ;
int newValue = oldValue + inc;