Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r52024 - sandbox-branches/andreo/guigl/boost/guigl/view
From: stipe_at_[hidden]
Date: 2009-03-27 16:44:30


Author: srajko
Date: 2009-03-27 16:44:30 EDT (Fri, 27 Mar 2009)
New Revision: 52024
URL: http://svn.boost.org/trac/boost/changeset/52024

Log:
moving specialization out of the class
Text files modified:
   sandbox-branches/andreo/guigl/boost/guigl/view/base.hpp | 57 ++++++++++++++++++++-------------------
   1 files changed, 29 insertions(+), 28 deletions(-)

Modified: sandbox-branches/andreo/guigl/boost/guigl/view/base.hpp
==============================================================================
--- sandbox-branches/andreo/guigl/boost/guigl/view/base.hpp (original)
+++ sandbox-branches/andreo/guigl/boost/guigl/view/base.hpp 2009-03-27 16:44:30 EDT (Fri, 27 Mar 2009)
@@ -59,9 +59,36 @@
     template<class PositionTag>
     position_type point() const;
 
+
+ template<class SegmentTag>
+ inline segment_type segment() const;
+
+protected:
+ virtual void draw() = 0;
+ void draw_prologue()
+ {
+ glEnable(GL_BLEND);
+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+ }
+
+ void draw_epilogue()
+ {
+ glDisable(GL_BLEND);
+ }
+
+ virtual bool on_event(const event_type &e)
+ {
+ return false;
+ };
+
+ size_type m_size;
+
+ friend class boost::guigl::access;
+};
+
 #define BOOST_GUIGL_SPECIAL_POINT_IMPL(point_tag_, val1_, val2_) \
   template<> \
- inline position_type point<point_tag_>() const \
+ inline position_type base::point<point_tag_>() const \
       { return position_type(val1_, val2_); }
   
     BOOST_GUIGL_SPECIAL_POINT_IMPL(LT, 0., 0.);
@@ -74,12 +101,9 @@
     BOOST_GUIGL_SPECIAL_POINT_IMPL(RC, size().x, size().y/2);
     BOOST_GUIGL_SPECIAL_POINT_IMPL(RB, size().x, size().y);
 
- template<class SegmentTag>
- inline segment_type segment() const;
-
 #define BOOST_GUIGL_SPECIAL_SEGMENT_IMPL(segment_tag_, point_tag1_, point_tag2_) \
   template<> \
- inline segment_type segment<segment_tag_>() const \
+ inline segment_type base::segment<segment_tag_>() const \
       { \
       return segment_type(point<point_tag1_>(), point<point_tag2_>()); \
       }
@@ -93,29 +117,6 @@
     BOOST_GUIGL_SPECIAL_SEGMENT_IMPL(D1, LT, RB);
     BOOST_GUIGL_SPECIAL_SEGMENT_IMPL(D2, RT, LB);
 
-protected:
- virtual void draw() = 0;
- void draw_prologue()
- {
- glEnable(GL_BLEND);
- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- }
-
- void draw_epilogue()
- {
- glDisable(GL_BLEND);
- }
-
- virtual bool on_event(const event_type &e)
- {
- return false;
- };
-
- size_type m_size;
-
- friend class boost::guigl::access;
-};
-
 }}}
 
 


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