X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/77ffb5937e89927b621128789401db8921fe580f..b9d880d6382e24156cdce4ae0390c843cc6208d9:/src/mac/classic/spinctrl.cpp diff --git a/src/mac/classic/spinctrl.cpp b/src/mac/classic/spinctrl.cpp index b244573ab2..ad64cde0f5 100644 --- a/src/mac/classic/spinctrl.cpp +++ b/src/mac/classic/spinctrl.cpp @@ -1,30 +1,28 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: spinbutt.cpp +// Name: src/mac/classic/spinbutt.cpp // Purpose: wxSpinCtrl // Author: Robert // Modified by: Mark Newsam (Based on GTK file) // RCS-ID: $Id$ // Copyright: (c) Robert Roebling -// Licence: wxWidgets licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ -#pragma implementation "spinctlg.h" +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop #endif -#include "wx/defs.h" +#if wxUSE_SPINCTRL + +#include "wx/spinctrl.h" #ifndef WX_PRECOMP #include "wx/textctrl.h" #endif //WX_PRECOMP -#if wxUSE_SPINCTRL - #include "wx/spinbutt.h" -#include "wx/spinctrl.h" - - -#include "wx/spinctrl.h" // ---------------------------------------------------------------------------- // constants @@ -62,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 ); } @@ -120,7 +118,7 @@ BEGIN_EVENT_TABLE(wxSpinCtrlButton, wxSpinButton) END_EVENT_TABLE() IMPLEMENT_DYNAMIC_CLASS(wxSpinCtrl, wxControl) - + // ============================================================================ // implementation // ============================================================================ @@ -149,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 @@ -175,7 +173,7 @@ bool wxSpinCtrl::Create(wxWindow *parent, } DoSetSize(pos.x , pos.y , csize.x, csize.y); - return TRUE; + return true; } wxSpinCtrl::~wxSpinCtrl() @@ -220,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; } // ---------------------------------------------------------------------------- @@ -241,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 @@ -325,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