X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8907154c1a8a6882c6797d1f16393ddfb23e7f3a..4b5e178a4c22caac92952131632641c63821fc0c:/src/xrc/xh_spin.cpp diff --git a/src/xrc/xh_spin.cpp b/src/xrc/xh_spin.cpp index d7a2b589de..7ac87fe3ab 100644 --- a/src/xrc/xh_spin.cpp +++ b/src/xrc/xh_spin.cpp @@ -23,6 +23,10 @@ #include "wx/spinbutt.h" +static const long DEFAULT_VALUE = 0; +static const long DEFAULT_MIN = 0; +static const long DEFAULT_MAX = 100; + IMPLEMENT_DYNAMIC_CLASS(wxSpinButtonXmlHandler, wxXmlResourceHandler) wxSpinButtonXmlHandler::wxSpinButtonXmlHandler() @@ -45,9 +49,9 @@ wxObject *wxSpinButtonXmlHandler::DoCreateResource() GetStyle(wxT("style"), wxSP_VERTICAL | wxSP_ARROW_KEYS), GetName()); - control->SetValue(GetLong( wxT("value"), wxSP_DEFAULT_VALUE)); - control->SetRange(GetLong( wxT("min"), wxSP_DEFAULT_MIN), - GetLong(wxT("max"), wxSP_DEFAULT_MAX)); + control->SetValue(GetLong( wxT("value"), DEFAULT_VALUE)); + control->SetRange(GetLong( wxT("min"), DEFAULT_MIN), + GetLong(wxT("max"), DEFAULT_MAX)); SetupWindow(control); return control; @@ -84,9 +88,9 @@ wxObject *wxSpinCtrlXmlHandler::DoCreateResource() GetText(wxT("value")), GetPosition(), GetSize(), GetStyle(wxT("style"), wxSP_ARROW_KEYS), - GetLong(wxT("min"), wxSP_DEFAULT_MIN), - GetLong(wxT("max"), wxSP_DEFAULT_MAX), - GetLong(wxT("value"), wxSP_DEFAULT_VALUE), + GetLong(wxT("min"), DEFAULT_MIN), + GetLong(wxT("max"), DEFAULT_MAX), + GetLong(wxT("value"), DEFAULT_VALUE), GetName()); SetupWindow(control);