///////////////////////////////////////////////////////////////////////////////
-// Name: univ/spinbutt.cpp
+// Name: src/univ/spinbutt.cpp
// Purpose: implementation of the universal version of wxSpinButton
// Author: Vadim Zeitlin
// Modified by:
// Created: 21.01.01
-// RCS-ID: $Id$
// Copyright: (c) 2001 SciTech Software, Inc. (www.scitechsoft.com)
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
// implementation of wxSpinButton
// ============================================================================
-IMPLEMENT_DYNAMIC_CLASS(wxSpinEvent, wxNotifyEvent)
-IMPLEMENT_DYNAMIC_CLASS(wxSpinButton, wxControl)
-
// ----------------------------------------------------------------------------
// creation
// ----------------------------------------------------------------------------
wxDefaultValidator, name) )
return false;
- SetBestSize(size);
+ SetInitialSize(size);
CreateInputHandler(wxINP_HANDLER_SPINBTN);
}
}
-wxScrollArrows::Arrow wxSpinButton::HitTest(const wxPoint& pt) const
+wxScrollArrows::Arrow wxSpinButton::HitTestArrow(const wxPoint& pt) const
{
wxRect rectArrow1, rectArrow2;
CalcArrowRects(&rectArrow1, &rectArrow2);
- if ( rectArrow1.Inside(pt) )
+ if ( rectArrow1.Contains(pt) )
return wxScrollArrows::Arrow_First;
- else if ( rectArrow2.Inside(pt) )
+ else if ( rectArrow2.Contains(pt) )
return wxScrollArrows::Arrow_Second;
else
return wxScrollArrows::Arrow_None;
return true;
}
+/* static */
+wxInputHandler *wxSpinButton::GetStdInputHandler(wxInputHandler *handlerDef)
+{
+ static wxStdSpinButtonInputHandler s_handler(handlerDef);
+
+ return &s_handler;
+}
+
// ----------------------------------------------------------------------------
// wxStdSpinButtonInputHandler
// ----------------------------------------------------------------------------