X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8907154c1a8a6882c6797d1f16393ddfb23e7f3a..2cf3a6d7bef6f20bea35062dd3d4dbf0aec9efb5:/src/mac/classic/spinctrl.cpp diff --git a/src/mac/classic/spinctrl.cpp b/src/mac/classic/spinctrl.cpp index 4a6f5516db..ad64cde0f5 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,19 +8,21 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#include "wx/defs.h" +#include "wx/wxprec.h" -#ifndef WX_PRECOMP - #include "wx/textctrl.h" -#endif //WX_PRECOMP +#ifdef __BORLANDC__ + #pragma hdrstop +#endif #if wxUSE_SPINCTRL -#include "wx/spinbutt.h" #include "wx/spinctrl.h" +#ifndef WX_PRECOMP + #include "wx/textctrl.h" +#endif //WX_PRECOMP -#include "wx/spinctrl.h" +#include "wx/spinbutt.h" // ---------------------------------------------------------------------------- // constants @@ -58,7 +60,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 +118,7 @@ BEGIN_EVENT_TABLE(wxSpinCtrlButton, wxSpinButton) END_EVENT_TABLE() IMPLEMENT_DYNAMIC_CLASS(wxSpinCtrl, wxControl) - + // ============================================================================ // implementation // ============================================================================ @@ -145,7 +147,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 +173,7 @@ bool wxSpinCtrl::Create(wxWindow *parent, } DoSetSize(pos.x , pos.y , csize.x, csize.y); - return TRUE; + return true; } wxSpinCtrl::~wxSpinCtrl() @@ -216,15 +218,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 +239,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 +323,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