1 // Generated by gtkmmproc -- DO NOT MODIFY!
2 
3 
4 #include <glibmm.h>
5 
6 #include <goocanvasmm/canvas.h>
7 #include <goocanvasmm/private/canvas_p.h>
8 
9 
10 /* Copyright (C) 1998-2006 The gtkmm Development Team
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
20  * Lesser General Public License for more details.
21  *
22  * You should have received a copy of the GNU Lesser General Public
23  * License along with this library; if not, write to the Free
24  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25  */
26 
27 #include <goocanvas.h>
28 #include <goocanvasmm/bounds.h>
29 
30 namespace Goocanvas
31 {
32 
pointer_grab(const Glib::RefPtr<Item> & item,Gdk::EventMask mask,guint32 time)33 Gdk::GrabStatus Canvas::pointer_grab(const Glib::RefPtr<Item>& item, Gdk::EventMask mask, guint32 time)
34 {
35   return (Gdk::GrabStatus)goo_canvas_pointer_grab(gobj(), Glib::unwrap(item), ((GdkEventMask)(mask)), 0, time);
36 }
37 
render(const Cairo::RefPtr<Cairo::Context> & context,double scale)38 void Canvas::render(const Cairo::RefPtr<Cairo::Context>& context, double scale)
39 {
40   goo_canvas_render(gobj(), (context)->cobj(), 0, scale);
41 }
42 
get_bounds(Bounds & bounds) const43 void Canvas::get_bounds(Bounds& bounds) const
44 {
45   double x1 = 0;
46   double y1 = 0;
47   double x2 = 0;
48   double y2 = 0;
49   get_bounds(x1, y1, x2, y2);
50   bounds = Bounds(x1, y1, x2, y2);
51 }
52 
set_bounds(const Bounds & bounds)53 void Canvas::set_bounds(const Bounds& bounds)
54 {
55   set_bounds(bounds.get_x1(), bounds.get_y1(), bounds.get_x2(), bounds.get_y2());
56 }
57 
58 } //namespace Goocanvas
59 
60 namespace
61 {
62 
63 
Canvas_signal_item_created_callback(GooCanvas * self,GooCanvasItem * p0,GooCanvasItemModel * p1,void * data)64 static void Canvas_signal_item_created_callback(GooCanvas* self, GooCanvasItem* p0,GooCanvasItemModel* p1,void* data)
65 {
66   using namespace Goocanvas;
67   typedef sigc::slot< void,const Glib::RefPtr<Item>&,const Glib::RefPtr<ItemModel>& > SlotType;
68 
69   // Do not try to call a signal on a disassociated wrapper.
70   if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
71   {
72     #ifdef GLIBMM_EXCEPTIONS_ENABLED
73     try
74     {
75     #endif //GLIBMM_EXCEPTIONS_ENABLED
76       if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
77         (*static_cast<SlotType*>(slot))(Glib::wrap(p0, true)
78 , Glib::wrap(p1, true)
79 );
80     #ifdef GLIBMM_EXCEPTIONS_ENABLED
81     }
82     catch(...)
83     {
84       Glib::exception_handlers_invoke();
85     }
86     #endif //GLIBMM_EXCEPTIONS_ENABLED
87   }
88 }
89 
90 static const Glib::SignalProxyInfo Canvas_signal_item_created_info =
91 {
92   "item_created",
93   (GCallback) &Canvas_signal_item_created_callback,
94   (GCallback) &Canvas_signal_item_created_callback
95 };
96 
97 
98 } // anonymous namespace
99 
100 
101 namespace Glib
102 {
103 
wrap(GooCanvas * object,bool take_copy)104 Goocanvas::Canvas* wrap(GooCanvas* object, bool take_copy)
105 {
106   return dynamic_cast<Goocanvas::Canvas *> (Glib::wrap_auto ((GObject*)(object), take_copy));
107 }
108 
109 } /* namespace Glib */
110 
111 namespace Goocanvas
112 {
113 
114 
115 /* The *_Class implementation: */
116 
init()117 const Glib::Class& Canvas_Class::init()
118 {
119   if(!gtype_) // create the GType if necessary
120   {
121     // Glib::Class has to know the class init function to clone custom types.
122     class_init_func_ = &Canvas_Class::class_init_function;
123 
124     // This is actually just optimized away, apparently with no harm.
125     // Make sure that the parent type has been created.
126     //CppClassParent::CppObjectType::get_type();
127 
128     // Create the wrapper type, with the same class/instance size as the base type.
129     register_derived_type(goo_canvas_get_type());
130 
131     // Add derived versions of interfaces, if the C type implements any interfaces:
132 
133   }
134 
135   return *this;
136 }
137 
138 
class_init_function(void * g_class,void * class_data)139 void Canvas_Class::class_init_function(void* g_class, void* class_data)
140 {
141   BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
142   CppClassParent::class_init_function(klass, class_data);
143 
144   klass->create_item = &create_item_vfunc_callback;
145 
146   klass->item_created = &item_created_callback;
147 }
148 
create_item_vfunc_callback(GooCanvas * self,GooCanvasItemModel * model)149 GooCanvasItem* Canvas_Class::create_item_vfunc_callback(GooCanvas* self, GooCanvasItemModel* model)
150 {
151   Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
152       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
153 
154   // Non-gtkmmproc-generated custom classes implicitly call the default
155   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
156   // generated classes can use this optimisation, which avoids the unnecessary
157   // parameter conversions if there is no possibility of the virtual function
158   // being overridden:
159   if(obj_base && obj_base->is_derived_())
160   {
161     CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
162     if(obj) // This can be NULL during destruction.
163     {
164       #ifdef GLIBMM_EXCEPTIONS_ENABLED
165       try // Trap C++ exceptions which would normally be lost because this is a C callback.
166       {
167       #endif //GLIBMM_EXCEPTIONS_ENABLED
168         // Call the virtual member method, which derived classes might override.
169         return Glib::unwrap(obj->create_item_vfunc(Glib::wrap(model, true)
170 ));
171       #ifdef GLIBMM_EXCEPTIONS_ENABLED
172       }
173       catch(...)
174       {
175         Glib::exception_handlers_invoke();
176       }
177       #endif //GLIBMM_EXCEPTIONS_ENABLED
178     }
179   }
180 
181   BaseClassType *const base = static_cast<BaseClassType*>(
182       g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
183   );
184 
185   // Call the original underlying C function:
186   if(base && base->create_item)
187   {
188     GooCanvasItem* retval = (*base->create_item)(self, model);
189     return retval;
190   }
191 
192 
193   typedef GooCanvasItem* RType;
194   return RType();
195 }
196 
item_created_callback(GooCanvas * self,GooCanvasItem * p0,GooCanvasItemModel * p1)197 void Canvas_Class::item_created_callback(GooCanvas* self, GooCanvasItem* p0, GooCanvasItemModel* p1)
198 {
199   Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
200       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
201 
202   // Non-gtkmmproc-generated custom classes implicitly call the default
203   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
204   // generated classes can use this optimisation, which avoids the unnecessary
205   // parameter conversions if there is no possibility of the virtual function
206   // being overridden:
207   if(obj_base && obj_base->is_derived_())
208   {
209     CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
210     if(obj) // This can be NULL during destruction.
211     {
212       #ifdef GLIBMM_EXCEPTIONS_ENABLED
213       try // Trap C++ exceptions which would normally be lost because this is a C callback.
214       {
215       #endif //GLIBMM_EXCEPTIONS_ENABLED
216         // Call the virtual member method, which derived classes might override.
217         obj->on_item_created(Glib::wrap(p0, true)
218 , Glib::wrap(p1, true)
219 );
220         return;
221       #ifdef GLIBMM_EXCEPTIONS_ENABLED
222       }
223       catch(...)
224       {
225         Glib::exception_handlers_invoke();
226       }
227       #endif //GLIBMM_EXCEPTIONS_ENABLED
228     }
229   }
230 
231   BaseClassType *const base = static_cast<BaseClassType*>(
232         g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
233     );
234 
235   // Call the original underlying C function:
236   if(base && base->item_created)
237     (*base->item_created)(self, p0, p1);
238 }
239 
240 
wrap_new(GObject * o)241 Glib::ObjectBase* Canvas_Class::wrap_new(GObject* o)
242 {
243   return manage(new Canvas((GooCanvas*)(o)));
244 
245 }
246 
247 
248 /* The implementation: */
249 
Canvas(const Glib::ConstructParams & construct_params)250 Canvas::Canvas(const Glib::ConstructParams& construct_params)
251 :
252   Gtk::Container(construct_params)
253 {
254   }
255 
Canvas(GooCanvas * castitem)256 Canvas::Canvas(GooCanvas* castitem)
257 :
258   Gtk::Container((GtkContainer*)(castitem))
259 {
260   }
261 
~Canvas()262 Canvas::~Canvas()
263 {
264   destroy_();
265 }
266 
267 Canvas::CppClassType Canvas::canvas_class_; // initialize static member
268 
get_type()269 GType Canvas::get_type()
270 {
271   return canvas_class_.init().get_type();
272 }
273 
274 
get_base_type()275 GType Canvas::get_base_type()
276 {
277   return goo_canvas_get_type();
278 }
279 
280 
Canvas()281 Canvas::Canvas()
282 :
283   // Mark this class as non-derived to allow C++ vfuncs to be skipped.
284   Glib::ObjectBase(0),
285   Gtk::Container(Glib::ConstructParams(canvas_class_.init()))
286 {
287 
288 
289 }
290 
get_root_item()291 Glib::RefPtr<Item> Canvas::get_root_item()
292 {
293   Glib::RefPtr<Item> retvalue = Glib::wrap(goo_canvas_get_root_item(gobj()));
294   if(retvalue)
295     retvalue->reference(); //The function does not do a ref for us.
296   return retvalue;
297 }
298 
get_root_item() const299 Glib::RefPtr<const Item> Canvas::get_root_item() const
300 {
301   return const_cast<Canvas*>(this)->get_root_item();
302 }
303 
set_root_item(const Glib::RefPtr<Item> & item)304 void Canvas::set_root_item(const Glib::RefPtr<Item>& item)
305 {
306   goo_canvas_set_root_item(gobj(), Glib::unwrap(item));
307 }
308 
get_root_item_model()309 Glib::RefPtr<ItemModel> Canvas::get_root_item_model()
310 {
311   Glib::RefPtr<ItemModel> retvalue = Glib::wrap(goo_canvas_get_root_item_model(gobj()));
312   if(retvalue)
313     retvalue->reference(); //The function does not do a ref for us.
314   return retvalue;
315 }
316 
get_root_item_model() const317 Glib::RefPtr<const ItemModel> Canvas::get_root_item_model() const
318 {
319   return const_cast<Canvas*>(this)->get_root_item_model();
320 }
321 
set_root_item_model(const Glib::RefPtr<ItemModel> & model)322 void Canvas::set_root_item_model(const Glib::RefPtr<ItemModel>& model)
323 {
324   goo_canvas_set_root_item_model(gobj(), Glib::unwrap(model));
325 }
326 
get_static_root_item()327 Glib::RefPtr<Item> Canvas::get_static_root_item()
328 {
329   return Glib::wrap(goo_canvas_get_static_root_item(gobj()));
330 }
331 
get_static_root_item() const332 Glib::RefPtr<const Item> Canvas::get_static_root_item() const
333 {
334   return const_cast<Canvas*>(this)->get_static_root_item();
335 }
336 
set_static_root_item(const Glib::RefPtr<Item> & item)337 void Canvas::set_static_root_item(const Glib::RefPtr<Item>& item)
338 {
339   goo_canvas_set_static_root_item(gobj(), Glib::unwrap(item));
340 }
341 
get_static_root_item_model()342 Glib::RefPtr<ItemModel> Canvas::get_static_root_item_model()
343 {
344   Glib::RefPtr<ItemModel> retvalue = Glib::wrap(goo_canvas_get_static_root_item_model(gobj()));
345   if(retvalue)
346     retvalue->reference(); //The function does not do a ref for us.
347   return retvalue;
348 }
349 
get_static_root_item_model() const350 Glib::RefPtr<const ItemModel> Canvas::get_static_root_item_model() const
351 {
352   return const_cast<Canvas*>(this)->get_static_root_item_model();
353 }
354 
set_static_root_item_model(const Glib::RefPtr<ItemModel> & model)355 void Canvas::set_static_root_item_model(const Glib::RefPtr<ItemModel>& model)
356 {
357   goo_canvas_set_static_root_item_model(gobj(), Glib::unwrap(model));
358 }
359 
get_item(const Glib::RefPtr<ItemModel> & model)360 Glib::RefPtr<Item> Canvas::get_item(const Glib::RefPtr<ItemModel>& model)
361 {
362   Glib::RefPtr<Item> retvalue = Glib::wrap(goo_canvas_get_item(gobj(), Glib::unwrap(model)));
363   if(retvalue)
364     retvalue->reference(); //The function does not do a ref for us.
365   return retvalue;
366 }
367 
get_item(const Glib::RefPtr<ItemModel> & model) const368 Glib::RefPtr<const Item> Canvas::get_item(const Glib::RefPtr<ItemModel>& model) const
369 {
370   return const_cast<Canvas*>(this)->get_item(model);
371 }
372 
get_item_at(double x,double y,bool is_pointer_event)373 Glib::RefPtr<Item> Canvas::get_item_at(double x, double y, bool is_pointer_event)
374 {
375   Glib::RefPtr<Item> retvalue = Glib::wrap(goo_canvas_get_item_at(gobj(), x, y, static_cast<int>(is_pointer_event)));
376   if(retvalue)
377     retvalue->reference(); //The function does not do a ref for us.
378   return retvalue;
379 }
380 
get_item_at(double x,double y,bool is_pointer_event) const381 Glib::RefPtr<const Item> Canvas::get_item_at(double x, double y, bool is_pointer_event) const
382 {
383   return const_cast<Canvas*>(this)->get_item_at(x, y, is_pointer_event);
384 }
385 
get_items_at(double x,double y,bool is_pointer_event)386 std::vector< Glib::RefPtr<Item> > Canvas::get_items_at(double x, double y, bool is_pointer_event)
387 {
388   return Glib::ListHandler<Glib::RefPtr<Item> >::list_to_vector(goo_canvas_get_items_at(gobj(), x, y, static_cast<int>(is_pointer_event)), Glib::OWNERSHIP_SHALLOW);
389 }
390 
get_items_at(double x,double y,bool is_pointer_event) const391 std::vector< Glib::RefPtr<const Item> > Canvas::get_items_at(double x, double y, bool is_pointer_event) const
392 {
393   return Glib::ListHandler<Glib::RefPtr<const Item> >::list_to_vector(goo_canvas_get_items_at(const_cast<GooCanvas*>(gobj()), x, y, static_cast<int>(is_pointer_event)), Glib::OWNERSHIP_SHALLOW);
394 }
395 
get_items_in_area(const Bounds & area,bool inside_area,bool allow_overlaps,bool include_containers)396 std::vector< Glib::RefPtr<Item> > Canvas::get_items_in_area(const Bounds& area, bool inside_area, bool allow_overlaps, bool include_containers)
397 {
398   return Glib::ListHandler<Glib::RefPtr<Item> >::list_to_vector(goo_canvas_get_items_in_area(gobj(), (area).gobj(), static_cast<int>(inside_area), static_cast<int>(allow_overlaps), static_cast<int>(include_containers)), Glib::OWNERSHIP_SHALLOW);
399 }
400 
get_items_in_area(const Bounds & area,bool inside_area,bool allow_overlaps,bool include_containers) const401 std::vector< Glib::RefPtr<const Item> > Canvas::get_items_in_area(const Bounds& area, bool inside_area, bool allow_overlaps, bool include_containers) const
402 {
403   return Glib::ListHandler<Glib::RefPtr<const Item> >::list_to_vector(goo_canvas_get_items_in_area(const_cast<GooCanvas*>(gobj()), (area).gobj(), static_cast<int>(inside_area), static_cast<int>(allow_overlaps), static_cast<int>(include_containers)), Glib::OWNERSHIP_SHALLOW);
404 }
405 
get_scale() const406 double Canvas::get_scale() const
407 {
408   return goo_canvas_get_scale(const_cast<GooCanvas*>(gobj()));
409 }
410 
set_scale(double scale)411 void Canvas::set_scale(double scale)
412 {
413   goo_canvas_set_scale(gobj(), scale);
414 }
415 
get_bounds(double & left,double & top,double & right,double & bottom) const416 void Canvas::get_bounds(double& left, double& top, double& right, double& bottom) const
417 {
418   goo_canvas_get_bounds(const_cast<GooCanvas*>(gobj()), &(left), &(top), &(right), &(bottom));
419 }
420 
set_bounds(double left,double top,double right,double bottom)421 void Canvas::set_bounds(double left, double top, double right, double bottom)
422 {
423   goo_canvas_set_bounds(gobj(), left, top, right, bottom);
424 }
425 
scroll_to(double left,double top)426 void Canvas::scroll_to(double left, double top)
427 {
428   goo_canvas_scroll_to(gobj(), left, top);
429 }
430 
grab_focus(const Glib::RefPtr<Item> & item)431 void Canvas::grab_focus(const Glib::RefPtr<Item>& item)
432 {
433   goo_canvas_grab_focus(gobj(), Glib::unwrap(item));
434 }
435 
render(const Cairo::RefPtr<Cairo::Context> & context,const Bounds & bounds,double scale)436 void Canvas::render(const Cairo::RefPtr<Cairo::Context>& context, const Bounds& bounds, double scale)
437 {
438   goo_canvas_render(gobj(), (context)->cobj(), (bounds).gobj(), scale);
439 }
440 
convert_to_pixels(double & x,double & y) const441 void Canvas::convert_to_pixels(double& x, double& y) const
442 {
443   goo_canvas_convert_to_pixels(const_cast<GooCanvas*>(gobj()), &(x), &(y));
444 }
445 
convert_from_pixels(double & x,double & y) const446 void Canvas::convert_from_pixels(double& x, double& y) const
447 {
448   goo_canvas_convert_from_pixels(const_cast<GooCanvas*>(gobj()), &(x), &(y));
449 }
450 
convert_to_item_space(const Glib::RefPtr<Item> & item,double & x,double & y) const451 void Canvas::convert_to_item_space(const Glib::RefPtr<Item>& item, double& x, double& y) const
452 {
453   goo_canvas_convert_to_item_space(const_cast<GooCanvas*>(gobj()), Glib::unwrap(item), &(x), &(y));
454 }
455 
convert_from_item_space(const Glib::RefPtr<Item> & item,double & x,double & y) const456 void Canvas::convert_from_item_space(const Glib::RefPtr<Item>& item, double& x, double& y) const
457 {
458   goo_canvas_convert_from_item_space(const_cast<GooCanvas*>(gobj()), Glib::unwrap(item), &(x), &(y));
459 }
460 
convert_bounds_to_item_space(const Glib::RefPtr<Item> & item,Bounds & bounds) const461 void Canvas::convert_bounds_to_item_space(const Glib::RefPtr<Item>& item, Bounds& bounds) const
462 {
463   goo_canvas_convert_bounds_to_item_space(const_cast<GooCanvas*>(gobj()), Glib::unwrap(item), (bounds).gobj());
464 }
465 
pointer_grab(const Glib::RefPtr<Item> & item,Gdk::EventMask mask,const Glib::RefPtr<Gdk::Cursor> & cursor,guint32 time)466 Gdk::GrabStatus Canvas::pointer_grab(const Glib::RefPtr<Item>& item, Gdk::EventMask mask, const Glib::RefPtr<Gdk::Cursor>& cursor, guint32 time)
467 {
468   return ((Gdk::GrabStatus)(goo_canvas_pointer_grab(gobj(), Glib::unwrap(item), ((GdkEventMask)(mask)), Glib::unwrap(cursor), time)));
469 }
470 
pointer_ungrab(const Glib::RefPtr<Item> & item,guint32 time)471 void Canvas::pointer_ungrab(const Glib::RefPtr<Item>& item, guint32 time)
472 {
473   goo_canvas_pointer_ungrab(gobj(), Glib::unwrap(item), time);
474 }
475 
keyboard_grab(const Glib::RefPtr<Item> & item,bool owner_events,guint32 time)476 GdkGrabStatus Canvas::keyboard_grab(const Glib::RefPtr<Item>& item, bool owner_events, guint32 time)
477 {
478   return goo_canvas_keyboard_grab(gobj(), Glib::unwrap(item), static_cast<int>(owner_events), time);
479 }
480 
keyboard_ungrab(const Glib::RefPtr<Item> & item,guint32 time)481 void Canvas::keyboard_ungrab(const Glib::RefPtr<Item>& item, guint32 time)
482 {
483   goo_canvas_keyboard_ungrab(gobj(), Glib::unwrap(item), time);
484 }
485 
create_cairo_context()486 Cairo::RefPtr<Cairo::Context> Canvas::create_cairo_context()
487 {
488   return Cairo::RefPtr<Cairo::Context>(new Cairo::Context(goo_canvas_create_cairo_context(gobj())));
489 }
490 
create_item(const Glib::RefPtr<ItemModel> & model)491 Glib::RefPtr<Item> Canvas::create_item(const Glib::RefPtr<ItemModel>& model)
492 {
493   return Glib::wrap(goo_canvas_create_item(gobj(), Glib::unwrap(model)));
494 }
495 
unregister_item(const Glib::RefPtr<ItemModel> & model)496 void Canvas::unregister_item(const Glib::RefPtr<ItemModel>& model)
497 {
498   goo_canvas_unregister_item(gobj(), Glib::unwrap(model));
499 }
500 
update()501 void Canvas::update()
502 {
503   goo_canvas_update(gobj());
504 }
505 
request_update()506 void Canvas::request_update()
507 {
508   goo_canvas_request_update(gobj());
509 }
510 
request_redraw(const Bounds & bounds)511 void Canvas::request_redraw(const Bounds& bounds)
512 {
513   goo_canvas_request_redraw(gobj(), (bounds).gobj());
514 }
515 
request_item_redraw(const Bounds & bounds,bool is_static)516 void Canvas::request_item_redraw(const Bounds& bounds, bool is_static)
517 {
518   goo_canvas_request_item_redraw(gobj(), (bounds).gobj(), static_cast<int>(is_static));
519 }
520 
get_default_line_width() const521 double Canvas::get_default_line_width() const
522 {
523   return goo_canvas_get_default_line_width(const_cast<GooCanvas*>(gobj()));
524 }
525 
register_widget_item(const Glib::RefPtr<Goocanvas::Widget> & widget)526 void Canvas::register_widget_item(const Glib::RefPtr<Goocanvas::Widget>& widget)
527 {
528   goo_canvas_register_widget_item(gobj(), Glib::unwrap(widget));
529 }
530 
unregister_widget_item(const Glib::RefPtr<Goocanvas::Widget> & widget)531 void Canvas::unregister_widget_item(const Glib::RefPtr<Goocanvas::Widget>& widget)
532 {
533   goo_canvas_unregister_widget_item(gobj(), Glib::unwrap(widget));
534 }
535 
536 
signal_item_created()537 Glib::SignalProxy2< void,const Glib::RefPtr<Item>&,const Glib::RefPtr<ItemModel>& > Canvas::signal_item_created()
538 {
539   return Glib::SignalProxy2< void,const Glib::RefPtr<Item>&,const Glib::RefPtr<ItemModel>& >(this, &Canvas_signal_item_created_info);
540 }
541 
542 
543 #ifdef GLIBMM_PROPERTIES_ENABLED
property_scale()544 Glib::PropertyProxy< double > Canvas::property_scale()
545 {
546   return Glib::PropertyProxy< double >(this, "scale");
547 }
548 #endif //GLIBMM_PROPERTIES_ENABLED
549 
550 #ifdef GLIBMM_PROPERTIES_ENABLED
property_scale() const551 Glib::PropertyProxy_ReadOnly< double > Canvas::property_scale() const
552 {
553   return Glib::PropertyProxy_ReadOnly< double >(this, "scale");
554 }
555 #endif //GLIBMM_PROPERTIES_ENABLED
556 
557 #ifdef GLIBMM_PROPERTIES_ENABLED
property_scale_x()558 Glib::PropertyProxy< double > Canvas::property_scale_x()
559 {
560   return Glib::PropertyProxy< double >(this, "scale-x");
561 }
562 #endif //GLIBMM_PROPERTIES_ENABLED
563 
564 #ifdef GLIBMM_PROPERTIES_ENABLED
property_scale_x() const565 Glib::PropertyProxy_ReadOnly< double > Canvas::property_scale_x() const
566 {
567   return Glib::PropertyProxy_ReadOnly< double >(this, "scale-x");
568 }
569 #endif //GLIBMM_PROPERTIES_ENABLED
570 
571 #ifdef GLIBMM_PROPERTIES_ENABLED
property_scale_y()572 Glib::PropertyProxy< double > Canvas::property_scale_y()
573 {
574   return Glib::PropertyProxy< double >(this, "scale-y");
575 }
576 #endif //GLIBMM_PROPERTIES_ENABLED
577 
578 #ifdef GLIBMM_PROPERTIES_ENABLED
property_scale_y() const579 Glib::PropertyProxy_ReadOnly< double > Canvas::property_scale_y() const
580 {
581   return Glib::PropertyProxy_ReadOnly< double >(this, "scale-y");
582 }
583 #endif //GLIBMM_PROPERTIES_ENABLED
584 
585 #ifdef GLIBMM_PROPERTIES_ENABLED
property_anchor()586 Glib::PropertyProxy< AnchorType > Canvas::property_anchor()
587 {
588   return Glib::PropertyProxy< AnchorType >(this, "anchor");
589 }
590 #endif //GLIBMM_PROPERTIES_ENABLED
591 
592 #ifdef GLIBMM_PROPERTIES_ENABLED
property_anchor() const593 Glib::PropertyProxy_ReadOnly< AnchorType > Canvas::property_anchor() const
594 {
595   return Glib::PropertyProxy_ReadOnly< AnchorType >(this, "anchor");
596 }
597 #endif //GLIBMM_PROPERTIES_ENABLED
598 
599 #ifdef GLIBMM_PROPERTIES_ENABLED
property_x1()600 Glib::PropertyProxy< double > Canvas::property_x1()
601 {
602   return Glib::PropertyProxy< double >(this, "x1");
603 }
604 #endif //GLIBMM_PROPERTIES_ENABLED
605 
606 #ifdef GLIBMM_PROPERTIES_ENABLED
property_x1() const607 Glib::PropertyProxy_ReadOnly< double > Canvas::property_x1() const
608 {
609   return Glib::PropertyProxy_ReadOnly< double >(this, "x1");
610 }
611 #endif //GLIBMM_PROPERTIES_ENABLED
612 
613 #ifdef GLIBMM_PROPERTIES_ENABLED
property_y1()614 Glib::PropertyProxy< double > Canvas::property_y1()
615 {
616   return Glib::PropertyProxy< double >(this, "y1");
617 }
618 #endif //GLIBMM_PROPERTIES_ENABLED
619 
620 #ifdef GLIBMM_PROPERTIES_ENABLED
property_y1() const621 Glib::PropertyProxy_ReadOnly< double > Canvas::property_y1() const
622 {
623   return Glib::PropertyProxy_ReadOnly< double >(this, "y1");
624 }
625 #endif //GLIBMM_PROPERTIES_ENABLED
626 
627 #ifdef GLIBMM_PROPERTIES_ENABLED
property_x2()628 Glib::PropertyProxy< double > Canvas::property_x2()
629 {
630   return Glib::PropertyProxy< double >(this, "x2");
631 }
632 #endif //GLIBMM_PROPERTIES_ENABLED
633 
634 #ifdef GLIBMM_PROPERTIES_ENABLED
property_x2() const635 Glib::PropertyProxy_ReadOnly< double > Canvas::property_x2() const
636 {
637   return Glib::PropertyProxy_ReadOnly< double >(this, "x2");
638 }
639 #endif //GLIBMM_PROPERTIES_ENABLED
640 
641 #ifdef GLIBMM_PROPERTIES_ENABLED
property_y2()642 Glib::PropertyProxy< double > Canvas::property_y2()
643 {
644   return Glib::PropertyProxy< double >(this, "y2");
645 }
646 #endif //GLIBMM_PROPERTIES_ENABLED
647 
648 #ifdef GLIBMM_PROPERTIES_ENABLED
property_y2() const649 Glib::PropertyProxy_ReadOnly< double > Canvas::property_y2() const
650 {
651   return Glib::PropertyProxy_ReadOnly< double >(this, "y2");
652 }
653 #endif //GLIBMM_PROPERTIES_ENABLED
654 
655 #ifdef GLIBMM_PROPERTIES_ENABLED
property_automatic_bounds()656 Glib::PropertyProxy< bool > Canvas::property_automatic_bounds()
657 {
658   return Glib::PropertyProxy< bool >(this, "automatic-bounds");
659 }
660 #endif //GLIBMM_PROPERTIES_ENABLED
661 
662 #ifdef GLIBMM_PROPERTIES_ENABLED
property_automatic_bounds() const663 Glib::PropertyProxy_ReadOnly< bool > Canvas::property_automatic_bounds() const
664 {
665   return Glib::PropertyProxy_ReadOnly< bool >(this, "automatic-bounds");
666 }
667 #endif //GLIBMM_PROPERTIES_ENABLED
668 
669 #ifdef GLIBMM_PROPERTIES_ENABLED
property_bounds_from_origin()670 Glib::PropertyProxy< bool > Canvas::property_bounds_from_origin()
671 {
672   return Glib::PropertyProxy< bool >(this, "bounds-from-origin");
673 }
674 #endif //GLIBMM_PROPERTIES_ENABLED
675 
676 #ifdef GLIBMM_PROPERTIES_ENABLED
property_bounds_from_origin() const677 Glib::PropertyProxy_ReadOnly< bool > Canvas::property_bounds_from_origin() const
678 {
679   return Glib::PropertyProxy_ReadOnly< bool >(this, "bounds-from-origin");
680 }
681 #endif //GLIBMM_PROPERTIES_ENABLED
682 
683 #ifdef GLIBMM_PROPERTIES_ENABLED
property_bounds_padding()684 Glib::PropertyProxy< double > Canvas::property_bounds_padding()
685 {
686   return Glib::PropertyProxy< double >(this, "bounds-padding");
687 }
688 #endif //GLIBMM_PROPERTIES_ENABLED
689 
690 #ifdef GLIBMM_PROPERTIES_ENABLED
property_bounds_padding() const691 Glib::PropertyProxy_ReadOnly< double > Canvas::property_bounds_padding() const
692 {
693   return Glib::PropertyProxy_ReadOnly< double >(this, "bounds-padding");
694 }
695 #endif //GLIBMM_PROPERTIES_ENABLED
696 
697 #ifdef GLIBMM_PROPERTIES_ENABLED
property_units()698 Glib::PropertyProxy< Gtk::Unit > Canvas::property_units()
699 {
700   return Glib::PropertyProxy< Gtk::Unit >(this, "units");
701 }
702 #endif //GLIBMM_PROPERTIES_ENABLED
703 
704 #ifdef GLIBMM_PROPERTIES_ENABLED
property_units() const705 Glib::PropertyProxy_ReadOnly< Gtk::Unit > Canvas::property_units() const
706 {
707   return Glib::PropertyProxy_ReadOnly< Gtk::Unit >(this, "units");
708 }
709 #endif //GLIBMM_PROPERTIES_ENABLED
710 
711 #ifdef GLIBMM_PROPERTIES_ENABLED
property_resolution_x()712 Glib::PropertyProxy< double > Canvas::property_resolution_x()
713 {
714   return Glib::PropertyProxy< double >(this, "resolution-x");
715 }
716 #endif //GLIBMM_PROPERTIES_ENABLED
717 
718 #ifdef GLIBMM_PROPERTIES_ENABLED
property_resolution_x() const719 Glib::PropertyProxy_ReadOnly< double > Canvas::property_resolution_x() const
720 {
721   return Glib::PropertyProxy_ReadOnly< double >(this, "resolution-x");
722 }
723 #endif //GLIBMM_PROPERTIES_ENABLED
724 
725 #ifdef GLIBMM_PROPERTIES_ENABLED
property_resolution_y()726 Glib::PropertyProxy< double > Canvas::property_resolution_y()
727 {
728   return Glib::PropertyProxy< double >(this, "resolution-y");
729 }
730 #endif //GLIBMM_PROPERTIES_ENABLED
731 
732 #ifdef GLIBMM_PROPERTIES_ENABLED
property_resolution_y() const733 Glib::PropertyProxy_ReadOnly< double > Canvas::property_resolution_y() const
734 {
735   return Glib::PropertyProxy_ReadOnly< double >(this, "resolution-y");
736 }
737 #endif //GLIBMM_PROPERTIES_ENABLED
738 
739 #ifdef GLIBMM_PROPERTIES_ENABLED
property_background_color()740 Glib::PropertyProxy_WriteOnly< Glib::ustring > Canvas::property_background_color()
741 {
742   return Glib::PropertyProxy_WriteOnly< Glib::ustring >(this, "background-color");
743 }
744 #endif //GLIBMM_PROPERTIES_ENABLED
745 
746 #ifdef GLIBMM_PROPERTIES_ENABLED
property_background_color_rgb()747 Glib::PropertyProxy_WriteOnly< guint > Canvas::property_background_color_rgb()
748 {
749   return Glib::PropertyProxy_WriteOnly< guint >(this, "background-color-rgb");
750 }
751 #endif //GLIBMM_PROPERTIES_ENABLED
752 
753 #ifdef GLIBMM_PROPERTIES_ENABLED
property_background_color_gdk_rgba()754 Glib::PropertyProxy_WriteOnly< Gdk::RGBA > Canvas::property_background_color_gdk_rgba()
755 {
756   return Glib::PropertyProxy_WriteOnly< Gdk::RGBA >(this, "background-color-gdk-rgba");
757 }
758 #endif //GLIBMM_PROPERTIES_ENABLED
759 
760 #ifdef GLIBMM_PROPERTIES_ENABLED
property_integer_layout()761 Glib::PropertyProxy< bool > Canvas::property_integer_layout()
762 {
763   return Glib::PropertyProxy< bool >(this, "integer-layout");
764 }
765 #endif //GLIBMM_PROPERTIES_ENABLED
766 
767 #ifdef GLIBMM_PROPERTIES_ENABLED
property_integer_layout() const768 Glib::PropertyProxy_ReadOnly< bool > Canvas::property_integer_layout() const
769 {
770   return Glib::PropertyProxy_ReadOnly< bool >(this, "integer-layout");
771 }
772 #endif //GLIBMM_PROPERTIES_ENABLED
773 
774 #ifdef GLIBMM_PROPERTIES_ENABLED
property_clear_background()775 Glib::PropertyProxy< bool > Canvas::property_clear_background()
776 {
777   return Glib::PropertyProxy< bool >(this, "clear-background");
778 }
779 #endif //GLIBMM_PROPERTIES_ENABLED
780 
781 #ifdef GLIBMM_PROPERTIES_ENABLED
property_clear_background() const782 Glib::PropertyProxy_ReadOnly< bool > Canvas::property_clear_background() const
783 {
784   return Glib::PropertyProxy_ReadOnly< bool >(this, "clear-background");
785 }
786 #endif //GLIBMM_PROPERTIES_ENABLED
787 
788 
on_item_created(const Glib::RefPtr<Item> & item,const Glib::RefPtr<ItemModel> & model)789 void Goocanvas::Canvas::on_item_created(const Glib::RefPtr<Item>& item, const Glib::RefPtr<ItemModel>& model)
790 {
791   BaseClassType *const base = static_cast<BaseClassType*>(
792       g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
793   );
794 
795   if(base && base->item_created)
796     (*base->item_created)(gobj(),Glib::unwrap(item),Glib::unwrap(model));
797 }
798 
create_item_vfunc(const Glib::RefPtr<ItemModel> & model)799 Glib::RefPtr<Item> Goocanvas::Canvas::create_item_vfunc(const Glib::RefPtr<ItemModel>& model)
800 {
801   BaseClassType *const base = static_cast<BaseClassType*>(
802       g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
803   );
804 
805   if(base && base->create_item)
806   {
807     Glib::RefPtr<Item> retval(Glib::wrap((*base->create_item)(gobj(),Glib::unwrap(model))));
808     return retval;
809   }
810 
811   typedef Glib::RefPtr<Item> RType;
812   return RType();
813 }
814 
815 
816 } // namespace Goocanvas
817 
818 
819