Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r48779 - in sandbox/guigl: boost/guigl boost/guigl/layout boost/guigl/view boost/guigl/view/impl boost/guigl/widget boost/parameter boost/parameter/aux_ libs/guigl/build/xcodeide/guigl.xcodeproj libs/guigl/example
From: stipe_at_[hidden]
Date: 2008-09-14 17:08:19


Author: srajko
Date: 2008-09-14 17:08:15 EDT (Sun, 14 Sep 2008)
New Revision: 48779
URL: http://svn.boost.org/trac/boost/changeset/48779

Log:
added untyped parameters, static_compound works
Added:
   sandbox/guigl/boost/guigl/view/impl/static_compound.hpp (contents, props changed)
   sandbox/guigl/boost/guigl/view/static_base.hpp (contents, props changed)
   sandbox/guigl/boost/guigl/view/static_compound.hpp (contents, props changed)
   sandbox/guigl/boost/parameter/keyword_base.hpp (contents, props changed)
   sandbox/guigl/boost/parameter/untyped_keyword.hpp (contents, props changed)
   sandbox/guigl/libs/guigl/example/two_buttons.cpp (contents, props changed)
   sandbox/guigl/libs/guigl/example/two_buttons.hpp (contents, props changed)
Text files modified:
   sandbox/guigl/boost/guigl/access.hpp | 22 ++++++-
   sandbox/guigl/boost/guigl/layout/grid.hpp | 48 ++++++++++++++--
   sandbox/guigl/boost/guigl/parameters.hpp | 3
   sandbox/guigl/boost/guigl/view/active_colored.hpp | 4 +
   sandbox/guigl/boost/guigl/view/base.hpp | 3 +
   sandbox/guigl/boost/guigl/view/compound.hpp | 2
   sandbox/guigl/boost/guigl/view/impl/compound.hpp | 4 +
   sandbox/guigl/boost/guigl/view/positioned.hpp | 6 +
   sandbox/guigl/boost/guigl/view/solid_background.hpp | 4 +
   sandbox/guigl/boost/guigl/widget/button.hpp | 10 +++
   sandbox/guigl/boost/guigl/widget/labeled_button.hpp | 1
   sandbox/guigl/boost/parameter/aux_/typed_arg_list.hpp | 107 +++------------------------------------
   sandbox/guigl/boost/parameter/aux_/typed_tagged_argument.hpp | 76 +++++++++-------------------
   sandbox/guigl/boost/parameter/typed_keyword.hpp | 26 +-------
   sandbox/guigl/boost/parameter/typed_name.hpp | 43 ++++++++++++---
   sandbox/guigl/libs/guigl/build/xcodeide/guigl.xcodeproj/project.pbxproj | 14 +++++
   sandbox/guigl/libs/guigl/example/Jamfile | 2
   sandbox/guigl/libs/guigl/example/window_example.cpp | 11 +--
   18 files changed, 182 insertions(+), 204 deletions(-)

Modified: sandbox/guigl/boost/guigl/access.hpp
==============================================================================
--- sandbox/guigl/boost/guigl/access.hpp (original)
+++ sandbox/guigl/boost/guigl/access.hpp 2008-09-14 17:08:15 EDT (Sun, 14 Sep 2008)
@@ -10,6 +10,9 @@
 #define BOOST__GUIGL__ACCESS_HPP
 
 
+#include <boost/guigl/event.hpp>
+
+
 namespace boost { namespace guigl {
 
 namespace view {
@@ -17,11 +20,17 @@
 template<typename BaseView>
 class compound;
 
+template<typename ChildrenSequence, typename BaseView>
+class static_compound;
+
 namespace detail {
 
     template<typename BaseView>
     class compound_event_visitor;
 
+ template<typename ChildrenSequence, typename BaseView>
+ class static_compound_event_visitor;
+
 }
 
 }
@@ -35,16 +44,16 @@
         t.draw();
     }
 
- template<typename T, typename E>
- static bool on_event(T &t, const E& e)
+ template<typename T>
+ static bool on_event(T &t, const event_type& e)
     {
         return t.on_event(e);
     }
     
     template<typename Child, typename Parent>
- static void parent(Child &child, Parent &parent)
+ static void set_parent(Child &child, Parent &parent)
     {
- child.parent(parent);
+ child.set_parent(parent);
     }
 
     friend class window;
@@ -52,6 +61,11 @@
     friend class view::compound;
     template<typename BaseType>
     friend class view::detail::compound_event_visitor;
+
+ template<typename ChildrenSequence, typename BaseView>
+ friend class view::static_compound;
+ template<typename ChildrenSequence, typename BaseType>
+ friend class view::detail::static_compound_event_visitor;
 };
 
 }}

Modified: sandbox/guigl/boost/guigl/layout/grid.hpp
==============================================================================
--- sandbox/guigl/boost/guigl/layout/grid.hpp (original)
+++ sandbox/guigl/boost/guigl/layout/grid.hpp 2008-09-14 17:08:15 EDT (Sun, 14 Sep 2008)
@@ -12,6 +12,7 @@
 
 #include <boost/guigl/view/base.hpp>
 #include <boost/guigl/types.hpp>
+#include <boost/fusion/include/for_each.hpp>
 #include <memory>
 
 
@@ -38,6 +39,24 @@
 
 namespace layout {
 
+namespace detail {
+
+ template<typename Layout>
+ struct apply_layout
+ {
+ apply_layout(Layout &layout)
+ : layout(layout)
+ {}
+ template<typename View>
+ void operator()(View &view) const
+ {
+ view.set_position(layout.next_position());
+ view.set_size(layout.next_size());
+ }
+ Layout &layout;
+ };
+}
+
 class grid
 {
 public:
@@ -51,21 +70,34 @@
         m_dimensions[1] = args[_vertical];
         m_next[0] = m_next[1] = 0;
     }
+ position_type next_position()
+ {
+ position_type result(m_element_size.x * m_next[0], m_element_size.y * m_next[1]);
+ if(++m_next[m_direction] >= m_dimensions[m_direction])
+ {
+ m_next[m_direction] = 0;
+ m_next[!m_direction]++;
+ }
+ return result;
+ }
+ const size_type &next_size()
+ {
+ return m_element_size;
+ }
     
+ template<typename ViewSequence>
+ void apply_layout(ViewSequence &views)
+ {
+ boost::fusion::for_each(views, detail::apply_layout<grid>(*this));
+ }
     template<typename T, typename ArgumentPack>
     T *create(const ArgumentPack &args)
     {
         T *element(new T((
             args,
- _size = m_element_size,
- _position = position_type(m_element_size.x * m_next[0], m_element_size.y * m_next[1])
+ _size = next_size(),
+ _position = next_position()
         )) );
-
- if(++m_next[m_direction] >= m_dimensions[m_direction])
- {
- m_next[m_direction] = 0;
- m_next[!m_direction]++;
- }
         return element;
     }
 private:

Modified: sandbox/guigl/boost/guigl/parameters.hpp
==============================================================================
--- sandbox/guigl/boost/guigl/parameters.hpp (original)
+++ sandbox/guigl/boost/guigl/parameters.hpp 2008-09-14 17:08:15 EDT (Sun, 14 Sep 2008)
@@ -25,6 +25,7 @@
     BOOST_PARAMETER_TYPED_NAME_WDEFAULT(min,const double,0.0)
     BOOST_PARAMETER_TYPED_NAME_WDEFAULT(max,const double,1.0)
     BOOST_PARAMETER_TYPED_NAME_WDEFAULT(step,const double,0.0)
+ BOOST_PARAMETER_UNTYPED_NAME(children)
     
     typedef boost::parameter::aux::empty_typed_arg_list default_parameters;
 }
