Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r49374 - in sandbox/guigl/boost: guigl guigl/widget parameter
From: stipe_at_[hidden]
Date: 2008-10-17 17:15:42


Author: srajko
Date: 2008-10-17 17:15:42 EDT (Fri, 17 Oct 2008)
New Revision: 49374
URL: http://svn.boost.org/trac/boost/changeset/49374

Log:
_value used to specify initial value of slider
Text files modified:
   sandbox/guigl/boost/guigl/parameters.hpp | 1 +
   sandbox/guigl/boost/guigl/widget/slider.hpp | 2 +-
   sandbox/guigl/boost/parameter/keyword_base.hpp | 15 +++++++++++++++
   sandbox/guigl/boost/parameter/untyped_keyword.hpp | 2 ++
   4 files changed, 19 insertions(+), 1 deletions(-)

Modified: sandbox/guigl/boost/guigl/parameters.hpp
==============================================================================
--- sandbox/guigl/boost/guigl/parameters.hpp (original)
+++ sandbox/guigl/boost/guigl/parameters.hpp 2008-10-17 17:15:42 EDT (Fri, 17 Oct 2008)
@@ -26,6 +26,7 @@
     BOOST_PARAMETER_TYPED_NAME_WDEFAULT(max,const double,1.0)
     BOOST_PARAMETER_TYPED_NAME_WDEFAULT(step,const double,0.0)
     BOOST_PARAMETER_TYPED_NAME_WDEFAULT(period,const double,0.0)
+ BOOST_PARAMETER_UNTYPED_NAME(value)
     BOOST_PARAMETER_UNTYPED_NAME(children)
     
     typedef boost::parameter::aux::empty_typed_arg_list default_parameters;

Modified: sandbox/guigl/boost/guigl/widget/slider.hpp
==============================================================================
--- sandbox/guigl/boost/guigl/widget/slider.hpp (original)
+++ sandbox/guigl/boost/guigl/widget/slider.hpp 2008-10-17 17:15:42 EDT (Fri, 17 Oct 2008)
@@ -34,7 +34,7 @@
     template<typename ArgumentPack>
     slider(const ArgumentPack &args)
         : slider_base_type(args)
- , m_value(args[_min])
+ , m_value(args[_value|args[_min]])
         , m_min(args[_min]), m_max(args[_max]), m_step(args[_step])
     {}
 

Modified: sandbox/guigl/boost/parameter/keyword_base.hpp
==============================================================================
--- sandbox/guigl/boost/parameter/keyword_base.hpp (original)
+++ sandbox/guigl/boost/parameter/keyword_base.hpp 2008-10-17 17:15:42 EDT (Fri, 17 Oct 2008)
@@ -47,6 +47,21 @@
     {
         return aux::lazy_default<Tag, Default>(default_);
     }
+
+ template <class Default>
+ aux::default_<Tag, const Default>
+ operator|(const Default& default_) const
+ {
+ return aux::default_<Tag, const Default>(default_);
+ }
+
+ template <class Default>
+ aux::lazy_default<Tag, Default>
+ operator||(Default const& default_) const
+ {
+ return aux::lazy_default<Tag, Default>(default_);
+ }
+
 };
 
 }} // namespace boost::parameter

Modified: sandbox/guigl/boost/parameter/untyped_keyword.hpp
==============================================================================
--- sandbox/guigl/boost/parameter/untyped_keyword.hpp (original)
+++ sandbox/guigl/boost/parameter/untyped_keyword.hpp 2008-10-17 17:15:42 EDT (Fri, 17 Oct 2008)
@@ -11,6 +11,8 @@
 #define UNTYPED_KEYWORD_050328_HPP
 
 #include <boost/parameter/keyword_base.hpp>
+#include <boost/parameter/aux_/default.hpp>
+
 
 namespace boost { namespace parameter {
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk