X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/655719367ac5e131d9642e5783f3ecf64d1a3385..43dc5fb14027416b4e9cefc1ddd48e6c3b1dd690:/src/motif/spinbutt.cpp diff --git a/src/motif/spinbutt.cpp b/src/motif/spinbutt.cpp index ca3a6e2af1..f01ea0a2a4 100644 --- a/src/motif/spinbutt.cpp +++ b/src/motif/spinbutt.cpp @@ -9,13 +9,13 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) - #pragma implementation "spinbutt.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" +#include "wx/defs.h" + +#if wxUSE_SPINBTN + #include "wx/spinbutt.h" #include "wx/spinctrl.h" #include "wx/timer.h" @@ -77,7 +77,7 @@ class wxArrowButton : public wxControl { friend class wxArrowButtonTimer; public: - wxArrowButton( int increment ) + wxArrowButton( int increment ) : m_increment( increment ), m_timer( 0 ) {} @@ -230,7 +230,7 @@ bool wxArrowButton::Create( wxSpinButton* parent, wxWindowID id, SetForegroundColour( parent->GetBackgroundColour() ); - return TRUE; + return true; } // ---------------------------------------------------------------------------- @@ -240,7 +240,7 @@ bool wxArrowButton::Create( wxSpinButton* parent, wxWindowID id, IMPLEMENT_DYNAMIC_CLASS(wxSpinButton, wxControl); IMPLEMENT_DYNAMIC_CLASS(wxSpinEvent, wxNotifyEvent); -static void CalcSizes( wxPoint pt, wxSize sz, +static void CalcSizes( const wxPoint& pt, const wxSize& sz, wxPoint& pt1, wxSize& sz1, wxPoint& pt2, wxSize& sz2, bool isVertical ) @@ -272,12 +272,12 @@ bool wxSpinButton::Create( wxWindow *parent, wxWindowID id, if( !wxControl::Create( parent, id, pos, newSize, style ) ) { - return FALSE; + return false; } SetName(name); - m_windowId = ( id == -1 ) ? NewControlId() : id; + m_windowId = ( id == wxID_ANY ) ? NewControlId() : id; bool isVert = IsVertical(); wxPoint pt1, pt2; @@ -289,7 +289,7 @@ bool wxSpinButton::Create( wxWindow *parent, wxWindowID id, isVert ? wxARROW_DOWN : wxARROW_LEFT, pt2, sz2, -1 ); - return TRUE; + return true; } wxSpinButton::~wxSpinButton() @@ -403,3 +403,5 @@ void wxSpinButton::ChangeForegroundColour() { // TODO } + +#endif // wxUSE_SPINBTN