]> git.saurik.com Git - wxWidgets.git/blobdiff - src/univ/spinbutt.cpp
No changes, move wxStreamTempInputBuffer to a header file.
[wxWidgets.git] / src / univ / spinbutt.cpp
index 7df6ef7b8b70e3cbe88541ee9388ad12541ff2ec..08ef3db11e339f4a9de003392cb8811f97f32244 100644 (file)
@@ -1,5 +1,5 @@
 ///////////////////////////////////////////////////////////////////////////////
 ///////////////////////////////////////////////////////////////////////////////
-// Name:        univ/spinbutt.cpp
+// Name:        src/univ/spinbutt.cpp
 // Purpose:     implementation of the universal version of wxSpinButton
 // Author:      Vadim Zeitlin
 // Modified by:
 // Purpose:     implementation of the universal version of wxSpinButton
 // Author:      Vadim Zeitlin
 // Modified by:
 // headers
 // ----------------------------------------------------------------------------
 
 // headers
 // ----------------------------------------------------------------------------
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-    #pragma implementation "spinbutt.h"
-    #pragma implementation "univspinbutt.h"
-#endif
-
 #include "wx/wxprec.h"
 
 #ifdef __BORLANDC__
 #include "wx/wxprec.h"
 
 #ifdef __BORLANDC__
@@ -43,9 +38,6 @@
 // implementation of wxSpinButton
 // ============================================================================
 
 // implementation of wxSpinButton
 // ============================================================================
 
-IMPLEMENT_DYNAMIC_CLASS(wxSpinEvent, wxNotifyEvent)
-IMPLEMENT_DYNAMIC_CLASS(wxSpinButton, wxControl)
-
 // ----------------------------------------------------------------------------
 // creation
 // ----------------------------------------------------------------------------
 // ----------------------------------------------------------------------------
 // creation
 // ----------------------------------------------------------------------------
@@ -103,7 +95,7 @@ bool wxSpinButton::Create(wxWindow *parent,
                                    wxDefaultValidator, name) )
         return false;
 
                                    wxDefaultValidator, name) )
         return false;
 
-    SetBestSize(size);
+    SetInitialSize(size);
 
     CreateInputHandler(wxINP_HANDLER_SPINBTN);
 
 
     CreateInputHandler(wxINP_HANDLER_SPINBTN);
 
@@ -329,14 +321,14 @@ void wxSpinButton::CalcArrowRects(wxRect *rect1, wxRect *rect2) const
     }
 }
 
     }
 }
 
-wxScrollArrows::Arrow wxSpinButton::HitTest(const wxPoint& pt) const
+wxScrollArrows::Arrow wxSpinButton::HitTestArrow(const wxPoint& pt) const
 {
     wxRect rectArrow1, rectArrow2;
     CalcArrowRects(&rectArrow1, &rectArrow2);
 
 {
     wxRect rectArrow1, rectArrow2;
     CalcArrowRects(&rectArrow1, &rectArrow2);
 
-    if ( rectArrow1.Inside(pt) )
+    if ( rectArrow1.Contains(pt) )
         return wxScrollArrows::Arrow_First;
         return wxScrollArrows::Arrow_First;
-    else if ( rectArrow2.Inside(pt) )
+    else if ( rectArrow2.Contains(pt) )
         return wxScrollArrows::Arrow_Second;
     else
         return wxScrollArrows::Arrow_None;
         return wxScrollArrows::Arrow_Second;
     else
         return wxScrollArrows::Arrow_None;
@@ -360,6 +352,14 @@ bool wxSpinButton::PerformAction(const wxControlAction& action,
     return true;
 }
 
     return true;
 }
 
+/* static */
+wxInputHandler *wxSpinButton::GetStdInputHandler(wxInputHandler *handlerDef)
+{
+    static wxStdSpinButtonInputHandler s_handler(handlerDef);
+
+    return &s_handler;
+}
+
 // ----------------------------------------------------------------------------
 // wxStdSpinButtonInputHandler
 // ----------------------------------------------------------------------------
 // ----------------------------------------------------------------------------
 // wxStdSpinButtonInputHandler
 // ----------------------------------------------------------------------------