]> git.saurik.com Git - wxWidgets.git/commitdiff
get rid of public constants for various XRC defaults, there's no need for them outsid...
authorVáclav Slavík <vslavik@fastmail.fm>
Wed, 1 Oct 2008 19:54:57 +0000 (19:54 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Wed, 1 Oct 2008 19:54:57 +0000 (19:54 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56023 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/doxygen/overviews/xrc_format.h
include/wx/xrc/xh_gauge.h
include/wx/xrc/xh_scrol.h
include/wx/xrc/xh_slidr.h
include/wx/xrc/xh_spin.h
src/xrc/xh_gauge.cpp
src/xrc/xh_slidr.cpp
src/xrc/xh_spin.cpp

index 5152171ac3111a68bc450557b0153d9f8b758c9b..0c258a5dba95a84acac71d0106fe12f0ba5e082b 100644 (file)
@@ -813,7 +813,7 @@ objects. If sizer child is used, it sets
 @beginTable
 @hdr3col{property, type, description}
 @row3col{range, integer,
 @beginTable
 @hdr3col{property, type, description}
 @row3col{range, integer,
-    Maximum value of the gauge (default: wxGAUGE_DEFAULT_RANGE).}
+    Maximum value of the gauge (default: 100).}
 @row3col{value, integer,
     Initial value of the control (default: 0).}
 @row3col{shadow, @ref xrc_format_type_dimension,
 @row3col{value, integer,
     Initial value of the control (default: 0).}
 @row3col{shadow, @ref xrc_format_type_dimension,
@@ -1258,11 +1258,11 @@ HTML markup. Note that the markup has to be escaped:
 @beginTable
 @hdr3col{property, type, description}
 @row3col{value, integer,
 @beginTable
 @hdr3col{property, type, description}
 @row3col{value, integer,
-    Initial value of the control (default: wxSL_DEFAULT_VALUE).}
+    Initial value of the control (default: 0).}
 @row3col{min, integer,
 @row3col{min, integer,
-    Minimum allowed value (default: wxSL_DEFAULT_MIN).}
+    Minimum allowed value (default: 0).}
 @row3col{max, integer,
 @row3col{max, integer,
-    Maximum allowed value (default: wxSL_DEFAULT_MAX).}
+    Maximum allowed value (default: 100).}
 @row3col{pagesize, integer,
     Line size; number of steps the slider moves when the user moves
     pages up or down (default: unset).}
 @row3col{pagesize, integer,
     Line size; number of steps the slider moves when the user moves
     pages up or down (default: unset).}
@@ -1287,11 +1287,11 @@ HTML markup. Note that the markup has to be escaped:
 @beginTable
 @hdr3col{property, type, description}
 @row3col{value, integer,
 @beginTable
 @hdr3col{property, type, description}
 @row3col{value, integer,
-    Initial value of the control (default: wxSP_DEFAULT_VALUE).}
+    Initial value of the control (default: 0).}
 @row3col{min, integer,
 @row3col{min, integer,
-    Minimum allowed value (default: wxSP_DEFAULT_MIN).}
+    Minimum allowed value (default: 0).}
 @row3col{max, integer,
 @row3col{max, integer,
-    Maximum allowed value (default: wxSP_DEFAULT_MAX).}
+    Maximum allowed value (default: 100).}
 @endTable
 
 
 @endTable
 
 
index 9aa45d921a2e34365ebf41d22fa250d55f58027c..afdb3da89dc985a1a9df696c65e21f7a305cebd7 100644 (file)
 
 class WXDLLIMPEXP_XRC wxGaugeXmlHandler : public wxXmlResourceHandler
 {
 
 class WXDLLIMPEXP_XRC wxGaugeXmlHandler : public wxXmlResourceHandler
 {
-    DECLARE_DYNAMIC_CLASS(wxGaugeXmlHandler)
-    enum
-    {
-        wxGAUGE_DEFAULT_RANGE = 100
-    };
-
 public:
     wxGaugeXmlHandler();
     virtual wxObject *DoCreateResource();
     virtual bool CanHandle(wxXmlNode *node);
 public:
     wxGaugeXmlHandler();
     virtual wxObject *DoCreateResource();
     virtual bool CanHandle(wxXmlNode *node);
+
+    DECLARE_DYNAMIC_CLASS(wxGaugeXmlHandler)
 };
 
 #endif // wxUSE_XRC && wxUSE_GAUGE
 };
 
 #endif // wxUSE_XRC && wxUSE_GAUGE
index 3f2899045e6cb9b5a385243f97589fcf0fefd160..64f4230842e82dec988638bbedfadeecebf2f22c 100644 (file)
 
 class WXDLLIMPEXP_XRC wxScrollBarXmlHandler : public wxXmlResourceHandler
 {
 
 class WXDLLIMPEXP_XRC wxScrollBarXmlHandler : public wxXmlResourceHandler
 {
-    DECLARE_DYNAMIC_CLASS(wxScrollBarXmlHandler)
-    enum
-    {
-        wxSL_DEFAULT_VALUE = 0,
-        wxSL_DEFAULT_MIN = 0,
-        wxSL_DEFAULT_MAX = 100
-    };
-
 public:
     wxScrollBarXmlHandler();
     virtual wxObject *DoCreateResource();
     virtual bool CanHandle(wxXmlNode *node);
 public:
     wxScrollBarXmlHandler();
     virtual wxObject *DoCreateResource();
     virtual bool CanHandle(wxXmlNode *node);
+
+    DECLARE_DYNAMIC_CLASS(wxScrollBarXmlHandler)
 };
 
 #endif // wxUSE_XRC && wxUSE_SCROLLBAR
 };
 
 #endif // wxUSE_XRC && wxUSE_SCROLLBAR
index 345c03b6a5b23ce3f4710f721e3778eed4c6cca8..fc2066798aff9444f3983dd191653f9fcaa8bef4 100644 (file)
 
 class WXDLLIMPEXP_XRC wxSliderXmlHandler : public wxXmlResourceHandler
 {
 
 class WXDLLIMPEXP_XRC wxSliderXmlHandler : public wxXmlResourceHandler
 {
-    DECLARE_DYNAMIC_CLASS(wxSliderXmlHandler)
-    enum
-    {
-        wxSL_DEFAULT_VALUE = 0,
-        wxSL_DEFAULT_MIN = 0,
-        wxSL_DEFAULT_MAX = 100
-    };
-
 public:
     wxSliderXmlHandler();
     virtual wxObject *DoCreateResource();
     virtual bool CanHandle(wxXmlNode *node);
 public:
     wxSliderXmlHandler();
     virtual wxObject *DoCreateResource();
     virtual bool CanHandle(wxXmlNode *node);
+
+    DECLARE_DYNAMIC_CLASS(wxSliderXmlHandler)
 };
 
 #endif // wxUSE_XRC && wxUSE_SLIDER
 };
 
 #endif // wxUSE_XRC && wxUSE_SLIDER
index c2b23b1b502d007646ae792e60ebfa43d0ddb517..1182a33f03d9d8592980bbd7f0b92e02d70af0eb 100644 (file)
 
 class WXDLLIMPEXP_XRC wxSpinButtonXmlHandler : public wxXmlResourceHandler
 {
 
 class WXDLLIMPEXP_XRC wxSpinButtonXmlHandler : public wxXmlResourceHandler
 {
-    DECLARE_DYNAMIC_CLASS(wxSpinButtonXmlHandler)
-    enum
-    {
-        wxSP_DEFAULT_VALUE = 0,
-        wxSP_DEFAULT_MIN = 0,
-        wxSP_DEFAULT_MAX = 100
-    };
-
 public:
     wxSpinButtonXmlHandler();
     virtual wxObject *DoCreateResource();
     virtual bool CanHandle(wxXmlNode *node);
 public:
     wxSpinButtonXmlHandler();
     virtual wxObject *DoCreateResource();
     virtual bool CanHandle(wxXmlNode *node);
+
+    DECLARE_DYNAMIC_CLASS(wxSpinButtonXmlHandler)
 };
 
 #endif // wxUSE_SPINBTN
 };
 
 #endif // wxUSE_SPINBTN
@@ -40,18 +34,12 @@ public:
 
 class WXDLLIMPEXP_XRC wxSpinCtrlXmlHandler : public wxXmlResourceHandler
 {
 
 class WXDLLIMPEXP_XRC wxSpinCtrlXmlHandler : public wxXmlResourceHandler
 {
-    DECLARE_DYNAMIC_CLASS(wxSpinCtrlXmlHandler)
-    enum
-    {
-        wxSP_DEFAULT_VALUE = 0,
-        wxSP_DEFAULT_MIN = 0,
-        wxSP_DEFAULT_MAX = 100
-    };
-
 public:
     wxSpinCtrlXmlHandler();
     virtual wxObject *DoCreateResource();
     virtual bool CanHandle(wxXmlNode *node);
 public:
     wxSpinCtrlXmlHandler();
     virtual wxObject *DoCreateResource();
     virtual bool CanHandle(wxXmlNode *node);
+
+    DECLARE_DYNAMIC_CLASS(wxSpinCtrlXmlHandler)
 };
 
 #endif // wxUSE_SPINCTRL
 };
 
 #endif // wxUSE_SPINCTRL
index 9d63af74d0e6f70406d0ba6608e999f4bda58a24..99ce99a3637530936c2708365459f0638e2cce01 100644 (file)
@@ -23,6 +23,8 @@
     #include "wx/gauge.h"
 #endif
 
     #include "wx/gauge.h"
 #endif
 
+static const long DEFAULT_RANGE = 100;
+
 IMPLEMENT_DYNAMIC_CLASS(wxGaugeXmlHandler, wxXmlResourceHandler)
 
 wxGaugeXmlHandler::wxGaugeXmlHandler()
 IMPLEMENT_DYNAMIC_CLASS(wxGaugeXmlHandler, wxXmlResourceHandler)
 
 wxGaugeXmlHandler::wxGaugeXmlHandler()
@@ -43,7 +45,7 @@ wxObject *wxGaugeXmlHandler::DoCreateResource()
 
     control->Create(m_parentAsWindow,
                     GetID(),
 
     control->Create(m_parentAsWindow,
                     GetID(),
-                    GetLong(wxT("range"), wxGAUGE_DEFAULT_RANGE),
+                    GetLong(wxT("range"), DEFAULT_RANGE),
                     GetPosition(), GetSize(),
                     GetStyle(),
                     wxDefaultValidator,
                     GetPosition(), GetSize(),
                     GetStyle(),
                     wxDefaultValidator,
index c34926df31ac1273241a871f72f5f1cce4449da5..9f6e07cf31c479023a3ab8b12aa98e7d5887e7ad 100644 (file)
     #include "wx/slider.h"
 #endif
 
     #include "wx/slider.h"
 #endif
 
+static const long DEFAULT_VALUE = 0;
+static const long DEFAULT_MIN = 0;
+static const long DEFAULT_MAX = 100;
+
+
 IMPLEMENT_DYNAMIC_CLASS(wxSliderXmlHandler, wxXmlResourceHandler)
 
 wxSliderXmlHandler::wxSliderXmlHandler()
 IMPLEMENT_DYNAMIC_CLASS(wxSliderXmlHandler, wxXmlResourceHandler)
 
 wxSliderXmlHandler::wxSliderXmlHandler()
@@ -48,9 +53,9 @@ wxObject *wxSliderXmlHandler::DoCreateResource()
 
     control->Create(m_parentAsWindow,
                     GetID(),
 
     control->Create(m_parentAsWindow,
                     GetID(),
-                    GetLong(wxT("value"), wxSL_DEFAULT_VALUE),
-                    GetLong(wxT("min"), wxSL_DEFAULT_MIN),
-                    GetLong(wxT("max"), wxSL_DEFAULT_MAX),
+                    GetLong(wxT("value"), DEFAULT_VALUE),
+                    GetLong(wxT("min"), DEFAULT_MIN),
+                    GetLong(wxT("max"), DEFAULT_MAX),
                     GetPosition(), GetSize(),
                     GetStyle(),
                     wxDefaultValidator,
                     GetPosition(), GetSize(),
                     GetStyle(),
                     wxDefaultValidator,
index 15e878c3d383156fba5a71dbb7a11fce1db140da..7ac87fe3ab30ce98528a64970783f9dec492186c 100644 (file)
@@ -15,7 +15,7 @@
     #pragma hdrstop
 #endif
 
     #pragma hdrstop
 #endif
 
-#if wxUSE_XRC 
+#if wxUSE_XRC
 
 #include "wx/xrc/xh_spin.h"
 
 
 #include "wx/xrc/xh_spin.h"
 
 
 #include "wx/spinbutt.h"
 
 
 #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()
 IMPLEMENT_DYNAMIC_CLASS(wxSpinButtonXmlHandler, wxXmlResourceHandler)
 
 wxSpinButtonXmlHandler::wxSpinButtonXmlHandler()
@@ -45,9 +49,9 @@ wxObject *wxSpinButtonXmlHandler::DoCreateResource()
                     GetStyle(wxT("style"), wxSP_VERTICAL | wxSP_ARROW_KEYS),
                     GetName());
 
                     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;
     SetupWindow(control);
 
     return control;
@@ -84,9 +88,9 @@ wxObject *wxSpinCtrlXmlHandler::DoCreateResource()
                     GetText(wxT("value")),
                     GetPosition(), GetSize(),
                     GetStyle(wxT("style"), wxSP_ARROW_KEYS),
                     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);
                     GetName());
 
     SetupWindow(control);