@@ -40,7 +41,7 @@
 {
     typedef
         boost::parameter::aux::typed_arg_list<
- boost::parameter::aux::typed_tagged_argument<T0>,
+ boost::parameter::aux::typed_tagged_argument<T0, typename T0::value_type>,
             typename argument_pack<T1, T2, T3, T4, T5, T6, T7>::type
> type;
 };

Modified: sandbox/guigl/boost/guigl/view/active_colored.hpp
==============================================================================
--- sandbox/guigl/boost/guigl/view/active_colored.hpp (original)
+++ sandbox/guigl/boost/guigl/view/active_colored.hpp 2008-09-14 17:08:15 EDT (Sun, 14 Sep 2008)
@@ -25,6 +25,10 @@
         : base_type(args)
         , m_active_color(args[_active_color])
     {}
+ active_colored(const active_colored &rhs)
+ : base_type(static_cast<const base_type &>(rhs))
+ , m_active_color(rhs.m_active_color)
+ {}
     
     /** Returns the active color. */
     const color_type &active_color() const

Modified: sandbox/guigl/boost/guigl/view/base.hpp
==============================================================================
--- sandbox/guigl/boost/guigl/view/base.hpp (original)
+++ sandbox/guigl/boost/guigl/view/base.hpp 2008-09-14 17:08:15 EDT (Sun, 14 Sep 2008)
@@ -32,6 +32,9 @@
     
     const size_type &size() const
     { return m_size; }
+
+ void set_size(const size_type &size)
+ { m_size = size; }
     
 protected:
     virtual void draw()=0;

Modified: sandbox/guigl/boost/guigl/view/compound.hpp
==============================================================================
--- sandbox/guigl/boost/guigl/view/compound.hpp (original)
+++ sandbox/guigl/boost/guigl/view/compound.hpp 2008-09-14 17:08:15 EDT (Sun, 14 Sep 2008)
@@ -36,7 +36,7 @@
     compound & operator << (positioned<> *v)
     {
         m_children.push_back(v);
- access::parent(*v, *this);
+ access::set_parent(*v, *this);
         return *this;
     }
     

Modified: sandbox/guigl/boost/guigl/view/impl/compound.hpp
==============================================================================
--- sandbox/guigl/boost/guigl/view/impl/compound.hpp (original)
+++ sandbox/guigl/boost/guigl/view/impl/compound.hpp 2008-09-14 17:08:15 EDT (Sun, 14 Sep 2008)
@@ -65,7 +65,9 @@
                 continue;
             // if we are sending an event to a child view, it must be active
             set_mouse_focus(*it);
- if(access::on_event(*it, this->event_info))
+ button_event translated_event_info(event_info);
+ translated_event_info.position -= it->position();
+ if(access::on_event(*it, translated_event_info))
                 return true;
         }
         return false;

Added: sandbox/guigl/boost/guigl/view/impl/static_compound.hpp
==============================================================================
--- (empty file)
+++ sandbox/guigl/boost/guigl/view/impl/static_compound.hpp 2008-09-14 17:08:15 EDT (Sun, 14 Sep 2008)
@@ -0,0 +1,208 @@
+/*=================================---------------------------------------------
+ Copyright 2008 Stjepan Rajko
+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+-----------------------------------------------===============================*/
+
+#ifndef BOOST__GUIGL__VIEW__IMPL__STATIC_COMPOUND_HPP
+#define BOOST__GUIGL__VIEW__IMPL__STATIC_COMPOUND_HPP
+
+
+#include <boost/guigl/access.hpp>
+#include <boost/guigl/event.hpp>
+#include <boost/guigl/view/static_compound.hpp>
+
+#include <boost/fusion/include/accumulate.hpp>
+#include <boost/fusion/include/for_each.hpp>
+
+
+namespace boost { namespace guigl { namespace view {
+
+namespace detail {
+
+ template<typename StaticCompound>
+ struct draw
+ {
+ template<typename View>
+ void operator()(View &view) const
+ {
+ StaticCompound::draw(view);
+ }
+ };
+
+}
+
+template<typename ChildrenSequence, typename BaseView>
+inline void static_compound<ChildrenSequence, BaseView>::draw_prologue()
+{
+ BaseView::draw_prologue();
+ fusion::for_each(m_children, detail::draw<static_compound>());
+}
+
+
+namespace detail {
+
+inline bool inside(double pos, double min, double max)
+{
+ return (pos >= min && pos <= max);
+}
+
+inline bool inside(const position_type &position, const positioned<> &view)
+{
+ return inside(position.x, view.position().x, view.position().x + view.size().x)
+ && inside(position.y, view.position().y, view.position().y + view.size().y);
+}
+
+
+template<typename Visitor>
+struct propagate_button_event
+{
+ typedef bool result_type;
+
+ propagate_button_event(const Visitor &visitor, const button_event &event_info)
+ : visitor(visitor)
+ , event_info(event_info)
+ {}
+ template<typename ChildView>
+ bool operator()(ChildView &child_view, bool handled)
+ {
+ if(handled)
+ return true;
+ if(!inside(event_info.position, child_view))
+ return false;
+ // if we are sending an event to a child view, it must be active
+ visitor.set_mouse_focus(child_view);
+ button_event translated_event_info(event_info);
+ translated_event_info.position -= child_view.position();
+ if(visitor.on_event(child_view, translated_event_info))
+ return true;
+ return false;
+ }
+
+ const Visitor &visitor;
+ const button_event &event_info;
+};
+
+template<typename Visitor>
+struct propagate_movement_event
+{
+ typedef bool result_type;
+
+ propagate_movement_event(const Visitor &visitor, const movement_event &event_info)
+ : visitor(visitor)
+ , event_info(event_info)
+ {}
+ template<typename ChildView>
+ bool operator()(ChildView &child_view, bool handled)
+ {
+ if(handled)
+ return true;
+ if(!inside(event_info.position, child_view))
+ {
+ if(&child_view == visitor.mouse_focus_child())
+ {
+ // we left the mouse focus child
+ visitor.no_mouse_focus();
+ visitor.on_event(child_view, entry_exit_event(region::exit));
+ }
+ return false;
+ }
+ else
+ {
+ visitor.set_mouse_focus(child_view);
+ // only the mouse focus child gets movement events
+ // forward the movement event
+ movement_event translated_event_info(event_info);
+ translated_event_info.position -= child_view.position();
+ visitor.on_event(child_view, translated_event_info);
+ return true;
+ }
+ }
+
+ const Visitor &visitor;
+ const movement_event &event_info;
+};
+
+template<typename ChildrenSequence, typename BaseView>
+struct static_compound_event_visitor
+ : public boost::static_visitor<>
+{
+ typedef static_compound<ChildrenSequence, BaseView> view_type;
+public:
+ typedef bool result_type;
+
+ static_compound_event_visitor(view_type &view, const event_type &event_info)
+ : view(view), event_info(event_info)
+ {}
+
+ positioned<> *mouse_focus_child() const
+ {
+ return view.m_mouse_focus_child;
+ }
+
+ void no_mouse_focus() const
+ {
+ view.m_mouse_focus_child = 0;
+ }
+ void set_mouse_focus(positioned<> &child) const
+ {
+ if(!view.m_mouse_focus_child)
+ {
+ // we entered the mouse focus child
+ view.m_mouse_focus_child = &child;
+ access::on_event(child, entry_exit_event(region::entry));
+ }
+ else if(view.m_mouse_focus_child != &child)
+ {
+ // we changed the mouse focus child
+ access::on_event(*view.m_mouse_focus_child, entry_exit_event(region::exit));
+ view.m_mouse_focus_child = &child;
+ access::on_event(*view.m_mouse_focus_child, entry_exit_event(region::entry));
+ }
+ }
+
+ bool operator()(const button_event &event_info) const
+ {
+ return boost::fusion::accumulate(view.children(), false, propagate_button_event<static_compound_event_visitor>(*this, event_info));
+ }
+
+ bool operator()(const movement_event &event_info) const
+ {
+ boost::fusion::accumulate(view.children(), false, propagate_movement_event<static_compound_event_visitor>(*this, event_info));
+ return true;
+ }
+
+ bool operator()(const entry_exit_event &event_info) const
+ {
+ if(event_info.region == region::exit && view.m_mouse_focus_child)
+ access::on_event(*view.m_mouse_focus_child, event_info);
+ view.m_mouse_focus_child = 0;
+ return true;
+ }
+
+ template<typename T>
+ static bool on_event(T &t, const event_type& e)
+ {
+ return access::on_event(t, e);
+ }
+
+ view_type &view;
+ const event_type &event_info;
+};
+
+}
+
+template<typename ChildrenSequence, typename BaseView>
+inline bool static_compound<ChildrenSequence, BaseView>::on_event(const event_type &event_info)
+{
+ if(base_type::on_event(event_info))
+ return true;
+ else
+ return boost::apply_visitor( detail::static_compound_event_visitor<ChildrenSequence, BaseView>(*this, event_info), event_info);
+}
+
+}}}
+
+#endif // BOOST__GUIGL__VIEW__IMPL__STATIC_COMPOUND_HPP
\ No newline at end of file

