X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/79b9c114114e43832bde1e42d011c9268d1d0f6a..cb73e6001f891ae46b12a1e4ca39b93649cb6099:/src/msw/spinbutt.cpp?ds=sidebyside diff --git a/src/msw/spinbutt.cpp b/src/msw/spinbutt.cpp index 7ca93d2cb8..36de18694d 100644 --- a/src/msw/spinbutt.cpp +++ b/src/msw/spinbutt.cpp @@ -1,12 +1,12 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: spinbutt.cpp +// Name: msw/spinbutt.cpp // Purpose: wxSpinButton // Author: Julian Smart // Modified by: // Created: 04/01/98 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// // ============================================================================ @@ -17,7 +17,7 @@ // headers // ---------------------------------------------------------------------------- -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "spinbutt.h" #pragma implementation "spinbutbase.h" #endif @@ -30,23 +30,20 @@ #endif #ifndef WX_PRECOMP - #include "wx/wx.h" +#include "wx/app.h" #endif -// Can't resolve reference to CreateUpDownControl in -// TWIN32, but could probably use normal CreateWindow instead. - #if wxUSE_SPINBTN #include "wx/spinbutt.h" IMPLEMENT_DYNAMIC_CLASS(wxSpinEvent, wxNotifyEvent) -#if defined(__WIN95__) && !defined(__TWIN32__) +#if defined(__WIN95__) #include "wx/msw/private.h" -#if defined(__WIN95__) && !((defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) && !defined(__CYGWIN10__)) +#if defined(__WIN95__) && !(defined(__GNUWIN32_OLD__) && !defined(__CYGWIN10__)) #include #endif @@ -58,7 +55,29 @@ IMPLEMENT_DYNAMIC_CLASS(wxSpinEvent, wxNotifyEvent) // wxWin macros // ---------------------------------------------------------------------------- + +#if wxUSE_EXTENDED_RTTI +IMPLEMENT_DYNAMIC_CLASS_XTI(wxSpinButton, wxControl,"wx/spinbut.h") + +WX_BEGIN_PROPERTIES_TABLE(wxSpinButton) + WX_PROPERTY( Value , int , SetValue, GetValue, 0 ) + WX_PROPERTY( Min , int , SetMin, GetMin, 0 ) + WX_PROPERTY( Max , int , SetMax, GetMax, 0 ) +/* + TODO PROPERTIES + style wxSP_VERTICAL | wxSP_ARROW_KEYS +*/ +WX_END_PROPERTIES_TABLE() + +WX_BEGIN_HANDLERS_TABLE(wxSpinButton) +WX_END_HANDLERS_TABLE() + +WX_CONSTRUCTOR_5( wxSpinButton , wxWindow* , Parent , wxWindowID , Id , wxPoint , Position , wxSize , Size , long , WindowStyle ) +#else IMPLEMENT_DYNAMIC_CLASS(wxSpinButton, wxControl) +#endif + + // ---------------------------------------------------------------------------- // wxSpinButton @@ -246,7 +265,7 @@ bool wxSpinButton::MSWOnScroll(int WXUNUSED(orientation), WXWORD wParam, bool wxSpinButton::MSWOnNotify(int WXUNUSED(idCtrl), WXLPARAM lParam, WXLPARAM *result) { - NM_UPDOWN lpnmud = (NM_UPDOWN *)lParam; + NM_UPDOWN *lpnmud = (NM_UPDOWN *)lParam; if (lpnmud->hdr.hwndFrom != GetHwnd()) // make sure it is the right control return FALSE;