itemmodel.h

Go to the documentation of this file.
00001 // -*- c++ -*-
00002 // Generated by gtkmmproc -- DO NOT MODIFY!
00003 #ifndef _GOOCANVASMM_ITEMMODEL_H
00004 #define _GOOCANVASMM_ITEMMODEL_H
00005 
00006 
00007 #include <glibmm.h>
00008 
00009 
00010 /* Copyright (C) 1998-2006 The gtkmm Development Team
00011  *
00012  * This library is free software; you can redistribute it and/or
00013  * modify it under the terms of the GNU Library General Public
00014  * License as published by the Free Software Foundation; either
00015  * version 2 of the License, or (at your option) any later version.
00016  *
00017  * This library is distributed in the hope that it will be useful,
00018  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00019  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00020  * Library General Public License for more details.
00021  *
00022  * You should have received a copy of the GNU Library General Public
00023  * License along with this library; if not, write to the Free
00024  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00025  */
00026 
00027 #include <cairomm/cairomm.h>
00028 #include <goocanvasitemmodel.h>
00029 #include <goocanvasmm/style.h>
00030 #include <goocanvasmm/enums.h>
00031 
00032 
00033 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00034 extern "C" { typedef union _GooCanvasPathCommand GooCanvasPathCommand; }
00035 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00036 
00037 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00038 typedef struct _GooCanvasItemModel GooCanvasItemModel;
00039 typedef struct _GooCanvasItemModelClass GooCanvasItemModelClass;
00040 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00041 
00042 
00043 namespace Goocanvas
00044 { class ItemModel_Class; } // namespace Goocanvas
00045 namespace Goocanvas
00046 {
00047   class Canvas ;
00048   class Item ;
00049 
00055 enum AnimateType
00056 {
00057   CANVAS_ANIMATE_FREEZE,
00058   CANVAS_ANIMATE_RESET,
00059   CANVAS_ANIMATE_RESTART,
00060   CANVAS_ANIMATE_BOUNCE
00061 };
00062 
00063 } // namespace Goocanvas
00064 
00065 
00066 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00067 namespace Glib
00068 {
00069 
00070 template <>
00071 class Value<Goocanvas::AnimateType> : public Glib::Value_Enum<Goocanvas::AnimateType>
00072 {
00073 public:
00074   static GType value_type() G_GNUC_CONST;
00075 };
00076 
00077 } // namespace Glib
00078 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00079 
00080 
00081 namespace Goocanvas
00082 {
00083 
00084 
00085 class ItemModel : public Glib::Interface
00086 {
00087   
00088 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00089 
00090 public:
00091   typedef ItemModel CppObjectType;
00092   typedef ItemModel_Class CppClassType;
00093   typedef GooCanvasItemModel BaseObjectType;
00094   typedef GooCanvasItemModelIface BaseClassType;
00095 
00096 private:
00097   friend class ItemModel_Class;
00098   static CppClassType itemmodel_class_;
00099 
00100   // noncopyable
00101   ItemModel(const ItemModel&);
00102   ItemModel& operator=(const ItemModel&);
00103 
00104 protected:
00105   ItemModel(); // you must derive from this class
00106 
00113   explicit ItemModel(const Glib::Interface_Class& interface_class);
00114 
00115 public:
00116   // This is public so that C++ wrapper instances can be
00117   // created for C instances of unwrapped types.
00118   // For instance, if an unexpected C type implements the C interface. 
00119   explicit ItemModel(GooCanvasItemModel* castitem);
00120 
00121 protected:
00122 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00123 
00124 public:
00125   virtual ~ItemModel();
00126 
00127   static void add_interface(GType gtype_implementer);
00128 
00129 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00130   static GType get_type()      G_GNUC_CONST;
00131   static GType get_base_type() G_GNUC_CONST;
00132 #endif
00133 
00135   GooCanvasItemModel*       gobj()       { return reinterpret_cast<GooCanvasItemModel*>(gobject_); }
00136 
00138   const GooCanvasItemModel* gobj() const { return reinterpret_cast<GooCanvasItemModel*>(gobject_); }
00139 
00140 private:
00141 
00142 
00143 public:
00144 
00145   
00149   int get_n_children() const;
00150   
00155   Glib::RefPtr<ItemModel> get_child(int child_num);
00156   
00161   Glib::RefPtr<const ItemModel> get_child(int child_num) const;
00162   
00168   void get_child_property(const Glib::RefPtr<ItemModel>& child, const Glib::ustring& property_name, Glib::ValueBase& value) const;
00169   
00175   void set_child_property(const Glib::RefPtr<ItemModel>& child, const Glib::ustring& property_name, const Glib::ValueBase& value);
00176 
00177   
00183   void add_child(const Glib::RefPtr<ItemModel>& child, int position);
00184    void add_child(const Glib::RefPtr<ItemModel>& child);
00185 
00186   
00191   void move_child(int old_position, int new_position);
00192   
00196   void remove_child(int child_num);
00197   
00202   int find_child(const Glib::RefPtr<ItemModel>& child);
00203 
00204   
00208   Glib::RefPtr<ItemModel> get_parent();
00209   
00213   Glib::RefPtr<const ItemModel> get_parent() const;
00214   
00218   void set_parent(const Glib::RefPtr<ItemModel>& parent);
00219 
00220   
00226   void remove();
00227   
00231   bool is_container() const;
00232 
00233   
00238   void raise(const Glib::RefPtr<ItemModel>& above);
00239 
00242   void raise();
00243 
00244   
00249   void lower(const Glib::RefPtr<ItemModel>& below);
00250 
00253   void lower();
00254 
00255   //TODO: Use Cairo::RefPtr?
00256   
00261   bool get_transform(Cairo::Matrix* transform);
00262   
00267   void set_transform(const Cairo::Matrix* transform);
00268   
00275   void set_simple_transform(double x, double y, double scale, double rotation);
00276   
00277   bool get_simple_transform(double& x, double& y, double& scale, double& rotation) const;
00278   
00283   void translate(double tx, double ty);
00284   
00289   void scale(double sx, double sy);
00290   
00297   void rotate(double degrees, double cx, double cy);
00298   
00305   void skew_x(double degrees, double cx, double cy);
00306   
00313   void skew_y(double degrees, double cx, double cy);
00314 
00315   
00320   Glib::RefPtr<Style> get_style();
00321   
00326   Glib::RefPtr<const Style> get_style() const;
00327   
00331   void set_style(const Glib::RefPtr<Style>& style);
00332 
00333   
00350   void animate(double x, double y, double scale, double degrees, bool absolute, int duration, int step_time, AnimateType animate_type);
00351   
00355   void stop_animation();
00356 
00357   
00363   Glib::SignalProxy1< void,int > signal_child_added();
00364 
00365   
00371   Glib::SignalProxy1< void,int > signal_child_removed();
00372 
00373   
00379   Glib::SignalProxy2< void,int,int > signal_child_moved();
00380 
00381   
00387   Glib::SignalProxy1< void,bool > signal_changed();
00388 
00389   
00395   Glib::SignalProxy1< void,GParamSpec* > signal_child_notify();
00396 
00397 
00398   #ifdef GLIBMM_PROPERTIES_ENABLED
00399 
00405   Glib::PropertyProxy< Glib::RefPtr<ItemModel> > property_parent() ;
00406 #endif //#GLIBMM_PROPERTIES_ENABLED
00407 
00408 #ifdef GLIBMM_PROPERTIES_ENABLED
00409 
00415   Glib::PropertyProxy_ReadOnly< Glib::RefPtr<ItemModel> > property_parent() const;
00416 #endif //#GLIBMM_PROPERTIES_ENABLED
00417 
00418   #ifdef GLIBMM_PROPERTIES_ENABLED
00419 
00425   Glib::PropertyProxy<bool> property_can_focus() ;
00426 #endif //#GLIBMM_PROPERTIES_ENABLED
00427 
00428 #ifdef GLIBMM_PROPERTIES_ENABLED
00429 
00435   Glib::PropertyProxy_ReadOnly<bool> property_can_focus() const;
00436 #endif //#GLIBMM_PROPERTIES_ENABLED
00437 
00438   #ifdef GLIBMM_PROPERTIES_ENABLED
00439 
00445   Glib::PropertyProxy<Cairo::Matrix*> property_transform() ;
00446 #endif //#GLIBMM_PROPERTIES_ENABLED
00447 
00448 #ifdef GLIBMM_PROPERTIES_ENABLED
00449 
00455   Glib::PropertyProxy_ReadOnly<Cairo::Matrix*> property_transform() const;
00456 #endif //#GLIBMM_PROPERTIES_ENABLED
00457 
00458   #ifdef GLIBMM_PROPERTIES_ENABLED
00459 
00465   Glib::PropertyProxy<Glib::ustring> property_title() ;
00466 #endif //#GLIBMM_PROPERTIES_ENABLED
00467 
00468 #ifdef GLIBMM_PROPERTIES_ENABLED
00469 
00475   Glib::PropertyProxy_ReadOnly<Glib::ustring> property_title() const;
00476 #endif //#GLIBMM_PROPERTIES_ENABLED
00477 
00478   #ifdef GLIBMM_PROPERTIES_ENABLED
00479 
00485   Glib::PropertyProxy<Glib::ustring> property_description() ;
00486 #endif //#GLIBMM_PROPERTIES_ENABLED
00487 
00488 #ifdef GLIBMM_PROPERTIES_ENABLED
00489 
00495   Glib::PropertyProxy_ReadOnly<Glib::ustring> property_description() const;
00496 #endif //#GLIBMM_PROPERTIES_ENABLED
00497 
00498   #ifdef GLIBMM_PROPERTIES_ENABLED
00499 
00505   Glib::PropertyProxy<PointerEvents> property_pointer_events() ;
00506 #endif //#GLIBMM_PROPERTIES_ENABLED
00507 
00508 #ifdef GLIBMM_PROPERTIES_ENABLED
00509 
00515   Glib::PropertyProxy_ReadOnly<PointerEvents> property_pointer_events() const;
00516 #endif //#GLIBMM_PROPERTIES_ENABLED
00517 
00518   #ifdef GLIBMM_PROPERTIES_ENABLED
00519 
00525   Glib::PropertyProxy<ItemVisibility> property_visibility() ;
00526 #endif //#GLIBMM_PROPERTIES_ENABLED
00527 
00528 #ifdef GLIBMM_PROPERTIES_ENABLED
00529 
00535   Glib::PropertyProxy_ReadOnly<ItemVisibility> property_visibility() const;
00536 #endif //#GLIBMM_PROPERTIES_ENABLED
00537 
00538   #ifdef GLIBMM_PROPERTIES_ENABLED
00539 
00545   Glib::PropertyProxy<double> property_visibility_threshold() ;
00546 #endif //#GLIBMM_PROPERTIES_ENABLED
00547 
00548 #ifdef GLIBMM_PROPERTIES_ENABLED
00549 
00555   Glib::PropertyProxy_ReadOnly<double> property_visibility_threshold() const;
00556 #endif //#GLIBMM_PROPERTIES_ENABLED
00557 
00558 
00559 protected:
00560  
00561 
00562   #ifdef GLIBMM_VFUNCS_ENABLED
00563   virtual int get_n_children_vfunc() const;
00564 #endif //GLIBMM_VFUNCS_ENABLED
00565 
00566   #ifdef GLIBMM_VFUNCS_ENABLED
00567   virtual Glib::RefPtr<ItemModel> get_child_vfunc(int child_num) const;
00568 #endif //GLIBMM_VFUNCS_ENABLED
00569 
00570   #ifdef GLIBMM_VFUNCS_ENABLED
00571   virtual void add_child_vfunc(const Glib::RefPtr<ItemModel>& child, int position);
00572 #endif //GLIBMM_VFUNCS_ENABLED
00573 
00574   #ifdef GLIBMM_VFUNCS_ENABLED
00575   virtual void move_child_vfunc(int old_position, int ne_position);
00576 #endif //GLIBMM_VFUNCS_ENABLED
00577 
00578   #ifdef GLIBMM_VFUNCS_ENABLED
00579   virtual void remove_child_vfunc(int child_num);
00580 #endif //GLIBMM_VFUNCS_ENABLED
00581 
00582   #ifdef GLIBMM_VFUNCS_ENABLED
00583   virtual void get_child_property_vfunc(const Glib::RefPtr<ItemModel>& child, guint property_id, Glib::ValueBase& value, GParamSpec* pspec) const;
00584 #endif //GLIBMM_VFUNCS_ENABLED
00585 
00586   #ifdef GLIBMM_VFUNCS_ENABLED
00587   virtual void set_child_property_vfunc(const Glib::RefPtr<ItemModel>& child, guint property_id, const Glib::ValueBase& value, GParamSpec* pspec);
00588 #endif //GLIBMM_VFUNCS_ENABLED
00589 
00590 
00591   #ifdef GLIBMM_VFUNCS_ENABLED
00592   virtual Glib::RefPtr<ItemModel> get_parent_vfunc() const;
00593 #endif //GLIBMM_VFUNCS_ENABLED
00594 
00595   #ifdef GLIBMM_VFUNCS_ENABLED
00596   virtual void set_parent_vfunc(const Glib::RefPtr<ItemModel>& parent);
00597 #endif //GLIBMM_VFUNCS_ENABLED
00598 
00599 
00600   #ifdef GLIBMM_VFUNCS_ENABLED
00601   virtual Glib::RefPtr<Item> create_item_vfunc(Canvas* canvas);
00602 #endif //GLIBMM_VFUNCS_ENABLED
00603 
00604   #ifdef GLIBMM_VFUNCS_ENABLED
00605   virtual bool get_transform_vfunc(Cairo::Matrix* transform) const;
00606 #endif //GLIBMM_VFUNCS_ENABLED
00607 
00608   #ifdef GLIBMM_VFUNCS_ENABLED
00609   virtual void set_transform_vfunc(const Cairo::Matrix* transform);
00610 #endif //GLIBMM_VFUNCS_ENABLED
00611 
00612 
00613   #ifdef GLIBMM_VFUNCS_ENABLED
00614   virtual Glib::RefPtr<Style> get_style_vfunc() const;
00615 #endif //GLIBMM_VFUNCS_ENABLED
00616 
00617   #ifdef GLIBMM_VFUNCS_ENABLED
00618   virtual void set_style_vfunc(const Glib::RefPtr<Style>& style);
00619 #endif //GLIBMM_VFUNCS_ENABLED
00620 
00621 
00622 public:
00623 
00624 public:
00625   //C++ methods used to invoke GTK+ virtual functions:
00626 #ifdef GLIBMM_VFUNCS_ENABLED
00627 #endif //GLIBMM_VFUNCS_ENABLED
00628 
00629 protected:
00630   //GTK+ Virtual Functions (override these to change behaviour):
00631 #ifdef GLIBMM_VFUNCS_ENABLED
00632 #endif //GLIBMM_VFUNCS_ENABLED
00633 
00634   //Default Signal Handlers::
00635 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00636   virtual void on_child_added(int child_num);
00637   virtual void on_child_removed(int child_num);
00638   virtual void on_child_moved(int old_child_num, int new_child_num);
00639   virtual void on_changed(bool recompute_bounds);
00640   virtual void on_child_notify(GParamSpec* pspec);
00641 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00642 
00643 
00644 };
00645 
00646 }
00647 
00648 
00649 namespace Glib
00650 {
00659   Glib::RefPtr<Goocanvas::ItemModel> wrap(GooCanvasItemModel* object, bool take_copy = false);
00660 
00661 } // namespace Glib
00662 
00663 
00664 #endif /* _GOOCANVASMM_ITEMMODEL_H */
00665 

Generated on Mon Jul 14 03:48:48 2008 for goocanvasmm by  doxygen 1.5.6