Modified: sandbox/guigl/boost/guigl/view/positioned.hpp
==============================================================================
--- sandbox/guigl/boost/guigl/view/positioned.hpp (original)
+++ sandbox/guigl/boost/guigl/view/positioned.hpp 2008-09-14 17:08:15 EDT (Sun, 14 Sep 2008)
@@ -44,6 +44,10 @@
     const position_type &position() const
     { return m_position; }
 
+ /** Returns the position */
+ void set_position(const position_type &position)
+ { m_position = position; }
+
     /** Returns the topmost ancestor, as defined by following the parent pointer
         as long as the parent is also a positioned<> view. */
     const base *root() const
@@ -60,7 +64,7 @@
     void draw_epilogue();
 
     friend class access;
- void parent(base &parent)
+ void set_parent(base &parent)
     { m_parent = &parent; }
 private:
 

Modified: sandbox/guigl/boost/guigl/view/solid_background.hpp
==============================================================================
--- sandbox/guigl/boost/guigl/view/solid_background.hpp (original)
+++ sandbox/guigl/boost/guigl/view/solid_background.hpp 2008-09-14 17:08:15 EDT (Sun, 14 Sep 2008)
@@ -27,6 +27,10 @@
         : base_type(args)
         , m_background_color(args[_background])
     {}
+ solid_background(const solid_background &rhs)
+ : base_type(static_cast<const base_type &>(rhs))
+ , m_background_color(rhs.m_background_color)
+ {}
     
     /** Returns the bacground color. */
     const color_type &background_color() const

Added: sandbox/guigl/boost/guigl/view/static_base.hpp
==============================================================================
--- (empty file)
+++ sandbox/guigl/boost/guigl/view/static_base.hpp 2008-09-14 17:08:15 EDT (Sun, 14 Sep 2008)
@@ -0,0 +1,51 @@
+/*=================================---------------------------------------------
+ Copyright 2008 Stjepan Rajko
+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+-----------------------------------------------===============================*/
+
+#ifndef BOOST__GUIGL__VIEW__STATIC_BASE_HPP
+#define BOOST__GUIGL__VIEW__STATIC_BASE_HPP
+
+#include <boost/guigl/access.hpp>
+#include <boost/guigl/event.hpp>
+#include <boost/guigl/parameters.hpp>
+
+namespace boost { namespace guigl {
+
+class window;
+
+namespace view {
+
+class static_base
+{
+
+public:
+ template<typename ArgumentPack>
+ static_base(const ArgumentPack &args)
+ : m_size(args[_size])
+ {}
+
+ const size_type &size() const
+ { return m_size; }
+
+protected:
+ void draw_prologue() {}
+ void draw_epilogue() {}
+
+ bool on_event(const event_type &e)
+ {
+ return false;
+ };
+
+ size_type m_size;
+
+ friend class boost::guigl::access;
+};
+
+}}}
+
+
+#endif // BOOST__GUIGL__VIEW__STATIC_BASE_HPP
\ No newline at end of file

