container.h

Go to the documentation of this file.
00001 // -*- c++ -*-
00002 // Generated by gtkmmproc -- DO NOT MODIFY!
00003 #ifndef _CLUTTERMM_CONTAINER_H
00004 #define _CLUTTERMM_CONTAINER_H
00005 
00006 
00007 #include <glibmm.h>
00008 
00009 /* Copyright (C) 2007 The cluttermm Development Team
00010  *
00011  * This library is free software; you can redistribute it and/or
00012  * modify it under the terms of the GNU Library General Public
00013  * License as published by the Free Software Foundation; either
00014  * version 2 of the License, or (at your option) any later version.
00015  *
00016  * This library is distributed in the hope that it will be useful,
00017  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00019  * Library General Public License for more details.
00020  *
00021  * You should have received a copy of the GNU Library General Public
00022  * License along with this library; if not, write to the Free
00023  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00024  */
00025 
00026 #include <cluttermm/actor.h>
00027 #include <glibmm/interface.h>
00028 #include <glibmm/ustring.h>
00029 #include <clutter/clutter-container.h>
00030  
00031 
00032 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00033 typedef struct _ClutterContainer ClutterContainer;
00034 typedef struct _ClutterContainerClass ClutterContainerClass;
00035 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00036 
00037 
00038 namespace Clutter
00039 { class Container_Class; } // namespace Clutter
00040 namespace Clutter
00041 {
00042 
00043 
00044 class Container : public Glib::Interface
00045 {
00046   
00047 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00048 
00049 public:
00050   typedef Container CppObjectType;
00051   typedef Container_Class CppClassType;
00052   typedef ClutterContainer BaseObjectType;
00053   typedef ClutterContainerIface BaseClassType;
00054 
00055 private:
00056   friend class Container_Class;
00057   static CppClassType container_class_;
00058 
00059   // noncopyable
00060   Container(const Container&);
00061   Container& operator=(const Container&);
00062 
00063 protected:
00064   Container(); // you must derive from this class
00065 
00072   explicit Container(const Glib::Interface_Class& interface_class);
00073 
00074 public:
00075   // This is public so that C++ wrapper instances can be
00076   // created for C instances of unwrapped types.
00077   // For instance, if an unexpected C type implements the C interface. 
00078   explicit Container(ClutterContainer* castitem);
00079 
00080 protected:
00081 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00082 
00083 public:
00084   virtual ~Container();
00085 
00086   static void add_interface(GType gtype_implementer);
00087 
00088 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00089   static GType get_type()      G_GNUC_CONST;
00090   static GType get_base_type() G_GNUC_CONST;
00091 #endif
00092 
00094   ClutterContainer*       gobj()       { return reinterpret_cast<ClutterContainer*>(gobject_); }
00095 
00097   const ClutterContainer* gobj() const { return reinterpret_cast<ClutterContainer*>(gobject_); }
00098 
00099 private:
00100 
00101 
00102 public:
00103   
00112   void add_actor(const Glib::RefPtr<Actor>& actor);
00113   
00122   void remove_actor(const Glib::RefPtr<Actor>& actor);
00123 
00124  
00131   Glib::ListHandle<Glib::RefPtr<Actor> > get_children();
00132   
00139   Glib::ListHandle<Glib::RefPtr<const Actor> > get_children() const;
00140 
00141   
00148   void lower_child(const Glib::RefPtr<Actor>& actor, const Glib::RefPtr<Actor>& sibling);
00149   void lower_child(const Glib::RefPtr<Actor>& actor);
00150   
00157   void raise_child(const Glib::RefPtr<Actor>& actor, const Glib::RefPtr<Actor>& sibling);
00158   void raise_child(const Glib::RefPtr<Actor>& actor);
00159 
00160   
00169   Glib::RefPtr<Actor> find_child (const Glib::ustring& child_name);
00170   
00179   Glib::RefPtr<const Actor> find_child (const Glib::ustring& child_name) const;
00180 
00184   typedef sigc::slot<void, const Glib::RefPtr<Actor>&> SlotForEach;
00185 
00186   void foreach(const SlotForEach& slot);
00187   
00188 
00189   // not sure the valist stuff is good to wrap in C++
00190   
00191 
00192   // TODO: Do we want to wrap clutter_container_get/set_child_property, and/or
00193   // clutter_container_get_child_meta?
00194 
00195  
00201   Glib::SignalProxy1< void,const Glib::RefPtr<Actor>& > signal_actor_added();
00202 
00203   
00209   Glib::SignalProxy1< void,const Glib::RefPtr<Actor>& > signal_actor_removed();
00210 
00211 
00212   // TODO: child-notify signal? Perhaps doesn't make sense until we wrap
00213   // the ClutterChildMeta stuff, and clutter_container_get/set_child_property.
00214 
00215 protected:
00216 
00217   // Only useful as a protected method for derived implementations.
00218   
00224   void sort_depth_order();
00225 
00226   #ifdef GLIBMM_VFUNCS_ENABLED
00227   virtual void add_vfunc(const Glib::RefPtr<Actor>& actor);
00228 #endif //GLIBMM_VFUNCS_ENABLED
00229 
00230   #ifdef GLIBMM_VFUNCS_ENABLED
00231   virtual void remove_vfunc(const Glib::RefPtr<Actor>& actor);
00232 #endif //GLIBMM_VFUNCS_ENABLED
00233 
00234   #ifdef GLIBMM_VFUNCS_ENABLED
00235   virtual void raise_vfunc(const Glib::RefPtr<Actor>& actor, const Glib::RefPtr<Actor>& sibling);
00236 #endif //GLIBMM_VFUNCS_ENABLED
00237 
00238   #ifdef GLIBMM_VFUNCS_ENABLED
00239   virtual void lower_vfunc(const Glib::RefPtr<Actor>& actor, const Glib::RefPtr<Actor>& lower);
00240 #endif //GLIBMM_VFUNCS_ENABLED
00241 
00242   #ifdef GLIBMM_VFUNCS_ENABLED
00243   virtual void sort_depth_order_vfunc();
00244 #endif //GLIBMM_VFUNCS_ENABLED
00245 
00246 
00247   #ifdef GLIBMM_VFUNCS_ENABLED
00248   virtual void foreach_vfunc(ClutterCallback callback, gpointer user_data);
00249 #endif //GLIBMM_VFUNCS_ENABLED
00250 
00251 
00252   // TODO: Do we want to wrap create_child_meta, destory_child_meta,
00253   // get_child_meta?
00254 
00255 
00256 public:
00257 
00258 public:
00259   //C++ methods used to invoke GTK+ virtual functions:
00260 #ifdef GLIBMM_VFUNCS_ENABLED
00261 #endif //GLIBMM_VFUNCS_ENABLED
00262 
00263 protected:
00264   //GTK+ Virtual Functions (override these to change behaviour):
00265 #ifdef GLIBMM_VFUNCS_ENABLED
00266 #endif //GLIBMM_VFUNCS_ENABLED
00267 
00268   //Default Signal Handlers::
00269 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00270   virtual void on_actor_added(const Glib::RefPtr<Actor>& actor);
00271   virtual void on_actor_removed(const Glib::RefPtr<Actor>& actor);
00272 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00273 
00274 
00275 };
00276 
00277 } // namespace Clutter
00278 //vim: ts=2,sw=2
00279 
00280 
00281 namespace Glib
00282 {
00291   Glib::RefPtr<Clutter::Container> wrap(ClutterContainer* object, bool take_copy = false);
00292 
00293 } // namespace Glib
00294 
00295 
00296 #endif /* _CLUTTERMM_CONTAINER_H */
00297 

Generated on Sun Jul 27 21:35:59 2008 for cluttermm by  doxygen 1.5.4