[cluttermm_tutorial] Comment out overrides of vfuncs recently removed from Actor.



commit 8a56e8b5191b9ad42156679ed3f9a1ea0e75f99e
Author: Murray Cumming <murrayc murrayc com>
Date:   Thu Apr 21 09:49:17 2016 +0200

    Comment out overrides of vfuncs recently removed from Actor.
    
    This does make these custom actors/containers nearly useless.
    See https://bugzilla.gnome.org/show_bug.cgi?id=763073#c7

 examples/custom_container/examplebox.cc  |   12 ++++++++----
 examples/custom_container/examplebox.h   |    4 ++--
 examples/scrolling/scrollingcontainer.cc |    6 ++++++
 examples/scrolling/scrollingcontainer.h  |    4 ++--
 4 files changed, 18 insertions(+), 8 deletions(-)
---
diff --git a/examples/custom_container/examplebox.cc b/examples/custom_container/examplebox.cc
index ae8cf5c..cde3053 100644
--- a/examples/custom_container/examplebox.cc
+++ b/examples/custom_container/examplebox.cc
@@ -139,21 +139,23 @@ void Box::hide_all_vfunc()
     (*p)->hide();
 }
 
+/*
 void Box::pick_vfunc(const Clutter::Color& color)
 {
   // Call the base class so we get  a bounding box painted (if we are reactive):
   Clutter::Actor::pick_vfunc(color);
 
-  /* TODO: Do something with the color?
-   * In clutter 0.8 we used it to call clutter_actor_pick() on the children,
-   * but now we call clutter_actor_paint() instead.
-   */
+  // TODO: Do something with the color?
+  // In clutter 0.8 we used it to call clutter_actor_pick() on the children,
+  // but now we call clutter_actor_paint() instead.
+  //
   for(ChildrenList::iterator p = children_.begin(); p != children_.end(); ++p)
   {
     if((*p)->is_mapped())
       (*p)->paint();
   }
 }
+*/
 
 /*
  * For this container, the preferred width is the sum of the widths
@@ -214,6 +216,7 @@ void Box::get_preferred_height_vfunc(float /* for_width */,
   natural_height_p = natural_height;
 }
 
+/*
 void Box::allocate_vfunc(const Clutter::ActorBox& box, Clutter::AllocationFlags absolute_origin_changed)
 {
   float child_x = 0;
@@ -238,5 +241,6 @@ void Box::allocate_vfunc(const Clutter::ActorBox& box, Clutter::AllocationFlags
 
   Clutter::Actor::allocate_vfunc(box, absolute_origin_changed);
 }
+*/
 
 } // namespace Tutorial
diff --git a/examples/custom_container/examplebox.h b/examples/custom_container/examplebox.h
index 4c27a02..04aa998 100644
--- a/examples/custom_container/examplebox.h
+++ b/examples/custom_container/examplebox.h
@@ -48,12 +48,12 @@ protected:
   virtual void paint_vfunc();
   virtual void show_all_vfunc();
   virtual void hide_all_vfunc();
-  virtual void pick_vfunc(const Clutter::Color& color);
+  //virtual void pick_vfunc(const Clutter::Color& color);
   virtual void get_preferred_width_vfunc(float for_height,
     float& min_width_p, float& natural_width_p);
   virtual void get_preferred_height_vfunc(float for_width,
     float& min_height_p, float& natural_height_p);
-  virtual void allocate_vfunc(const Clutter::ActorBox& box, Clutter::AllocationFlags 
absolute_origin_changed);
+  //virtual void allocate_vfunc(const Clutter::ActorBox& box, Clutter::AllocationFlags 
absolute_origin_changed);
 
 private:
   typedef std::list< Glib::RefPtr<Clutter::Actor> > ChildrenList;
diff --git a/examples/scrolling/scrollingcontainer.cc b/examples/scrolling/scrollingcontainer.cc
index 5cec357..b990b0d 100644
--- a/examples/scrolling/scrollingcontainer.cc
+++ b/examples/scrolling/scrollingcontainer.cc
@@ -21,6 +21,7 @@
 namespace
 {
 
+/*
 static void allocate_child(const Glib::RefPtr<Clutter::Actor>& actor,
   int& child_x, Clutter::AllocationFlags absolute_origin_changed)
 {
@@ -38,6 +39,7 @@ static void allocate_child(const Glib::RefPtr<Clutter::Actor>& actor,
 
   child_x += width;
 }
+*/
 
 } // anonymous namespace
 
@@ -148,12 +150,15 @@ void ScrollingContainer::hide_all_vfunc()
   children_->hide_all();
 }
 
+/*
 void ScrollingContainer::pick_vfunc(const Clutter::Color& color)
 {
   // Call the base class so we get a bounding box painted (if we are reactive):
   Clutter::Actor::pick_vfunc(color);
 }
+*/
 
+/*
 void ScrollingContainer::allocate_vfunc(const Clutter::ActorBox& box, Clutter::AllocationFlags 
absolute_origin_changed)
 {
   const float width  = std::max<float>(0, box.get_width());
@@ -175,5 +180,6 @@ void ScrollingContainer::allocate_vfunc(const Clutter::ActorBox& box, Clutter::A
 
   Clutter::Actor::allocate_vfunc(box, absolute_origin_changed);
 }
+*/
 
 } // namespace Tutorial
diff --git a/examples/scrolling/scrollingcontainer.h b/examples/scrolling/scrollingcontainer.h
index 7ee764d..65555cd 100644
--- a/examples/scrolling/scrollingcontainer.h
+++ b/examples/scrolling/scrollingcontainer.h
@@ -49,8 +49,8 @@ protected:
   virtual void on_hide();
   virtual void show_all_vfunc();
   virtual void hide_all_vfunc();
-  virtual void pick_vfunc(const Clutter::Color& color);
-  virtual void allocate_vfunc(const Clutter::ActorBox& box, Clutter::AllocationFlags 
absolute_origin_changed);
+  //virtual void pick_vfunc(const Clutter::Color& color);
+  //virtual void allocate_vfunc(const Clutter::ActorBox& box, Clutter::AllocationFlags 
absolute_origin_changed);
 
 private:
   Glib::RefPtr<Clutter::Rectangle> border_;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]