Added: sandbox/guigl/boost/guigl/view/static_compound.hpp
==============================================================================
--- (empty file)
+++ sandbox/guigl/boost/guigl/view/static_compound.hpp 2008-09-14 17:08:15 EDT (Sun, 14 Sep 2008)
@@ -0,0 +1,88 @@
+/*=================================---------------------------------------------
+ Copyright 2008 Stjepan Rajko
+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+-----------------------------------------------===============================*/
+
+#ifndef BOOST__GUIGL__VIEW__STATIC_COMPOUND_HPP
+#define BOOST__GUIGL__VIEW__STATIC_COMPOUND_HPP
+
+
+#include <boost/guigl/view/positioned.hpp>
+#include <boost/fusion/include/for_each.hpp>
+
+namespace boost { namespace guigl { namespace view {
+
+namespace detail
+{
+ template<typename StaticCompound>
+ struct draw;
+
+ template<typename ChildrenSequence, typename BaseView>
+ struct static_compound_event_visitor;
+
+ template<typename StaticCompound>
+ struct set_parent
+ {
+ set_parent(StaticCompound &compound)
+ : compound(compound)
+ {}
+
+ void operator()(view::positioned<> &view) const
+ {
+ compound.set_parent_of_child(view);
+ }
+
+ StaticCompound &compound;
+ };
+}
+
+template<typename ChildrenSequence, typename BaseView=base>
+class static_compound : public BaseView
+{
+public:
+ typedef BaseView base_type;
+
+ template<typename ArgumentPack>
+ static_compound(const ArgumentPack &args)
+ : base_type(args)
+ , m_children(args[_children])
+ , m_mouse_focus_child(0)
+ {
+ fusion::for_each(m_children, detail::set_parent<static_compound>(*this));
+ }
+
+ bool on_event(const event_type &event_info);
+
+ const ChildrenSequence &children() const
+ { return m_children; }
+
+protected:
+ void draw_prologue();
+
+ ChildrenSequence &children()
+ { return m_children; }
+
+private:
+ ChildrenSequence m_children;
+ positioned<> * m_mouse_focus_child;
+
+ template<typename View>
+ static void draw(View &view)
+ { access::draw(view); }
+
+ void set_parent_of_child(positioned<> &view)
+ {
+ access::set_parent(view, *this);
+ }
+
+ friend class detail::static_compound_event_visitor<ChildrenSequence, BaseView>;
+ friend class detail::draw<static_compound>;
+ friend class detail::set_parent<static_compound>;
+};
+
+}}}
+
+#endif // BOOST__GUIGL__VIEW__STATIC_COMPOUND_HPP
\ No newline at end of file

Modified: sandbox/guigl/boost/guigl/widget/button.hpp
==============================================================================
--- sandbox/guigl/boost/guigl/widget/button.hpp (original)
+++ sandbox/guigl/boost/guigl/widget/button.hpp 2008-09-14 17:08:15 EDT (Sun, 14 Sep 2008)
@@ -35,7 +35,15 @@
     button(const ArgumentPack &args)
         : button_base_type(args)
     {}
-
+ button(const button &rhs)
+ : base_type(static_cast<const base_type &>(rhs))
+ {}
+
+ button &operator=(const button &rhs)
+ {
+ base_type::operator=(static_cast<const base_type &>(rhs));
+ return *this;
+ }
     boost::signal<void()> on_click;
 protected:
     BOOST_GUIGL_WIDGET_DRAW

Modified: sandbox/guigl/boost/guigl/widget/labeled_button.hpp
==============================================================================
--- sandbox/guigl/boost/guigl/widget/labeled_button.hpp (original)
+++ sandbox/guigl/boost/guigl/widget/labeled_button.hpp 2008-09-14 17:08:15 EDT (Sun, 14 Sep 2008)
@@ -31,6 +31,7 @@
 
 protected:
     void draw();
+ friend class guigl::access;
 };
 
 }}}

Modified: sandbox/guigl/boost/parameter/aux_/typed_arg_list.hpp
==============================================================================
--- sandbox/guigl/boost/parameter/aux_/typed_arg_list.hpp (original)
+++ sandbox/guigl/boost/parameter/aux_/typed_arg_list.hpp 2008-09-14 17:08:15 EDT (Sun, 14 Sep 2008)
@@ -35,7 +35,7 @@
 namespace boost { namespace parameter {
 
 // Forward declaration for aux::arg_list, below.
-template<class T> struct typed_keyword;
+template<class T> struct keyword_base;
 
 namespace aux {
 
@@ -127,7 +127,7 @@
     // in the list that matches the supplied keyword. Just return
     // the default value.
     template <class Tag>
- const typename Tag::value_type &operator[](const typed_keyword<Tag>&) const
+ const typename Tag::value_type &operator[](const keyword_base<Tag>&) const
     {
         return Tag::default_value();
     }
@@ -171,7 +171,7 @@
 #endif
 
 // Forward declaration for typed_arg_list::operator,
-template <class KW>
+template <class KW, class Arg>
 struct typed_tagged_argument;
 
 // A tuple of tagged arguments, terminated with empty_typed_arg_list.
@@ -216,7 +216,7 @@
     template<typename CTaggedArg, typename CNext>
     typed_arg_list(const typed_arg_list<CTaggedArg, CNext> &args)
       : Next(args)
- , arg(args[typed_keyword<key_type>()])
+ , arg(args[keyword_base<key_type>()])
     {}
 
     // Create a new list by prepending arg to a copy of tail. Used
@@ -242,19 +242,8 @@
>::type type;
         };
     };
-
-#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && !BOOST_WORKAROUND(__GNUC__, == 2)
-# if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
- friend yes_tag operator*(typed_arg_list, key_type*);
-# define BOOST_PARAMETER_CALL_HAS_KEY(next, key) (*(next*)0 * (key*)0)
-# else
- // Overload for key_type, so the assert below will fire if the
- // same keyword is used again
- static yes_tag has_key(key_type*);
- using Next::has_key;
     
 # define BOOST_PARAMETER_CALL_HAS_KEY(next, key) next::has_key((key*)0)
-# endif
 
     BOOST_MPL_ASSERT_MSG(
         sizeof(BOOST_PARAMETER_CALL_HAS_KEY(Next,key_type)) == sizeof(no_tag)
@@ -262,7 +251,6 @@
     );
 
 # undef BOOST_PARAMETER_CALL_HAS_KEY
-#endif
     //
     // Begin implementation of indexing operators for looking up
     // specific arguments by name
@@ -282,88 +270,12 @@
         return arg.value ? arg.value.get() : arg.value.construct(d.value);
     }
 
-#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \
- || BOOST_WORKAROUND(__GNUC__, < 3) \
- || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
- // These older compilers don't support the overload set creation
- // idiom well, so we need to do all the return type calculation
- // for the compiler and dispatch through an outer function template
-
- // A metafunction class that, given a keyword, returns the base
- // sublist whose get() function can produce the value for that
- // key.
- struct key_owner
- {
- template<class KW>
- struct apply
- {
- typedef typename mpl::eval_if<
- boost::is_same<KW, key_type>
- , mpl::identity<typed_arg_list<TaggedArg,Next> >
- , mpl::apply_wrap1<typename Next::key_owner,KW>
- >::type type;
- };
- };
-
- // Outer indexing operators that dispatch to the right node's
- // get() function.
- template <class KW>
- typename mpl::apply_wrap3<binding, KW, void_, mpl::true_>::type
- operator[](keyword<KW> const& x) const
- {
- typename mpl::apply_wrap1<key_owner, KW>::type const& sublist = *this;
- return sublist.get(x);
- }
-
- template <class KW, class Default>
- typename mpl::apply_wrap3<binding, KW, Default&, mpl::true_>::type
- operator[](default_<KW, Default> x) const
- {
- typename mpl::apply_wrap1<key_owner, KW>::type const& sublist = *this;
- return sublist.get(x);
- }
-
- template <class KW, class F>
- typename mpl::apply_wrap3<
- binding,KW
- , typename result_of0<F>::type
- , mpl::true_
- >::type
- operator[](lazy_default<KW,F> x) const
- {
- typename mpl::apply_wrap1<key_owner, KW>::type const& sublist = *this;
- return sublist.get(x);
- }
-
- // These just return the stored value; when empty_typed_arg_list is
- // reached, indicating no matching argument was passed, the
- // default is returned, or if no default_ or lazy_default was
- // passed, compilation fails.
- reference get(keyword<key_type> const&) const
+ reference operator[](keyword_base<key_type> const&) const
     {
         BOOST_MPL_ASSERT_NOT((holds_maybe));
         return arg.value;
     }
 
