X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8907154c1a8a6882c6797d1f16393ddfb23e7f3a..b4446c244775324631b8dd2b588ea35f32e71728:/src/mac/classic/spinctrl.cpp diff --git a/src/mac/classic/spinctrl.cpp b/src/mac/classic/spinctrl.cpp index 4a6f5516db..e71f35859b 100644 --- a/src/mac/classic/spinctrl.cpp +++ b/src/mac/classic/spinctrl.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: spinbutt.cpp +// Name: src/mac/classic/spinbutt.cpp // Purpose: wxSpinCtrl // Author: Robert // Modified by: Mark Newsam (Based on GTK file) @@ -8,14 +8,18 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#include "wx/defs.h" +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_SPINCTRL #ifndef WX_PRECOMP #include "wx/textctrl.h" #endif //WX_PRECOMP -#if wxUSE_SPINCTRL - #include "wx/spinbutt.h" #include "wx/spinctrl.h" @@ -58,7 +62,7 @@ protected: { // Hand button down events to wxSpinCtrl. Doesn't work. if (event.GetEventType() == wxEVT_LEFT_DOWN && m_spin->ProcessEvent( event )) - return TRUE; + return true; return wxTextCtrl::ProcessEvent( event ); } @@ -116,7 +120,7 @@ BEGIN_EVENT_TABLE(wxSpinCtrlButton, wxSpinButton) END_EVENT_TABLE() IMPLEMENT_DYNAMIC_CLASS(wxSpinCtrl, wxControl) - + // ============================================================================ // implementation // ============================================================================ @@ -145,7 +149,7 @@ bool wxSpinCtrl::Create(wxWindow *parent, if ( !wxControl::Create(parent, id, wxDefaultPosition, wxDefaultSize, style, wxDefaultValidator, name) ) { - return FALSE; + return false; } // the string value overrides the numeric one (for backwards compatibility @@ -171,7 +175,7 @@ bool wxSpinCtrl::Create(wxWindow *parent, } DoSetSize(pos.x , pos.y , csize.x, csize.y); - return TRUE; + return true; } wxSpinCtrl::~wxSpinCtrl() @@ -216,15 +220,15 @@ void wxSpinCtrl::DoMoveWindow(int x, int y, int width, int height) bool wxSpinCtrl::Enable(bool enable) { if ( !wxControl::Enable(enable) ) - return FALSE; - return TRUE; + return false; + return true; } bool wxSpinCtrl::Show(bool show) { if ( !wxControl::Show(show) ) - return FALSE; - return TRUE; + return false; + return true; } // ---------------------------------------------------------------------------- @@ -237,18 +241,18 @@ bool wxSpinCtrl::GetTextValue(int *val) const if ( !m_text->GetValue().ToLong(&l) ) { // not a number at all - return FALSE; + return false; } if ( l < GetMin() || l > GetMax() ) { // out of range - return FALSE; + return false; } *val = l; - return TRUE; + return true; } int wxSpinCtrl::GetValue() const @@ -321,9 +325,9 @@ void wxSpinCtrl::SetSelection(long from, long to) // be selected if ( (from == -1) && (to == -1) ) { - from = 0; + from = 0; } m_text->SetSelection(from, to); -} +} #endif // wxUSE_SPINCTRL