item.h

Go to the documentation of this file.
00001 // -*- c++ -*-
00002 // Generated by gtkmmproc -- DO NOT MODIFY!
00003 #ifndef _GOOCANVASMM_ITEM_H
00004 #define _GOOCANVASMM_ITEM_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 Lesser General Public
00014  * License as published by the Free Software Foundation; either
00015  * version 2.1 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  * Lesser General Public License for more details.
00021  *
00022  * You should have received a copy of the GNU Lesser 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 <goocanvasmm/bounds.h>
00028 #include <goocanvasmm/enums.h>
00029 #include <goocanvasmm/style.h>
00030 #include <cairomm/cairomm.h>
00031 #include <goocanvasitem.h>
00032 
00033 
00034 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00035 extern "C" { typedef union _GooCanvasPathCommand GooCanvasPathCommand; }
00036 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00037 
00038 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00039 typedef struct _GooCanvasItem GooCanvasItem;
00040 typedef struct _GooCanvasItemClass GooCanvasItemClass;
00041 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00042 
00043 
00044 namespace Goocanvas
00045 { class Item_Class; } // namespace Goocanvas
00046 namespace Goocanvas
00047 {
00048 
00049 class Canvas ;
00050 class ItemModel ;
00051 
00052 
00053 class Item : public Glib::Interface
00054 {
00055   
00056 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00057 
00058 public:
00059   typedef Item CppObjectType;
00060   typedef Item_Class CppClassType;
00061   typedef GooCanvasItem BaseObjectType;
00062   typedef GooCanvasItemIface BaseClassType;
00063 
00064 private:
00065   friend class Item_Class;
00066   static CppClassType item_class_;
00067 
00068   // noncopyable
00069   Item(const Item&);
00070   Item& operator=(const Item&);
00071 
00072 protected:
00073   Item(); // you must derive from this class
00074 
00081   explicit Item(const Glib::Interface_Class& interface_class);
00082 
00083 public:
00084   // This is public so that C++ wrapper instances can be
00085   // created for C instances of unwrapped types.
00086   // For instance, if an unexpected C type implements the C interface. 
00087   explicit Item(GooCanvasItem* castitem);
00088 
00089 protected:
00090 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00091 
00092 public:
00093   virtual ~Item();
00094 
00095   static void add_interface(GType gtype_implementer);
00096 
00097 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00098   static GType get_type()      G_GNUC_CONST;
00099   static GType get_base_type() G_GNUC_CONST;
00100 #endif
00101 
00103   GooCanvasItem*       gobj()       { return reinterpret_cast<GooCanvasItem*>(gobject_); }
00104 
00106   const GooCanvasItem* gobj() const { return reinterpret_cast<GooCanvasItem*>(gobject_); }
00107 
00108 private:
00109 
00110 
00111 public:
00112 
00113   
00117   Canvas* get_canvas();
00118   
00122   const Canvas* get_canvas() const;
00123   // TODO: should this be passed by reference instead of by pointer?
00124   
00131   void set_canvas(Canvas* canvas);
00132 
00133   
00143   bool is_visible() const;
00144 
00145   
00149   Glib::RefPtr<ItemModel> get_model();
00150   
00154   Glib::RefPtr<const ItemModel> get_model() const;
00155   
00159   void set_model(const Glib::RefPtr<ItemModel>& model);
00160 
00161   
00165   Glib::RefPtr<Item> get_parent();
00166   
00170   Glib::RefPtr<const Item> get_parent() const;
00171   
00183   void set_parent(const Glib::RefPtr<Item>& parent);
00184   
00190   void remove();
00191 
00192   
00196   bool is_container() const;
00197   
00201   int get_n_children() const;
00202   
00208   Glib::RefPtr<Item> get_child(int child_num);
00209   
00215   Glib::RefPtr<const Item> get_child(int child_num) const;
00216   
00221   int find_child(const Glib::RefPtr<Item>& child);
00222   
00228   void add_child(const Glib::RefPtr<Item>& child, int pos);
00229   void add_child(const Glib::RefPtr<Item>& child);
00230 
00231   
00237   void get_child_property_value(const Glib::RefPtr<Item>& child, const Glib::ustring& property_name, Glib::ValueBase& value) const;
00238   
00244   void set_child_property_value(const Glib::RefPtr<Item>& child, const Glib::ustring& property_name, const Glib::ValueBase& value);
00245   
00246   
00247   template <class PropertyType>
00248   void get_child_property(const Glib::RefPtr<Item>& child, const Glib::ustring& the_property_name, PropertyType& value) const;
00249 
00250   template <class PropertyType>
00251   void set_child_property(const Glib::RefPtr<Item>& child, const Glib::ustring& the_property_name, const PropertyType& value);
00252 
00253   
00258   void move_child(int old_position, int new_position);
00259   
00263   void remove_child(int child_num);
00264 
00265   
00270   void raise(const Glib::RefPtr<Item>& above);
00271 
00274   void raise();
00275 
00276   
00281   void lower(const Glib::RefPtr<Item>& below);
00282 
00285   void lower();
00286 
00287   Bounds get_bounds() const;
00288   
00289 
00296   void request_update();
00297   
00304   void ensure_updated();
00305   
00314   void update(bool entire_tree, const Cairo::RefPtr<Cairo::Context>& context, Bounds& bounds);
00315   
00328   void paint(const Cairo::RefPtr<Cairo::Context>& context, const Bounds& bounds, double scale);
00329   
00339   bool get_requested_area(const Cairo::RefPtr<Cairo::Context>& context, Bounds& bounds) const;
00340   
00353   double get_requested_height(const Cairo::RefPtr<Cairo::Context>& context, double width) const;
00354   
00377   void allocate_area(const Cairo::RefPtr<Cairo::Context>& context, const Bounds& requested_area, const Bounds& allocated_area, double x_offset, double y_offset);
00378 
00379 
00380   // Note the semantics of the C version: The returned list is the same as the
00381   // one fed into the function, with possibly some elements added to the head.
00382  
00383 
00399   Glib::ListHandle< Glib::RefPtr<Item> > get_items_at(double x, double y, const Cairo::RefPtr<Cairo::Context>& context, bool is_pointer_event, bool parent_is_visible, const Glib::ListHandle< Glib::RefPtr<Item> >& found_items);
00400   
00416   Glib::ListHandle< Glib::RefPtr<const Item> > get_items_at(double x, double y, const Cairo::RefPtr<Cairo::Context>& context, bool is_pointer_event, bool parent_is_visible, const Glib::ListHandle< Glib::RefPtr<const Item> >& found_items) const;
00417 
00418   // Use this if you don't have a list already:
00419   Glib::ListHandle< Glib::RefPtr<Item> > get_items_at(double x, double y, const Cairo::RefPtr<Cairo::Context>& context, bool is_pointer_event, bool parent_is_visible);
00420   Glib::ListHandle< Glib::RefPtr<const Item> > get_items_at(double x, double y, const Cairo::RefPtr<Cairo::Context>& context, bool is_pointer_event, bool parent_is_visible) const;
00421 
00422   //TODO: Use Cairo::RefPtr?
00423   
00428   bool get_transform(Cairo::Matrix* matrix);
00429   
00434   void set_transform(const Cairo::Matrix* matrix);
00435 
00436   
00443   void set_simple_transform(double x, double y, double scale, double rotation);
00444   
00456   bool get_simple_transform(double& x, double& y, double& scale, double& rotation) const;
00457   
00462   void translate(double tx, double ty);
00463   
00468   void scale(double sx, double sy);
00469   
00476   void rotate(double degrees, double cx, double cy);
00477   
00484   void skew_x(double degrees, double cx, double cy);
00485   
00492   void skew_y(double degrees, double cx, double cy);
00493 
00494   
00502   bool get_transform_for_child(const Glib::RefPtr<Item>& child, Cairo::Matrix* transform);
00503 
00504   
00509   Glib::RefPtr<Style> get_style();
00510   
00515   Glib::RefPtr<const Style> get_style() const;
00516   
00520   void set_style(const Glib::RefPtr<Style>& style);
00521 
00522   
00539   void animate(double x, double y, double scale, double degrees, bool absolute, int duration, int step_time, GooCanvasAnimateType type);
00540   
00544   void stop_animation();
00545 
00546   
00547   bool get_is_static() const;
00548   
00549   void set_is_static(bool is_static = true);
00550 
00551   //_WRAP_SIGNAL(void child_added(int child_num), "child_added")
00552   //_WRAP_SIGNAL(void child_moved(int old_position, int new_position), "child_moved")
00553   //_WRAP_SIGNAL(void child_removed(int child_num), "child_removed")
00554   //_WRAP_SIGNAL(void changed(bool recompute_bounds), "changed")
00555 
00556  
00562   Glib::SignalProxy2< bool,const Glib::RefPtr<Item>&,GdkEventCrossing* > signal_enter_notify_event();
00563 
00564   
00570   Glib::SignalProxy2< bool,const Glib::RefPtr<Item>&,GdkEventCrossing* > signal_leave_notify_event();
00571 
00572   
00578   Glib::SignalProxy2< bool,const Glib::RefPtr<Item>&,GdkEventMotion* > signal_motion_notify_event();
00579 
00580   
00586   Glib::SignalProxy2< bool,const Glib::RefPtr<Item>&,GdkEventButton* > signal_button_press_event();
00587 
00588   
00594   Glib::SignalProxy2< bool,const Glib::RefPtr<Item>&,GdkEventButton* > signal_button_release_event();
00595 
00596   
00602   Glib::SignalProxy2< bool,const Glib::RefPtr<Item>&,GdkEventFocus* > signal_focus_in_event();
00603 
00604   
00610   Glib::SignalProxy2< bool,const Glib::RefPtr<Item>&,GdkEventFocus* > signal_focus_out_event();
00611 
00612   
00618   Glib::SignalProxy2< bool,const Glib::RefPtr<Item>&,GdkEventKey* > signal_key_press_event();
00619 
00620   
00626   Glib::SignalProxy2< bool,const Glib::RefPtr<Item>&,GdkEventKey* > signal_key_release_event();
00627 
00628   
00634   Glib::SignalProxy2< bool,const Glib::RefPtr<Item>&,GdkEventGrabBroken* > signal_grab_broken_event();
00635 
00636   
00642   Glib::SignalProxy1< void,GParamSpec* > signal_child_notify();
00643 
00644   
00650   Glib::SignalProxy1< void,bool > signal_animation_finished();
00651 
00652   
00658   Glib::SignalProxy2< bool,const Glib::RefPtr<Item>&,GdkEventScroll* > signal_scroll_event();
00659 
00660 
00661   #ifdef GLIBMM_PROPERTIES_ENABLED
00662 
00668   Glib::PropertyProxy< Glib::RefPtr<Item> > property_parent() ;
00669 #endif //#GLIBMM_PROPERTIES_ENABLED
00670 
00671 #ifdef GLIBMM_PROPERTIES_ENABLED
00672 
00678   Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Item> > property_parent() const;
00679 #endif //#GLIBMM_PROPERTIES_ENABLED
00680 
00681   #ifdef GLIBMM_PROPERTIES_ENABLED
00682 
00688   Glib::PropertyProxy<ItemVisibility> property_visibility() ;
00689 #endif //#GLIBMM_PROPERTIES_ENABLED
00690 
00691 #ifdef GLIBMM_PROPERTIES_ENABLED
00692 
00698   Glib::PropertyProxy_ReadOnly<ItemVisibility> property_visibility() const;
00699 #endif //#GLIBMM_PROPERTIES_ENABLED
00700 
00701   #ifdef GLIBMM_PROPERTIES_ENABLED
00702 
00708   Glib::PropertyProxy<double> property_visibility_threshold() ;
00709 #endif //#GLIBMM_PROPERTIES_ENABLED
00710 
00711 #ifdef GLIBMM_PROPERTIES_ENABLED
00712 
00718   Glib::PropertyProxy_ReadOnly<double> property_visibility_threshold() const;
00719 #endif //#GLIBMM_PROPERTIES_ENABLED
00720 
00721   #ifdef GLIBMM_PROPERTIES_ENABLED
00722 
00728   Glib::PropertyProxy<Cairo::Matrix*> property_transform() ;
00729 #endif //#GLIBMM_PROPERTIES_ENABLED
00730 
00731 #ifdef GLIBMM_PROPERTIES_ENABLED
00732 
00738   Glib::PropertyProxy_ReadOnly<Cairo::Matrix*> property_transform() const;
00739 #endif //#GLIBMM_PROPERTIES_ENABLED
00740 
00741   #ifdef GLIBMM_PROPERTIES_ENABLED
00742 
00748   Glib::PropertyProxy<PointerEvents> property_pointer_events() ;
00749 #endif //#GLIBMM_PROPERTIES_ENABLED
00750 
00751 #ifdef GLIBMM_PROPERTIES_ENABLED
00752 
00758   Glib::PropertyProxy_ReadOnly<PointerEvents> property_pointer_events() const;
00759 #endif //#GLIBMM_PROPERTIES_ENABLED
00760 
00761   #ifdef GLIBMM_PROPERTIES_ENABLED
00762 
00768   Glib::PropertyProxy<Glib::ustring> property_title() ;
00769 #endif //#GLIBMM_PROPERTIES_ENABLED
00770 
00771 #ifdef GLIBMM_PROPERTIES_ENABLED
00772 
00778   Glib::PropertyProxy_ReadOnly<Glib::ustring> property_title() const;
00779 #endif //#GLIBMM_PROPERTIES_ENABLED
00780 
00781   #ifdef GLIBMM_PROPERTIES_ENABLED
00782 
00788   Glib::PropertyProxy<Glib::ustring> property_description() ;
00789 #endif //#GLIBMM_PROPERTIES_ENABLED
00790 
00791 #ifdef GLIBMM_PROPERTIES_ENABLED
00792 
00798   Glib::PropertyProxy_ReadOnly<Glib::ustring> property_description() const;
00799 #endif //#GLIBMM_PROPERTIES_ENABLED
00800 
00801   #ifdef GLIBMM_PROPERTIES_ENABLED
00802 
00808   Glib::PropertyProxy<bool> property_can_focus() ;
00809 #endif //#GLIBMM_PROPERTIES_ENABLED
00810 
00811 #ifdef GLIBMM_PROPERTIES_ENABLED
00812 
00818   Glib::PropertyProxy_ReadOnly<bool> property_can_focus() const;
00819 #endif //#GLIBMM_PROPERTIES_ENABLED
00820 
00821 
00822   //These properties are not really in GooCanvasItem, but they are actually 
00823   //implemented in all derived GooCanvasItem classes individually. 
00824   //That is a GooCanvas design error, but the patch to fix it has 
00825   //not yet been accepted: http://bugzilla.gnome.org/show_bug.cgi?id=555097 
00826   #ifdef GLIBMM_PROPERTIES_ENABLED
00827 
00833   Glib::PropertyProxy<double> property_x() ;
00834 #endif //#GLIBMM_PROPERTIES_ENABLED
00835 
00836 #ifdef GLIBMM_PROPERTIES_ENABLED
00837 
00843   Glib::PropertyProxy_ReadOnly<double> property_x() const;
00844 #endif //#GLIBMM_PROPERTIES_ENABLED
00845 
00846   #ifdef GLIBMM_PROPERTIES_ENABLED
00847 
00853   Glib::PropertyProxy<double> property_y() ;
00854 #endif //#GLIBMM_PROPERTIES_ENABLED
00855 
00856 #ifdef GLIBMM_PROPERTIES_ENABLED
00857 
00863   Glib::PropertyProxy_ReadOnly<double> property_y() const;
00864 #endif //#GLIBMM_PROPERTIES_ENABLED
00865 
00866   #ifdef GLIBMM_PROPERTIES_ENABLED
00867 
00873   Glib::PropertyProxy<double> property_width() ;
00874 #endif //#GLIBMM_PROPERTIES_ENABLED
00875 
00876 #ifdef GLIBMM_PROPERTIES_ENABLED
00877 
00883   Glib::PropertyProxy_ReadOnly<double> property_width() const;
00884 #endif //#GLIBMM_PROPERTIES_ENABLED
00885 
00886   #ifdef GLIBMM_PROPERTIES_ENABLED
00887 
00893   Glib::PropertyProxy<double> property_height() ;
00894 #endif //#GLIBMM_PROPERTIES_ENABLED
00895 
00896 #ifdef GLIBMM_PROPERTIES_ENABLED
00897 
00903   Glib::PropertyProxy_ReadOnly<double> property_height() const;
00904 #endif //#GLIBMM_PROPERTIES_ENABLED
00905 
00906 
00907 protected:
00908 
00909  
00910 /* Virtual methods that group items must implement. */
00911   #ifdef GLIBMM_VFUNCS_ENABLED
00912   virtual int get_n_children_vfunc() const;
00913 #endif //GLIBMM_VFUNCS_ENABLED
00914 
00915   #ifdef GLIBMM_VFUNCS_ENABLED
00916   virtual Glib::RefPtr<Item> get_child_vfunc(int child_num) const;
00917 #endif //GLIBMM_VFUNCS_ENABLED
00918 
00919   #ifdef GLIBMM_VFUNCS_ENABLED
00920   virtual void request_update_vfunc();
00921 #endif //GLIBMM_VFUNCS_ENABLED
00922 
00923   #ifdef GLIBMM_VFUNCS_ENABLED
00924   virtual Canvas* get_canvas_vfunc() const;
00925 #endif //GLIBMM_VFUNCS_ENABLED
00926 
00927   #ifdef GLIBMM_VFUNCS_ENABLED
00928   virtual void set_canvas_vfunc(Canvas* canvas);
00929 #endif //GLIBMM_VFUNCS_ENABLED
00930 
00931 
00932   /* Virtual methods that group items may implement. */
00933 
00934   #ifdef GLIBMM_VFUNCS_ENABLED
00935   virtual void add_child_vfunc(const Glib::RefPtr<Item>& child, int position);
00936 #endif //GLIBMM_VFUNCS_ENABLED
00937 
00938   #ifdef GLIBMM_VFUNCS_ENABLED
00939   virtual void move_child_vfunc(int old_position, int new_position);
00940 #endif //GLIBMM_VFUNCS_ENABLED
00941 
00942   #ifdef GLIBMM_VFUNCS_ENABLED
00943   virtual void remove_child_vfunc(int child_num);
00944 #endif //GLIBMM_VFUNCS_ENABLED
00945 
00946   #ifdef GLIBMM_VFUNCS_ENABLED
00947   virtual void get_child_property_vfunc(const Glib::RefPtr<Item>& child, guint property_id, Glib::ValueBase& value, GParamSpec* pspec) const;
00948 #endif //GLIBMM_VFUNCS_ENABLED
00949 
00950   #ifdef GLIBMM_VFUNCS_ENABLED
00951   virtual void set_child_property_vfunc(const Glib::RefPtr<Item>& child, guint property_id, const Glib::ValueBase& value, GParamSpec* pspec);
00952 #endif //GLIBMM_VFUNCS_ENABLED
00953 
00954   #ifdef GLIBMM_VFUNCS_ENABLED
00955   virtual bool get_transform_for_child_vfunc(const Glib::RefPtr<Item>& child, Cairo::Matrix* transform) const;
00956 #endif //GLIBMM_VFUNCS_ENABLED
00957 
00958 
00959   /* Virtual methods that all canvas items must implement. */
00960 
00961   #ifdef GLIBMM_VFUNCS_ENABLED
00962   virtual Glib::RefPtr<Item> get_parent_vfunc() const;
00963 #endif //GLIBMM_VFUNCS_ENABLED
00964 
00965   #ifdef GLIBMM_VFUNCS_ENABLED
00966   virtual void set_parent_vfunc(const Glib::RefPtr<Item>& parent);
00967 #endif //GLIBMM_VFUNCS_ENABLED
00968 
00969 
00970 #ifdef GLIBMM_VFUNCS_ENABLED
00971   // Hand code, since Bounds can only copy a GooCanvasBounds* but not ref one.
00972   virtual void get_bounds_vfunc(Bounds& bounds) const;
00973   virtual Glib::ListHandle<Glib::RefPtr<Item> > get_items_at_vfunc(double x, double y, const Cairo::RefPtr<Cairo::Context>& context, bool is_pointer_event, bool is_parent_visible, const Glib::ListHandle<Glib::RefPtr<Item> >& found_items);
00974 #endif
00975 
00976 
00977   #ifdef GLIBMM_VFUNCS_ENABLED
00978   virtual void update_vfunc(bool entire_tree, const Cairo::RefPtr<Cairo::Context>& cr, Bounds& bounds);
00979 #endif //GLIBMM_VFUNCS_ENABLED
00980 
00981 
00982   #ifdef GLIBMM_VFUNCS_ENABLED
00983   virtual void paint_vfunc(const Cairo::RefPtr<Cairo::Context>& cr, const Bounds& bounds, double scale);
00984 #endif //GLIBMM_VFUNCS_ENABLED
00985 
00986 
00987   #ifdef GLIBMM_VFUNCS_ENABLED
00988   virtual bool get_requested_area_vfunc(const Cairo::RefPtr<Cairo::Context>& cr, GooCanvasBounds* requested_area) const;
00989 #endif //GLIBMM_VFUNCS_ENABLED
00990 
00991   #ifdef GLIBMM_VFUNCS_ENABLED
00992   virtual void allocate_area_vfunc(const Cairo::RefPtr<Cairo::Context>& cr, const Bounds& requested_area, const Bounds& allocated_area, double x_offset, double y_offset);
00993 #endif //GLIBMM_VFUNCS_ENABLED
00994 
00995 
00996   /* Virtual methods that canvas items may implement. */
00997 
00998   #ifdef GLIBMM_VFUNCS_ENABLED
00999   virtual bool get_transform_vfunc(Cairo::Matrix* transform) const;
01000 #endif //GLIBMM_VFUNCS_ENABLED
01001 
01002   #ifdef GLIBMM_VFUNCS_ENABLED
01003   virtual void set_transform_vfunc(const Cairo::Matrix* transform);
01004 #endif //GLIBMM_VFUNCS_ENABLED
01005 
01006 
01007   #ifdef GLIBMM_VFUNCS_ENABLED
01008   virtual Glib::RefPtr<Style> get_style_vfunc() const;
01009 #endif //GLIBMM_VFUNCS_ENABLED
01010 
01011   #ifdef GLIBMM_VFUNCS_ENABLED
01012   virtual void set_style_vfunc(const Glib::RefPtr<Style>& style);
01013 #endif //GLIBMM_VFUNCS_ENABLED
01014 
01015   #ifdef GLIBMM_VFUNCS_ENABLED
01016   virtual bool is_visible_vfunc() const;
01017 #endif //GLIBMM_VFUNCS_ENABLED
01018 
01019   #ifdef GLIBMM_VFUNCS_ENABLED
01020   virtual double get_requested_height_vfunc(const Cairo::RefPtr<Cairo::Context>& cr, double width);
01021 #endif //GLIBMM_VFUNCS_ENABLED
01022 
01023   #ifdef GLIBMM_VFUNCS_ENABLED
01024   virtual bool get_is_static_vfunc() const;
01025 #endif //GLIBMM_VFUNCS_ENABLED
01026 
01027   #ifdef GLIBMM_VFUNCS_ENABLED
01028   virtual void set_is_static_vfunc(bool is_static);
01029 #endif //GLIBMM_VFUNCS_ENABLED
01030 
01031 
01032   /* Virtual methods that model/view items must implement. */
01033  
01034 
01035   #ifdef GLIBMM_VFUNCS_ENABLED
01036   virtual Glib::RefPtr<ItemModel> get_model_vfunc() const;
01037 #endif //GLIBMM_VFUNCS_ENABLED
01038 
01039   #ifdef GLIBMM_VFUNCS_ENABLED
01040   virtual void set_model_vfunc(const Glib::RefPtr<ItemModel>& model);
01041 #endif //GLIBMM_VFUNCS_ENABLED
01042 
01043 
01044 public:
01045 
01046 public:
01047   //C++ methods used to invoke GTK+ virtual functions:
01048 #ifdef GLIBMM_VFUNCS_ENABLED
01049 #endif //GLIBMM_VFUNCS_ENABLED
01050 
01051 protected:
01052   //GTK+ Virtual Functions (override these to change behaviour):
01053 #ifdef GLIBMM_VFUNCS_ENABLED
01054 #endif //GLIBMM_VFUNCS_ENABLED
01055 
01056   //Default Signal Handlers::
01057 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
01058   virtual bool on_enter_notify_event(const Glib::RefPtr<Item>& target, GdkEventCrossing* event);
01059   virtual bool on_leave_notify_event(const Glib::RefPtr<Item>& target, GdkEventCrossing* event);
01060   virtual bool on_motion_notify_event(const Glib::RefPtr<Item>& target, GdkEventMotion* event);
01061   virtual bool on_button_press_event(const Glib::RefPtr<Item>& target, GdkEventButton* event);
01062   virtual bool on_button_release_event(const Glib::RefPtr<Item>& target, GdkEventButton* event);
01063   virtual bool on_focus_in_event(const Glib::RefPtr<Item>& target, GdkEventFocus* event);
01064   virtual bool on_focus_out_event(const Glib::RefPtr<Item>& target, GdkEventFocus* event);
01065   virtual bool on_key_press_event(const Glib::RefPtr<Item>& target, GdkEventKey* event);
01066   virtual bool on_key_release_event(const Glib::RefPtr<Item>& target, GdkEventKey* event);
01067   virtual bool on_grab_broken_event(const Glib::RefPtr<Item>& target, GdkEventGrabBroken* event);
01068   virtual void on_child_notify(GParamSpec* pspec);
01069   virtual void on_animation_finished(bool stopped);
01070   virtual bool on_scroll_event(const Glib::RefPtr<Item>& target, GdkEventScroll* event);
01071 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
01072 
01073 
01074 };
01075 
01076 #ifndef DOXYGEN_SHOULD_SKIP_THIS
01077 
01078 template <class PropertyType>
01079 void Item::get_child_property(const Glib::RefPtr<Item>& child, const Glib::ustring& the_property_name, PropertyType& value) const
01080 {
01081   Glib::Value<PropertyType> property_value;
01082   property_value.init(Glib::Value<PropertyType>::value_type());
01083 
01084   this->get_child_property_value(child, the_property_name, property_value);
01085 
01086   value = property_value.get();
01087 }
01088 
01089 template <class PropertyType>
01090 void Item::set_child_property(const Glib::RefPtr<Item>& child, const Glib::ustring& the_property_name, const PropertyType& value)
01091 {
01092   Glib::Value<PropertyType> property_value;
01093   property_value.init(Glib::Value<PropertyType>::value_type());
01094   property_value.set(value);
01095 
01096   this->set_child_property_value(child, the_property_name, property_value);
01097 }
01098 
01099 
01100 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
01101 
01102 } //namespace Goocanvas
01103 
01104 
01105 namespace Glib
01106 {
01115   Glib::RefPtr<Goocanvas::Item> wrap(GooCanvasItem* object, bool take_copy = false);
01116 
01117 } // namespace Glib
01118 
01119 
01120 #endif /* _GOOCANVASMM_ITEM_H */
01121 

Generated on Thu Aug 13 21:42:38 2009 for goocanvasmm by  doxygen 1.5.9