- template <class Default>
- reference get(default_<key_type,Default> const& d) const
- {
- return get_default(d, holds_maybe());
- }
-
- template <class Default>
- reference get(lazy_default<key_type, Default>) const
- {
- return arg.value;
- }
-
-#else
-
- reference operator[](typed_keyword<key_type> const&) const
- {
- BOOST_MPL_ASSERT_NOT((holds_maybe));
- return arg.value;
- }
 /*
     template <class Default>
     reference operator[](default_<key_type, Default> const& d) const
@@ -406,15 +318,14 @@
     // Builds an overload set including satisfies functions defined
     // in base classes.
     using Next::satisfies;
-#endif
 
     // Comma operator to compose argument list without using parameters<>.
     // Useful for argument lists with undetermined length.
- template <class KW>
- typed_arg_list<typed_tagged_argument<KW>, self>
- operator,(typed_tagged_argument<KW> x) const
+ template <class KW, class Arg>
+ typed_arg_list<typed_tagged_argument<KW, Arg>, self>
+ operator,(typed_tagged_argument<KW, Arg> x) const
     {
- return typed_arg_list<typed_tagged_argument<KW>, self>(x, *this);
+ return typed_arg_list<typed_tagged_argument<KW, Arg>, self>(x, *this);
     }
 
     // MPL sequence support

Modified: sandbox/guigl/boost/parameter/aux_/typed_tagged_argument.hpp
==============================================================================
--- sandbox/guigl/boost/parameter/aux_/typed_tagged_argument.hpp (original)
+++ sandbox/guigl/boost/parameter/aux_/typed_tagged_argument.hpp 2008-09-14 17:08:15 EDT (Sun, 14 Sep 2008)
@@ -22,17 +22,22 @@
 # include <boost/type_traits/is_convertible.hpp>
 # include <boost/type_traits/is_reference.hpp>
 
-namespace boost { namespace parameter { namespace aux {
+namespace boost { namespace parameter {
+
+template <class Tag>
+struct keyword_base;
+
+namespace aux {
 
 // Holds a reference to an argument of type Keyword::value_type associated with
 // keyword Keyword
     
-template <class Keyword>
+template <class Keyword, class Arg>
 struct typed_tagged_argument : tagged_argument_base
 {
     typedef Keyword key_type;
- typedef typename Keyword::value_type value_type;
- typedef value_type& reference;
+ typedef Arg value_type;
+ typedef Arg& reference;
 
     typed_tagged_argument(reference x) : value(x) {}
 
@@ -54,71 +59,41 @@
 
     // Comma operator to compose argument list without using parameters<>.
     // Useful for argument lists with undetermined length.
- template <class Keyword2>
+ template <class Keyword2, class Arg2>
     typed_arg_list<
- typed_tagged_argument<Keyword>
- , typed_arg_list<typed_tagged_argument<Keyword2> >
+ typed_tagged_argument
+ , typed_arg_list<typed_tagged_argument<Keyword2, Arg2> >
>
- operator,(typed_tagged_argument<Keyword2> x) const
+ operator,(typed_tagged_argument<Keyword2, Arg2> x) const
     {
         return typed_arg_list<
- typed_tagged_argument<Keyword>
- , typed_arg_list<typed_tagged_argument<Keyword2> >
+ typed_tagged_argument
+ , typed_arg_list<typed_tagged_argument<Keyword2, Arg2> >
>(
             *this
- , typed_arg_list<typed_tagged_argument<Keyword2> >(x, empty_typed_arg_list())
+ , typed_arg_list<typed_tagged_argument<Keyword2, Arg2> >(x, empty_typed_arg_list())
         );
     }
 
- reference operator[](keyword<Keyword> const&) const
- {
- return value;
- }
-
-# if defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
- template <class KW, class Default>
- Default& get_with_default(default_<KW,Default> const& x, int) const
+ // If this function is called, it means there is no argument
+ // in the list that matches the supplied keyword. Just return
+ // the default value.
+ template <class Tag>
+ typename Tag::value_type & operator[](const keyword_base<Tag>&) const
     {
- return x.value;
+ return Tag::default_value();
     }
 
- template <class Default>
- reference get_with_default(default_<key_type,Default> const&, long) const
+ reference operator[](keyword_base<Keyword> const&) const
     {
         return value;
     }
 
- template <class KW, class Default>
- typename mpl::apply_wrap3<binding, KW, Default&, mpl::true_>::type
- operator[](default_<KW,Default> const& x) const
- {
- return get_with_default(x, 0L);
- }
-
- template <class KW, class F>
- typename result_of0<F>::type
- get_with_lazy_default(lazy_default<KW,F> const& x, int) const
- {
- return x.compute_default();
- }
-
- template <class F>
- reference get_with_lazy_default(lazy_default<key_type,F> const&, long) const
+/* reference operator[](untyped_keyword<Keyword> const&) const
     {
         return value;
- }
+ }*/
 
