]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/classic/spinbutt.cpp
centralized the handling of border styles; added borders support for wxListBox and...
[wxWidgets.git] / src / mac / classic / spinbutt.cpp
index 3d1cd44c21e6be82d4d4851c4cec90bfbed03e41..5471cc8b14b36fc81f5d9e6af785c5254736b1d4 100644 (file)
@@ -9,11 +9,6 @@
 // Licence:       wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
-#pragma implementation "spinbutt.h"
-#pragma implementation "spinbuttbase.h"
-#endif
-
 #include "wx/defs.h"
 
 #if wxUSE_SPINBTN
 // wxWin macros
 // ----------------------------------------------------------------------------
 
-#if !USE_SHARED_LIBRARY
-    IMPLEMENT_DYNAMIC_CLASS(wxSpinButton, wxControl)
-    IMPLEMENT_DYNAMIC_CLASS(wxSpinEvent, wxScrollEvent)
-#endif
+IMPLEMENT_DYNAMIC_CLASS(wxSpinButton, wxControl)
+IMPLEMENT_DYNAMIC_CLASS(wxSpinEvent, wxScrollEvent)
 
 wxSpinButton::wxSpinButton()
    : wxSpinButtonBase()
@@ -86,7 +79,12 @@ int wxSpinButton::GetMax() const
 
 int wxSpinButton::GetValue() const
 {
-    return m_value;
+    int n = m_value;
+
+    if (n < m_min) n = m_min;
+    if (n > m_max) n = m_max;
+
+    return n;
 }
 
 void wxSpinButton::SetValue(int val)