- template <class KW, class F>
- typename mpl::apply_wrap3<
- binding,KW
- , typename result_of0<F>::type
- , mpl::true_
- >::type
- operator[](lazy_default<KW,F> const& x) const
- {
- return get_with_lazy_default(x, 0L);
- }
-# else
     template <class Default>
     reference operator[](default_<key_type,Default> const& x) const
     {
@@ -152,7 +127,6 @@
     satisfies(
         parameter_requirements<key_type,Predicate,HasDefault>*
     );
-# endif
 
     reference value;
 # if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1310))

Added: sandbox/guigl/boost/parameter/keyword_base.hpp
==============================================================================
--- (empty file)
+++ sandbox/guigl/boost/parameter/keyword_base.hpp 2008-09-14 17:08:15 EDT (Sun, 14 Sep 2008)
@@ -0,0 +1,55 @@
+/*=================================---------------------------------------------
+ Copyright Daniel Wallin, David Abrahams 2005.
+ Copyright 2008 Stjepan Rajko
+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+-----------------------------------------------===============================*/
+
+#ifndef KEYWORD_BASE_050328_HPP
+#define KEYWORD_BASE_050328_HPP
+
+#include <boost/parameter/aux_/unwrap_cv_reference.hpp>
+#include <boost/parameter/aux_/typed_tagged_argument.hpp>
+#include <boost/parameter/aux_/default.hpp>
+
+namespace boost { namespace parameter {
+
+// Instances of unique specializations of keyword<...> serve to
+// associate arguments with parameter names. For example:
+//
+// struct rate_; // parameter names
+// struct skew_;
+// namespace
+// {
+// keyword<rate_> rate; // keywords
+// keyword<skew_> skew;
+// }
+//
+// ...
+//
+// f(rate = 1, skew = 2.4);
+//
+template <class Tag>
+struct keyword_base
+{
+ template <class Default>
+ aux::default_<Tag, Default>
+ operator|(Default& default_) const
+ {
+ return aux::default_<Tag, Default>(default_);
+ }
+
+ template <class Default>
+ aux::lazy_default<Tag, Default>
+ operator||(Default& default_) const
+ {
+ return aux::lazy_default<Tag, Default>(default_);
+ }
+};
+
+}} // namespace boost::parameter
+
+#endif // KEYWORD_BASE_050328_HPP
+

Modified: sandbox/guigl/boost/parameter/typed_keyword.hpp
==============================================================================
--- sandbox/guigl/boost/parameter/typed_keyword.hpp (original)
+++ sandbox/guigl/boost/parameter/typed_keyword.hpp 2008-09-14 17:08:15 EDT (Sun, 14 Sep 2008)
@@ -10,9 +10,7 @@
 #ifndef TYPED_KEYWORD_050328_HPP
 #define TYPED_KEYWORD_050328_HPP
 
-#include <boost/parameter/aux_/unwrap_cv_reference.hpp>
-#include <boost/parameter/aux_/typed_tagged_argument.hpp>
-#include <boost/parameter/aux_/default.hpp>
+#include <boost/parameter/keyword_base.hpp>
 
 namespace boost { namespace parameter {
 
@@ -32,9 +30,9 @@
 // f(rate = 1, skew = 2.4);
 //
 template <class Tag>
-struct typed_keyword
+struct typed_keyword : public keyword_base<Tag>
 {
- typedef aux::typed_tagged_argument<Tag> typed_tagged_argument_type;
+ typedef aux::typed_tagged_argument<Tag, typename Tag::value_type> typed_tagged_argument_type;
     
     typed_tagged_argument_type const
     operator=(typename Tag::value_type& x) const
@@ -42,20 +40,6 @@
         return typed_tagged_argument_type(x);
     }
 
- template <class Default>
- aux::default_<Tag, Default>
- operator|(Default& default_) const
- {
- return aux::default_<Tag, Default>(default_);
- }
-
- template <class Default>
- aux::lazy_default<Tag, Default>
- operator||(Default& default_) const
- {
- return aux::lazy_default<Tag, Default>(default_);
- }
-
  public: // Insurance against ODR violations
     
     // People will need to define these keywords in header files. To
@@ -73,9 +57,9 @@
 };
 
 template <class Tag>
-typed_keyword<Tag> const typed_keyword<Tag>::instance = {};
+typed_keyword<Tag> const typed_keyword<Tag>::instance = typed_keyword<Tag>();
 
 }} // namespace boost::parameter
 
-#endif // KEYWORD_050328_HPP
+#endif // TYPED_KEYWORD_050328_HPP
 

Modified: sandbox/guigl/boost/parameter/typed_name.hpp
==============================================================================
--- sandbox/guigl/boost/parameter/typed_name.hpp (original)
+++ sandbox/guigl/boost/parameter/typed_name.hpp 2008-09-14 17:08:15 EDT (Sun, 14 Sep 2008)
@@ -11,6 +11,7 @@
 # define BOOST_PARAMETER_TYPED_NAME_060806_HPP
 
 # include <boost/parameter/typed_keyword.hpp>
+# include <boost/parameter/untyped_keyword.hpp>
 # include <boost/parameter/name.hpp>
 # include <boost/detail/workaround.hpp>
 # include <boost/preprocessor/cat.hpp>
@@ -67,18 +68,39 @@
 
 
 # if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
-# define BOOST_PARAMETER_TYPED_NAME_OBJECT(tag, name) \
- static ::boost::parameter::typed_keyword<tag> const& name \
- = ::boost::parameter::typed_keyword<tag>::instance;
+# define BOOST_PARAMETER_TYPED_NAME_OBJECT(tag, name, keyword) \
+ static ::boost::parameter::keyword<tag> const& name \
+ = ::boost::parameter::keyword<tag>::instance;
 # else
-# define BOOST_PARAMETER_TYPED_NAME_OBJECT(tag, name) \
+# define BOOST_PARAMETER_TYPED_NAME_OBJECT(tag, name, keyword) \
     namespace \
     { \
- ::boost::parameter::typed_keyword<tag> const& name \
- = ::boost::parameter::typed_keyword<tag>::instance; \
+ ::boost::parameter::keyword<tag> const& name \
+ = ::boost::parameter::keyword<tag>::instance; \
     }
 # endif
 
+# define BOOST_PARAMETER_BASIC_UNTYPED_NAME(tag_namespace, tag, name) \
+ namespace tag_namespace \
+ { \
+ struct tag \
+ { \
+ static char const* keyword_name() \
+ { \
+ return BOOST_PP_STRINGIZE(tag); \
+ } \
+ \
+ typedef boost::parameter::value_type< \
+ boost::mpl::_2, tag, boost::parameter::void_ \
+ > _; \
+ \
+ typedef boost::parameter::value_type< \
+ boost::mpl::_2, tag, boost::parameter::void_ \
+ > _1; \
+ }; \
+ } \
+ BOOST_PARAMETER_TYPED_NAME_OBJECT(tag_namespace::tag, name, untyped_keyword)
+
 # define BOOST_PARAMETER_BASIC_TYPED_NAME(tag_namespace, tag, name, type) \
     namespace tag_namespace \
     { \
@@ -97,10 +119,10 @@
               boost::mpl::_2, tag, boost::parameter::void_ \
> _1; \
                                                                     \
- typedef type value_type; \
+ typedef type value_type; \
       }; \
     } \
- BOOST_PARAMETER_TYPED_NAME_OBJECT(tag_namespace::tag, name)
+ BOOST_PARAMETER_TYPED_NAME_OBJECT(tag_namespace::tag, name, typed_keyword)
 
 # define BOOST_PARAMETER_BASIC_TYPED_NAME_WDEFAULT(tag_namespace, tag, name, type, default_v) \
     namespace tag_namespace \
@@ -130,8 +152,11 @@
                                                                     \
       }; \
     } \
- BOOST_PARAMETER_TYPED_NAME_OBJECT(tag_namespace::tag, name)
+ BOOST_PARAMETER_TYPED_NAME_OBJECT(tag_namespace::tag, name, typed_keyword)
+
 
+# define BOOST_PARAMETER_UNTYPED_NAME(name) \
+ BOOST_PARAMETER_BASIC_UNTYPED_NAME(tag, name, BOOST_PP_CAT(_, name))
 
 # define BOOST_PARAMETER_TYPED_NAME(name,type) \
     BOOST_PARAMETER_BASIC_TYPED_NAME(tag, name, BOOST_PP_CAT(_, name), type)

Added: sandbox/guigl/boost/parameter/untyped_keyword.hpp
==============================================================================
--- (empty file)
+++ sandbox/guigl/boost/parameter/untyped_keyword.hpp 2008-09-14 17:08:15 EDT (Sun, 14 Sep 2008)
@@ -0,0 +1,71 @@
+/*=================================---------------------------------------------
+ Copyright Daniel Wallin, David Abrahams 2005.
+ Copyright 2008 Stjepan Rajko
+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+-----------------------------------------------===============================*/
+
+#ifndef UNTYPED_KEYWORD_050328_HPP
+#define UNTYPED_KEYWORD_050328_HPP
+
+#include <boost/parameter/keyword_base.hpp>
+
+namespace boost { namespace parameter {
+
+// Instances of unique specializations of keyword<...> serve to
+// associate arguments with parameter names. For example:
+//
+// struct rate_; // parameter names
+// struct skew_;
+// namespace
+// {
+// keyword<rate_> rate; // keywords
+// keyword<skew_> skew;
+// }
+//
+// ...
+//
+// f(rate = 1, skew = 2.4);
+//
+template <class Tag>
+struct untyped_keyword : public keyword_base<Tag>
+{
+ template<typename T>
+ aux::typed_tagged_argument<Tag, T> const
+ operator=(T& x) const
+ {
+ return aux::typed_tagged_argument<Tag, T>(x);
+ }
+
+ template<typename T>
+ aux::typed_tagged_argument<Tag, const T> const
+ operator=(const T& x) const
+ {
+ return aux::typed_tagged_argument<Tag, const T>(x);
+ }
+
+ public: // Insurance against ODR violations
+
+ // People will need to define these keywords in header files. To
+ // prevent ODR violations, it's important that the keyword used in
+ // every instantiation of a function template is the same object.
+ // We provide a reference to a common instance of each keyword
+ // object and prevent construction by users.
+ static untyped_keyword<Tag> const instance;
+
+ // This interface is deprecated
+ static untyped_keyword<Tag>& get()
+ {
+ return const_cast<typed_keyword<Tag>&>(instance);
+ }
+};
+
+template <class Tag>
+untyped_keyword<Tag> const untyped_keyword<Tag>::instance = untyped_keyword<Tag>();
+
+}} // namespace boost::parameter
+
+#endif // UNTYPED_KEYWORD_050328_HPP
+

Modified: sandbox/guigl/libs/guigl/build/xcodeide/guigl.xcodeproj/project.pbxproj
==============================================================================
--- sandbox/guigl/libs/guigl/build/xcodeide/guigl.xcodeproj/project.pbxproj (original)
+++ sandbox/guigl/libs/guigl/build/xcodeide/guigl.xcodeproj/project.pbxproj 2008-09-14 17:08:15 EDT (Sun, 14 Sep 2008)
@@ -133,6 +133,9 @@
                 08998DDF0E528C1F00F583A2 /* window.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = window.hpp; sourceTree = "<group>"; };
                 089B15050E5302870033B2D8 /* test_field_map.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_field_map.cpp; sourceTree = "<group>"; };
                 089B15410E5304660033B2D8 /* types.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = types.hpp; sourceTree = "<group>"; };
+ 089C813C0E7D814B00CE0901 /* untyped_keyword.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = untyped_keyword.hpp; sourceTree = "<group>"; };
+ 089C81CF0E7D8EEB00CE0901 /* keyword_base.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = keyword_base.hpp; sourceTree = "<group>"; };
+ 089C81F20E7D949400CE0901 /* two_buttons.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = two_buttons.cpp; sourceTree = "<group>"; };
                 089D83740E5A35D800325868 /* parameters.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = parameters.hpp; sourceTree = "<group>"; };
                 089D83780E5A3AA900325868 /* test_parameter_map_compilation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_parameter_map_compilation.cpp; sourceTree = "<group>"; };
                 089D83800E5A3C0B00325868 /* test_parameter_map_compilation.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = test_parameter_map_compilation.hpp; sourceTree = "<group>"; };
@@ -143,10 +146,13 @@
                 08A048C40E77A1B70034FD11 /* navigable.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = navigable.hpp; sourceTree = "<group>"; };
                 08A048CF0E77A2E70034FD11 /* navigable.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = navigable.hpp; sourceTree = "<group>"; };
                 08A13C090E535040008C8A10 /* field_map.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = field_map.hpp; sourceTree = "<group>"; };
+ 08A6D3950E7B99C700BF2671 /* two_buttons.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = two_buttons.hpp; sourceTree = "<group>"; };
                 08A77AB30E4F91AA00B8793E /* Jamroot */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = Jamroot; path = ../../../../Jamroot; sourceTree = SOURCE_ROOT; };
                 08A77AB40E4F91AB00B8793E /* LICENSE_1_0.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = LICENSE_1_0.txt; path = ../../../../LICENSE_1_0.txt; sourceTree = SOURCE_ROOT; };
                 08A77B010E4FC51C00B8793E /* Jamfile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.jam; path = Jamfile; sourceTree = "<group>"; };
                 08AD8F620E5CD63400BFB2C8 /* opengl.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = opengl.hpp; sourceTree = "<group>"; };
+ 08ADC1F90E7B62BD00D8CB9D /* static_compound.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = static_compound.hpp; sourceTree = "<group>"; };
+ 08ADC1FD0E7B64E100D8CB9D /* static_compound.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = static_compound.hpp; sourceTree = "<group>"; };
                 08D0F2550E6712E90026C6DF /* active_colored.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = active_colored.hpp; sourceTree = "<group>"; };
                 08D0F25D0E67139E0026C6DF /* active_colored.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = active_colored.hpp; sourceTree = "<group>"; };
                 08D5606D0E52901F005A2391 /* window.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = window.cpp; sourceTree = "<group>"; };
@@ -155,6 +161,7 @@
                 08D560D70E5299E6005A2391 /* window_example.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = window_example.cpp; sourceTree = "<group>"; };
                 08D5614B0E529DF1005A2391 /* application.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = application.hpp; sourceTree = "<group>"; };
                 08D561500E529E3E005A2391 /* application.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = application.cpp; sourceTree = "<group>"; };
+ 08DD9E4D0E7B2799008DC46A /* static_base.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = static_base.hpp; sourceTree = "<group>"; };
                 08E17F600E76DE81008EAE5E /* three_dimensional.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = three_dimensional.hpp; sourceTree = "<group>"; };
                 08E17F660E76E062008EAE5E /* three_dimensional.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = three_dimensional.hpp; sourceTree = "<group>"; };
                 08E17F6E0E773D25008EAE5E /* two_spheres.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = two_spheres.cpp; sourceTree = "<group>"; };
@@ -197,6 +204,8 @@
                                 08D560D70E5299E6005A2391 /* window_example.cpp */,
                                 08E17F6E0E773D25008EAE5E /* two_spheres.cpp */,
                                 08E17F6F0E773D30008EAE5E /* two_spheres.hpp */,
+ 08A6D3950E7B99C700BF2671 /* two_buttons.hpp */,
+ 089C81F20E7D949400CE0901 /* two_buttons.cpp */,
                         );
                         name = example;
                         path = ../../example;
@@ -219,6 +228,8 @@
                                 08D0F2550E6712E90026C6DF /* active_colored.hpp */,
                                 08E17F600E76DE81008EAE5E /* three_dimensional.hpp */,
                                 08A048C40E77A1B70034FD11 /* navigable.hpp */,
+ 08DD9E4D0E7B2799008DC46A /* static_base.hpp */,
+ 08ADC1F90E7B62BD00D8CB9D /* static_compound.hpp */,
                         );
                         path = view;
                         sourceTree = "<group>";
@@ -250,6 +261,7 @@
                                 08D0F25D0E67139E0026C6DF /* active_colored.hpp */,
                                 08E17F660E76E062008EAE5E /* three_dimensional.hpp */,
                                 08A048CF0E77A2E70034FD11 /* navigable.hpp */,
+ 08ADC1FD0E7B64E100D8CB9D /* static_compound.hpp */,
                         );
                         path = impl;
                         sourceTree = "<group>";
@@ -358,7 +370,9 @@
                         isa = PBXGroup;
                         children = (
                                 08F5068B0E5B41900020D95E /* aux_ */,
+ 089C81CF0E7D8EEB00CE0901 /* keyword_base.hpp */,
                                 089E34A60E5BB90900D9AD51 /* typed_keyword.hpp */,
+ 089C813C0E7D814B00CE0901 /* untyped_keyword.hpp */,
                                 089E34AB0E5C865400D9AD51 /* typed_name.hpp */,
                         );
                         name = parameter;

Modified: sandbox/guigl/libs/guigl/example/Jamfile
==============================================================================
--- sandbox/guigl/libs/guigl/example/Jamfile (original)
+++ sandbox/guigl/libs/guigl/example/Jamfile 2008-09-14 17:08:15 EDT (Sun, 14 Sep 2008)
@@ -11,4 +11,4 @@
         <library>$(TOP)/libs/guigl/build//boost_guigl/<link>static
     ;
 
-exe window_example : window_example.cpp two_spheres.cpp ;
\ No newline at end of file
+exe window_example : window_example.cpp two_spheres.cpp two_buttons.cpp ;
\ No newline at end of file

Added: sandbox/guigl/libs/guigl/example/two_buttons.cpp
==============================================================================
--- (empty file)
+++ sandbox/guigl/libs/guigl/example/two_buttons.cpp 2008-09-14 17:08:15 EDT (Sun, 14 Sep 2008)
@@ -0,0 +1,18 @@
+/*=================================---------------------------------------------
+ Copyright 2008 Stjepan Rajko
+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+-----------------------------------------------===============================*/
+
+
+#include "two_buttons.hpp"
+#include <boost/guigl/view/impl/static_compound.hpp>
+
+
+void two_buttons::draw()
+{
+ draw_prologue();
+ draw_epilogue();
+}
\ No newline at end of file

Added: sandbox/guigl/libs/guigl/example/two_buttons.hpp
==============================================================================
--- (empty file)
+++ sandbox/guigl/libs/guigl/example/two_buttons.hpp 2008-09-14 17:08:15 EDT (Sun, 14 Sep 2008)
@@ -0,0 +1,45 @@
+/*=================================---------------------------------------------
+ Copyright 2008 Stjepan Rajko
+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+-----------------------------------------------===============================*/
+
+#ifndef BOOST__GUIGL__EXAMPLE__TWO_BUTTONS_HPP
+#define BOOST__GUIGL__EXAMPLE__TWO_BUTTONS_HPP
+
+#include <boost/guigl/view/static_compound.hpp>
+#include <boost/guigl/widget/labeled_button.hpp>
+#include <boost/guigl/layout/grid.hpp>
+#include <boost/fusion/include/vector.hpp>
+#include <boost/fusion/include/make_vector.hpp>
+
+typedef
+ boost::guigl::view::static_compound<boost::fusion::vector<
+ boost::guigl::widget::labeled_button,
+ boost::guigl::widget::labeled_button
+ >,
+ boost::guigl::view::positioned<>
+ > two_buttons_base_type;
+
+class two_buttons : public two_buttons_base_type
+{
+ typedef two_buttons_base_type base_type;
+public:
+ template<typename Args>
+ two_buttons(const Args &args)
+ : base_type((args, boost::guigl::_children=boost::fusion::make_vector(
+ boost::guigl::widget::labeled_button((boost::guigl::_label = "top button", boost::guigl::_background = boost::guigl::color_type(0.5,0.5,0.5))),
+ boost::guigl::widget::labeled_button(boost::guigl::_label = "bottom button")
+ ) ))
+ {
+ using namespace boost::guigl::keywords;
+ boost::guigl::layout::grid l((_grid_size=args[_size], _vertical=2));
+ l.apply_layout(children());
+ }
+protected:
+ void draw();
+};
+
+#endif // BOOST__GUIGL__EXAMPLE__TWO_BUTTONS_HPP
\ No newline at end of file

Modified: sandbox/guigl/libs/guigl/example/window_example.cpp
==============================================================================
--- sandbox/guigl/libs/guigl/example/window_example.cpp (original)
+++ sandbox/guigl/libs/guigl/example/window_example.cpp 2008-09-14 17:08:15 EDT (Sun, 14 Sep 2008)
@@ -18,6 +18,7 @@
 #include <boost/bind/placeholders.hpp>
 
 #include "two_spheres.hpp"
+#include "two_buttons.hpp"
 
 #include <iostream>
 
@@ -70,13 +71,9 @@
     s->on_value_change.connect(boost::bind(&widget::labeled_button::set_color, b1, boost::bind(make_grey, _1)));
     
     test_window2
- << new widget::labeled_button((
- _size=size_type(100,30),
- _position=position_type(50, 5),
- _background=color_type(0.5,0.5,0.5),
- _active_color=color_type(0,1,0),
- _color=color_type(1,1,1),
- _label="Button 2"));
+ << new two_buttons((
+ _size=size_type(100,50),
+ _position=position_type(50, 5) ));
     
     layout::grid grid_layout(( _grid_size=test_window3.size(), _horizontal=3, _vertical=3 ));
     for(int i=1; i<=9; i++)


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