add new sigc++2 directory
[ardour.git] / libs / gtkmm2 / gtk / gtkmm / cellrenderer.cc
1 // Generated by gtkmmproc -- DO NOT MODIFY!
2
3
4 #include <gtkmm/cellrenderer.h>
5 #include <gtkmm/private/cellrenderer_p.h>
6
7 #include <gtk/gtktypebuiltins.h>
8 // -*- c++ -*-
9 /* $Id$ */
10
11 /* Copyright 1998-2002 The gtkmm Development Team
12  *
13  * This library is free software; you can redistribute it and/or
14  * modify it under the terms of the GNU Library General Public
15  * License as published by the Free Software Foundation; either
16  * version 2 of the License, or (at your option) any later version.
17  *
18  * This library is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
21  * Library General Public License for more details.
22  *
23  * You should have received a copy of the GNU Library General Public
24  * License along with this library; if not, write to the Free
25  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26  */
27
28 #include <gtk/gtkcellrenderer.h>
29
30 namespace Gtk
31 {
32
33 void CellRenderer::get_size(Widget& widget, int& x_offset, int& y_offset, int& width, int& height) const
34 {
35   gtk_cell_renderer_get_size(const_cast<GtkCellRenderer*>(gobj()), widget.gobj(), 0, &x_offset, &y_offset, &width, &height);
36 }
37
38 #ifdef GLIBMM_PROPERTIES_ENABLED
39 Glib::PropertyProxy_Base CellRenderer::_property_renderable()
40 {
41   g_assert_not_reached();
42   return Glib::PropertyProxy<int>(0, 0); // shut up warnings
43 }
44 #else
45 Glib::ustring CellRenderer::_property_renderable()
46 {
47   g_assert_not_reached();
48   return Glib::ustring();
49 }
50 #endif //GLIBMM_PROPERTIES_ENABLED
51
52 } // namespace Gtk
53
54
55 namespace
56 {
57
58
59 static const Glib::SignalProxyInfo CellRenderer_signal_editing_canceled_info =
60 {
61   "editing_canceled",
62   (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
63   (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
64 };
65
66
67 static void CellRenderer_signal_editing_started_callback(GtkCellRenderer* self, GtkCellEditable* p0,const gchar* p1,void* data)
68 {
69   using namespace Gtk;
70   typedef sigc::slot< void,CellEditable*,const Glib::ustring& > SlotType;
71
72   // Do not try to call a signal on a disassociated wrapper.
73   if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
74   {
75     #ifdef GLIBMM_EXCEPTIONS_ENABLED
76     try
77     {
78     #endif //GLIBMM_EXCEPTIONS_ENABLED
79       if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
80         (*static_cast<SlotType*>(slot))(dynamic_cast<CellEditable*>(Glib::wrap_auto((GObject*)(p0), false))
81 , Glib::convert_const_gchar_ptr_to_ustring(p1)
82 );
83     #ifdef GLIBMM_EXCEPTIONS_ENABLED
84     }
85     catch(...)
86     {
87       Glib::exception_handlers_invoke();
88     }
89     #endif //GLIBMM_EXCEPTIONS_ENABLED
90   }
91 }
92
93 static const Glib::SignalProxyInfo CellRenderer_signal_editing_started_info =
94 {
95   "editing_started",
96   (GCallback) &CellRenderer_signal_editing_started_callback,
97   (GCallback) &CellRenderer_signal_editing_started_callback
98 };
99
100
101 } // anonymous namespace
102
103 // static
104 GType Glib::Value<Gtk::CellRendererState>::value_type()
105 {
106   return gtk_cell_renderer_state_get_type();
107 }
108
109 // static
110 GType Glib::Value<Gtk::CellRendererMode>::value_type()
111 {
112   return gtk_cell_renderer_mode_get_type();
113 }
114
115
116 namespace Glib
117 {
118
119 Gtk::CellRenderer* wrap(GtkCellRenderer* object, bool take_copy)
120 {
121   return dynamic_cast<Gtk::CellRenderer *> (Glib::wrap_auto ((GObject*)(object), take_copy));
122 }
123
124 } /* namespace Glib */
125
126 namespace Gtk
127 {
128
129
130 /* The *_Class implementation: */
131
132 const Glib::Class& CellRenderer_Class::init()
133 {
134   if(!gtype_) // create the GType if necessary
135   {
136     // Glib::Class has to know the class init function to clone custom types.
137     class_init_func_ = &CellRenderer_Class::class_init_function;
138
139     // This is actually just optimized away, apparently with no harm.
140     // Make sure that the parent type has been created.
141     //CppClassParent::CppObjectType::get_type();
142
143     // Create the wrapper type, with the same class/instance size as the base type.
144     register_derived_type(gtk_cell_renderer_get_type());
145
146     // Add derived versions of interfaces, if the C type implements any interfaces:
147   }
148
149   return *this;
150 }
151
152 void CellRenderer_Class::class_init_function(void* g_class, void* class_data)
153 {
154   BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
155   CppClassParent::class_init_function(klass, class_data);
156
157 #ifdef GLIBMM_VFUNCS_ENABLED
158   klass->get_size = &get_size_vfunc_callback;
159   klass->render = &render_vfunc_callback;
160   klass->activate = &activate_vfunc_callback;
161   klass->start_editing = &start_editing_vfunc_callback;
162 #endif //GLIBMM_VFUNCS_ENABLED
163
164 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
165   klass->editing_canceled = &editing_canceled_callback;
166 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
167 }
168
169 #ifdef GLIBMM_VFUNCS_ENABLED
170 void CellRenderer_Class::get_size_vfunc_callback(GtkCellRenderer* self, GtkWidget* widget, GdkRectangle* cell_area, gint* x_offset, gint* y_offset, gint* width, gint* height)
171 {
172   Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
173       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
174
175   // Non-gtkmmproc-generated custom classes implicitly call the default
176   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
177   // generated classes can use this optimisation, which avoids the unnecessary
178   // parameter conversions if there is no possibility of the virtual function
179   // being overridden:
180   if(obj_base && obj_base->is_derived_())
181   {
182     CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
183     if(obj) // This can be NULL during destruction.
184     {
185       #ifdef GLIBMM_EXCEPTIONS_ENABLED
186       try // Trap C++ exceptions which would normally be lost because this is a C callback.
187       {
188       #endif //GLIBMM_EXCEPTIONS_ENABLED
189         // Call the virtual member method, which derived classes might override.
190         obj->get_size_vfunc(*Glib::wrap(widget)
191 , &Glib::wrap(cell_area)
192 , x_offset
193 , y_offset
194 , width
195 , height
196 );
197         return;
198       #ifdef GLIBMM_EXCEPTIONS_ENABLED
199       }
200       catch(...)
201       {
202         Glib::exception_handlers_invoke();
203       }
204       #endif //GLIBMM_EXCEPTIONS_ENABLED
205     }
206   }
207   
208   BaseClassType *const base = static_cast<BaseClassType*>(
209       g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
210   );
211
212   // Call the original underlying C function:
213   if(base && base->get_size)
214     (*base->get_size)(self, widget, cell_area, x_offset, y_offset, width, height);
215
216 }
217 void CellRenderer_Class::render_vfunc_callback(GtkCellRenderer* self, GdkDrawable* window, GtkWidget* widget, GdkRectangle* background_area, GdkRectangle* cell_area, GdkRectangle* expose_area, GtkCellRendererState flags)
218 {
219   Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
220       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
221
222   // Non-gtkmmproc-generated custom classes implicitly call the default
223   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
224   // generated classes can use this optimisation, which avoids the unnecessary
225   // parameter conversions if there is no possibility of the virtual function
226   // being overridden:
227   if(obj_base && obj_base->is_derived_())
228   {
229     CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
230     if(obj) // This can be NULL during destruction.
231     {
232       #ifdef GLIBMM_EXCEPTIONS_ENABLED
233       try // Trap C++ exceptions which would normally be lost because this is a C callback.
234       {
235       #endif //GLIBMM_EXCEPTIONS_ENABLED
236         // Call the virtual member method, which derived classes might override.
237         obj->render_vfunc(Glib::wrap(window, true)
238 , *Glib::wrap(widget)
239 , Glib::wrap(background_area)
240 , Glib::wrap(cell_area)
241 , Glib::wrap(expose_area)
242 , ((CellRendererState)(flags))
243 );
244         return;
245       #ifdef GLIBMM_EXCEPTIONS_ENABLED
246       }
247       catch(...)
248       {
249         Glib::exception_handlers_invoke();
250       }
251       #endif //GLIBMM_EXCEPTIONS_ENABLED
252     }
253   }
254   
255   BaseClassType *const base = static_cast<BaseClassType*>(
256       g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
257   );
258
259   // Call the original underlying C function:
260   if(base && base->render)
261     (*base->render)(self, window, widget, background_area, cell_area, expose_area, flags);
262
263 }
264 gboolean CellRenderer_Class::activate_vfunc_callback(GtkCellRenderer* self, GdkEvent* event, GtkWidget* widget, const gchar* path, GdkRectangle* background_area, GdkRectangle* cell_area, GtkCellRendererState flags)
265 {
266   Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
267       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
268
269   // Non-gtkmmproc-generated custom classes implicitly call the default
270   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
271   // generated classes can use this optimisation, which avoids the unnecessary
272   // parameter conversions if there is no possibility of the virtual function
273   // being overridden:
274   if(obj_base && obj_base->is_derived_())
275   {
276     CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
277     if(obj) // This can be NULL during destruction.
278     {
279       #ifdef GLIBMM_EXCEPTIONS_ENABLED
280       try // Trap C++ exceptions which would normally be lost because this is a C callback.
281       {
282       #endif //GLIBMM_EXCEPTIONS_ENABLED
283         // Call the virtual member method, which derived classes might override.
284         return static_cast<int>(obj->activate_vfunc(event, *Glib::wrap(widget)
285 , Glib::convert_const_gchar_ptr_to_ustring(path)
286 , Glib::wrap(background_area)
287 , Glib::wrap(cell_area)
288 , ((CellRendererState)(flags))
289 ));
290       #ifdef GLIBMM_EXCEPTIONS_ENABLED
291       }
292       catch(...)
293       {
294         Glib::exception_handlers_invoke();
295       }
296       #endif //GLIBMM_EXCEPTIONS_ENABLED
297     }
298   }
299   
300   BaseClassType *const base = static_cast<BaseClassType*>(
301       g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
302   );
303
304   // Call the original underlying C function:
305   if(base && base->activate)
306     return (*base->activate)(self, event, widget, path, background_area, cell_area, flags);
307
308
309   typedef gboolean RType;
310   return RType();
311 }
312 GtkCellEditable* CellRenderer_Class::start_editing_vfunc_callback(GtkCellRenderer* self, GdkEvent* event, GtkWidget* widget, const gchar* path, GdkRectangle* background_area, GdkRectangle* cell_area, GtkCellRendererState flags)
313 {
314   Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
315       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
316
317   // Non-gtkmmproc-generated custom classes implicitly call the default
318   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
319   // generated classes can use this optimisation, which avoids the unnecessary
320   // parameter conversions if there is no possibility of the virtual function
321   // being overridden:
322   if(obj_base && obj_base->is_derived_())
323   {
324     CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
325     if(obj) // This can be NULL during destruction.
326     {
327       #ifdef GLIBMM_EXCEPTIONS_ENABLED
328       try // Trap C++ exceptions which would normally be lost because this is a C callback.
329       {
330       #endif //GLIBMM_EXCEPTIONS_ENABLED
331         // Call the virtual member method, which derived classes might override.
332         return Glib::unwrap(obj->start_editing_vfunc(event, *Glib::wrap(widget)
333 , Glib::convert_const_gchar_ptr_to_ustring(path)
334 , Glib::wrap(background_area)
335 , Glib::wrap(cell_area)
336 , ((CellRendererState)(flags))
337 ));
338       #ifdef GLIBMM_EXCEPTIONS_ENABLED
339       }
340       catch(...)
341       {
342         Glib::exception_handlers_invoke();
343       }
344       #endif //GLIBMM_EXCEPTIONS_ENABLED
345     }
346   }
347   
348   BaseClassType *const base = static_cast<BaseClassType*>(
349       g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
350   );
351
352   // Call the original underlying C function:
353   if(base && base->start_editing)
354     return (*base->start_editing)(self, event, widget, path, background_area, cell_area, flags);
355
356
357   typedef GtkCellEditable* RType;
358   return RType();
359 }
360 #endif //GLIBMM_VFUNCS_ENABLED
361
362 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
363 void CellRenderer_Class::editing_canceled_callback(GtkCellRenderer* self)
364 {
365   Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
366       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
367
368   // Non-gtkmmproc-generated custom classes implicitly call the default
369   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
370   // generated classes can use this optimisation, which avoids the unnecessary
371   // parameter conversions if there is no possibility of the virtual function
372   // being overridden:
373   if(obj_base && obj_base->is_derived_())
374   {
375     CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
376     if(obj) // This can be NULL during destruction.
377     {
378       #ifdef GLIBMM_EXCEPTIONS_ENABLED
379       try // Trap C++ exceptions which would normally be lost because this is a C callback.
380       {
381       #endif //GLIBMM_EXCEPTIONS_ENABLED
382         // Call the virtual member method, which derived classes might override.
383         obj->on_editing_canceled();
384         return;
385       #ifdef GLIBMM_EXCEPTIONS_ENABLED
386       }
387       catch(...)
388       {
389         Glib::exception_handlers_invoke();
390       }
391       #endif //GLIBMM_EXCEPTIONS_ENABLED
392     }
393   }
394   
395   BaseClassType *const base = static_cast<BaseClassType*>(
396         g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
397     );
398
399   // Call the original underlying C function:
400   if(base && base->editing_canceled)
401     (*base->editing_canceled)(self);
402 }
403 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
404
405
406 Glib::ObjectBase* CellRenderer_Class::wrap_new(GObject* o)
407 {
408   return manage(new CellRenderer((GtkCellRenderer*)(o)));
409
410 }
411
412
413 /* The implementation: */
414
415 CellRenderer::CellRenderer(const Glib::ConstructParams& construct_params)
416 :
417   Gtk::Object(construct_params)
418 {
419   }
420
421 CellRenderer::CellRenderer(GtkCellRenderer* castitem)
422 :
423   Gtk::Object((GtkObject*)(castitem))
424 {
425   }
426
427 CellRenderer::~CellRenderer()
428 {
429   destroy_();
430 }
431
432 CellRenderer::CppClassType CellRenderer::cellrenderer_class_; // initialize static member
433
434 GType CellRenderer::get_type()
435 {
436   return cellrenderer_class_.init().get_type();
437 }
438
439 GType CellRenderer::get_base_type()
440 {
441   return gtk_cell_renderer_get_type();
442 }
443
444
445 void CellRenderer::get_size(Widget& widget, const Gdk::Rectangle& cell_area, int& x_offset, int& y_offset, int& width, int& height) const
446 {
447 gtk_cell_renderer_get_size(const_cast<GtkCellRenderer*>(gobj()), (widget).gobj(), const_cast<GdkRectangle*>(cell_area.gobj()), &x_offset, &y_offset, &width, &height); 
448 }
449
450 void CellRenderer::render(const Glib::RefPtr<Gdk::Window>& window, Widget& widget, const Gdk::Rectangle& background_area, const Gdk::Rectangle& cell_area, const Gdk::Rectangle& expose_area, CellRendererState flags)
451 {
452 gtk_cell_renderer_render(gobj(), Glib::unwrap(window), (widget).gobj(), const_cast<GdkRectangle*>(background_area.gobj()), const_cast<GdkRectangle*>(cell_area.gobj()), const_cast<GdkRectangle*>(expose_area.gobj()), ((GtkCellRendererState)(flags))); 
453 }
454
455 bool CellRenderer::activate(GdkEvent* event, Widget& widget, const Glib::ustring& path, const Gdk::Rectangle& background_area, const Gdk::Rectangle& cell_area, CellRendererState flags)
456 {
457   return gtk_cell_renderer_activate(gobj(), event, (widget).gobj(), path.c_str(), const_cast<GdkRectangle*>(background_area.gobj()), const_cast<GdkRectangle*>(cell_area.gobj()), ((GtkCellRendererState)(flags)));
458 }
459
460 CellEditable* CellRenderer::start_editing(GdkEvent* event, Widget& widget, const Glib::ustring& path, const Gdk::Rectangle& background_area, const Gdk::Rectangle& cell_area, CellRendererState flags)
461 {
462   return dynamic_cast<CellEditable*>(Glib::wrap_auto((GObject*)(gtk_cell_renderer_start_editing(gobj(), event, (widget).gobj(), path.c_str(), const_cast<GdkRectangle*>(background_area.gobj()), const_cast<GdkRectangle*>(cell_area.gobj()), ((GtkCellRendererState)(flags)))), false));
463 }
464
465 void CellRenderer::set_fixed_size(int width, int height)
466 {
467 gtk_cell_renderer_set_fixed_size(gobj(), width, height); 
468 }
469
470 void CellRenderer::get_fixed_size(int& width, int& height) const
471 {
472 gtk_cell_renderer_get_fixed_size(const_cast<GtkCellRenderer*>(gobj()), &width, &height); 
473 }
474
475 #ifndef GTKMM_DISABLE_DEPRECATED
476
477 void CellRenderer::editing_canceled()
478 {
479 gtk_cell_renderer_editing_canceled(gobj()); 
480 }
481
482 #endif // GTKMM_DISABLE_DEPRECATED
483
484 void CellRenderer::stop_editing(bool canceled)
485 {
486 gtk_cell_renderer_stop_editing(gobj(), static_cast<int>(canceled)); 
487 }
488
489 CellRenderer::CellRenderer()
490 :
491   // Mark this class as non-derived to allow C++ vfuncs to be skipped.
492   Glib::ObjectBase(0),
493   Gtk::Object(Glib::ConstructParams(cellrenderer_class_.init()))
494 {
495   }
496
497
498 Glib::SignalProxy0< void > CellRenderer::signal_editing_canceled()
499 {
500   return Glib::SignalProxy0< void >(this, &CellRenderer_signal_editing_canceled_info);
501 }
502
503
504 Glib::SignalProxy2< void,CellEditable*,const Glib::ustring& > CellRenderer::signal_editing_started()
505 {
506   return Glib::SignalProxy2< void,CellEditable*,const Glib::ustring& >(this, &CellRenderer_signal_editing_started_info);
507 }
508
509
510 #ifdef GLIBMM_PROPERTIES_ENABLED
511 Glib::PropertyProxy<CellRendererMode> CellRenderer::property_mode() 
512 {
513   return Glib::PropertyProxy<CellRendererMode>(this, "mode");
514 }
515 #endif //GLIBMM_PROPERTIES_ENABLED
516
517 #ifdef GLIBMM_PROPERTIES_ENABLED
518 Glib::PropertyProxy_ReadOnly<CellRendererMode> CellRenderer::property_mode() const
519 {
520   return Glib::PropertyProxy_ReadOnly<CellRendererMode>(this, "mode");
521 }
522 #endif //GLIBMM_PROPERTIES_ENABLED
523
524 #ifdef GLIBMM_PROPERTIES_ENABLED
525 Glib::PropertyProxy<bool> CellRenderer::property_visible() 
526 {
527   return Glib::PropertyProxy<bool>(this, "visible");
528 }
529 #endif //GLIBMM_PROPERTIES_ENABLED
530
531 #ifdef GLIBMM_PROPERTIES_ENABLED
532 Glib::PropertyProxy_ReadOnly<bool> CellRenderer::property_visible() const
533 {
534   return Glib::PropertyProxy_ReadOnly<bool>(this, "visible");
535 }
536 #endif //GLIBMM_PROPERTIES_ENABLED
537
538 #ifdef GLIBMM_PROPERTIES_ENABLED
539 Glib::PropertyProxy<bool> CellRenderer::property_sensitive() 
540 {
541   return Glib::PropertyProxy<bool>(this, "sensitive");
542 }
543 #endif //GLIBMM_PROPERTIES_ENABLED
544
545 #ifdef GLIBMM_PROPERTIES_ENABLED
546 Glib::PropertyProxy_ReadOnly<bool> CellRenderer::property_sensitive() const
547 {
548   return Glib::PropertyProxy_ReadOnly<bool>(this, "sensitive");
549 }
550 #endif //GLIBMM_PROPERTIES_ENABLED
551
552 #ifdef GLIBMM_PROPERTIES_ENABLED
553 Glib::PropertyProxy<float> CellRenderer::property_xalign() 
554 {
555   return Glib::PropertyProxy<float>(this, "xalign");
556 }
557 #endif //GLIBMM_PROPERTIES_ENABLED
558
559 #ifdef GLIBMM_PROPERTIES_ENABLED
560 Glib::PropertyProxy_ReadOnly<float> CellRenderer::property_xalign() const
561 {
562   return Glib::PropertyProxy_ReadOnly<float>(this, "xalign");
563 }
564 #endif //GLIBMM_PROPERTIES_ENABLED
565
566 #ifdef GLIBMM_PROPERTIES_ENABLED
567 Glib::PropertyProxy<float> CellRenderer::property_yalign() 
568 {
569   return Glib::PropertyProxy<float>(this, "yalign");
570 }
571 #endif //GLIBMM_PROPERTIES_ENABLED
572
573 #ifdef GLIBMM_PROPERTIES_ENABLED
574 Glib::PropertyProxy_ReadOnly<float> CellRenderer::property_yalign() const
575 {
576   return Glib::PropertyProxy_ReadOnly<float>(this, "yalign");
577 }
578 #endif //GLIBMM_PROPERTIES_ENABLED
579
580 #ifdef GLIBMM_PROPERTIES_ENABLED
581 Glib::PropertyProxy<unsigned int> CellRenderer::property_xpad() 
582 {
583   return Glib::PropertyProxy<unsigned int>(this, "xpad");
584 }
585 #endif //GLIBMM_PROPERTIES_ENABLED
586
587 #ifdef GLIBMM_PROPERTIES_ENABLED
588 Glib::PropertyProxy_ReadOnly<unsigned int> CellRenderer::property_xpad() const
589 {
590   return Glib::PropertyProxy_ReadOnly<unsigned int>(this, "xpad");
591 }
592 #endif //GLIBMM_PROPERTIES_ENABLED
593
594 #ifdef GLIBMM_PROPERTIES_ENABLED
595 Glib::PropertyProxy<unsigned int> CellRenderer::property_ypad() 
596 {
597   return Glib::PropertyProxy<unsigned int>(this, "ypad");
598 }
599 #endif //GLIBMM_PROPERTIES_ENABLED
600
601 #ifdef GLIBMM_PROPERTIES_ENABLED
602 Glib::PropertyProxy_ReadOnly<unsigned int> CellRenderer::property_ypad() const
603 {
604   return Glib::PropertyProxy_ReadOnly<unsigned int>(this, "ypad");
605 }
606 #endif //GLIBMM_PROPERTIES_ENABLED
607
608 #ifdef GLIBMM_PROPERTIES_ENABLED
609 Glib::PropertyProxy<int> CellRenderer::property_width() 
610 {
611   return Glib::PropertyProxy<int>(this, "width");
612 }
613 #endif //GLIBMM_PROPERTIES_ENABLED
614
615 #ifdef GLIBMM_PROPERTIES_ENABLED
616 Glib::PropertyProxy_ReadOnly<int> CellRenderer::property_width() const
617 {
618   return Glib::PropertyProxy_ReadOnly<int>(this, "width");
619 }
620 #endif //GLIBMM_PROPERTIES_ENABLED
621
622 #ifdef GLIBMM_PROPERTIES_ENABLED
623 Glib::PropertyProxy<int> CellRenderer::property_height() 
624 {
625   return Glib::PropertyProxy<int>(this, "height");
626 }
627 #endif //GLIBMM_PROPERTIES_ENABLED
628
629 #ifdef GLIBMM_PROPERTIES_ENABLED
630 Glib::PropertyProxy_ReadOnly<int> CellRenderer::property_height() const
631 {
632   return Glib::PropertyProxy_ReadOnly<int>(this, "height");
633 }
634 #endif //GLIBMM_PROPERTIES_ENABLED
635
636 #ifdef GLIBMM_PROPERTIES_ENABLED
637 Glib::PropertyProxy<bool> CellRenderer::property_is_expander() 
638 {
639   return Glib::PropertyProxy<bool>(this, "is-expander");
640 }
641 #endif //GLIBMM_PROPERTIES_ENABLED
642
643 #ifdef GLIBMM_PROPERTIES_ENABLED
644 Glib::PropertyProxy_ReadOnly<bool> CellRenderer::property_is_expander() const
645 {
646   return Glib::PropertyProxy_ReadOnly<bool>(this, "is-expander");
647 }
648 #endif //GLIBMM_PROPERTIES_ENABLED
649
650 #ifdef GLIBMM_PROPERTIES_ENABLED
651 Glib::PropertyProxy<bool> CellRenderer::property_is_expanded() 
652 {
653   return Glib::PropertyProxy<bool>(this, "is-expanded");
654 }
655 #endif //GLIBMM_PROPERTIES_ENABLED
656
657 #ifdef GLIBMM_PROPERTIES_ENABLED
658 Glib::PropertyProxy_ReadOnly<bool> CellRenderer::property_is_expanded() const
659 {
660   return Glib::PropertyProxy_ReadOnly<bool>(this, "is-expanded");
661 }
662 #endif //GLIBMM_PROPERTIES_ENABLED
663
664 #ifdef GLIBMM_PROPERTIES_ENABLED
665 Glib::PropertyProxy_WriteOnly<Glib::ustring> CellRenderer::property_cell_background() 
666 {
667   return Glib::PropertyProxy_WriteOnly<Glib::ustring>(this, "cell-background");
668 }
669 #endif //GLIBMM_PROPERTIES_ENABLED
670
671 #ifdef GLIBMM_PROPERTIES_ENABLED
672 Glib::PropertyProxy<Gdk::Color> CellRenderer::property_cell_background_gdk() 
673 {
674   return Glib::PropertyProxy<Gdk::Color>(this, "cell-background-gdk");
675 }
676 #endif //GLIBMM_PROPERTIES_ENABLED
677
678 #ifdef GLIBMM_PROPERTIES_ENABLED
679 Glib::PropertyProxy_ReadOnly<Gdk::Color> CellRenderer::property_cell_background_gdk() const
680 {
681   return Glib::PropertyProxy_ReadOnly<Gdk::Color>(this, "cell-background-gdk");
682 }
683 #endif //GLIBMM_PROPERTIES_ENABLED
684
685 #ifdef GLIBMM_PROPERTIES_ENABLED
686 Glib::PropertyProxy<bool> CellRenderer::property_cell_background_set() 
687 {
688   return Glib::PropertyProxy<bool>(this, "cell-background-set");
689 }
690 #endif //GLIBMM_PROPERTIES_ENABLED
691
692 #ifdef GLIBMM_PROPERTIES_ENABLED
693 Glib::PropertyProxy_ReadOnly<bool> CellRenderer::property_cell_background_set() const
694 {
695   return Glib::PropertyProxy_ReadOnly<bool>(this, "cell-background-set");
696 }
697 #endif //GLIBMM_PROPERTIES_ENABLED
698
699
700 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
701 void Gtk::CellRenderer::on_editing_canceled()
702 {
703   BaseClassType *const base = static_cast<BaseClassType*>(
704       g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
705   );
706
707   if(base && base->editing_canceled)
708     (*base->editing_canceled)(gobj());
709 }
710 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
711
712 #ifdef GLIBMM_VFUNCS_ENABLED
713 void Gtk::CellRenderer::get_size_vfunc(Widget& widget, const Gdk::Rectangle* cell_area, int* x_offset, int* y_offset, int* width, int* height) const
714 {
715   BaseClassType *const base = static_cast<BaseClassType*>(
716       g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
717   );
718
719   if(base && base->get_size)
720     (*base->get_size)(const_cast<GtkCellRenderer*>(gobj()),(widget).gobj(),Glib::unwrap(const_cast<Gdk::Rectangle*>(cell_area)),x_offset,y_offset,width,height);
721 }
722 void Gtk::CellRenderer::render_vfunc(const Glib::RefPtr<Gdk::Drawable>& window, Widget& widget, const Gdk::Rectangle& background_area, const Gdk::Rectangle& cell_area, const Gdk::Rectangle& expose_area, CellRendererState flags) 
723 {
724   BaseClassType *const base = static_cast<BaseClassType*>(
725       g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
726   );
727
728   if(base && base->render)
729     (*base->render)(gobj(),Glib::unwrap(window),(widget).gobj(),const_cast<GdkRectangle*>(background_area.gobj()),const_cast<GdkRectangle*>(cell_area.gobj()),const_cast<GdkRectangle*>(expose_area.gobj()),((GtkCellRendererState)(flags)));
730 }
731 bool Gtk::CellRenderer::activate_vfunc(GdkEvent* event, Widget& widget, const Glib::ustring& path, const Gdk::Rectangle& background_area, const Gdk::Rectangle& cell_area, CellRendererState flags) 
732 {
733   BaseClassType *const base = static_cast<BaseClassType*>(
734       g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
735   );
736
737   if(base && base->activate)
738     return (*base->activate)(gobj(),event,(widget).gobj(),path.c_str(),const_cast<GdkRectangle*>(background_area.gobj()),const_cast<GdkRectangle*>(cell_area.gobj()),((GtkCellRendererState)(flags)));
739
740   typedef bool RType;
741   return RType();
742 }
743 CellEditable* Gtk::CellRenderer::start_editing_vfunc(GdkEvent* event, Widget& widget, const Glib::ustring& path, const Gdk::Rectangle& background_area, const Gdk::Rectangle& cell_area, CellRendererState flags) 
744 {
745   BaseClassType *const base = static_cast<BaseClassType*>(
746       g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
747   );
748
749   if(base && base->start_editing)
750     return dynamic_cast<CellEditable*>(Glib::wrap_auto((GObject*)((*base->start_editing)(gobj(),event,(widget).gobj(),path.c_str(),const_cast<GdkRectangle*>(background_area.gobj()),const_cast<GdkRectangle*>(cell_area.gobj()),((GtkCellRendererState)(flags)))), false));
751
752   typedef CellEditable* RType;
753   return RType();
754 }
755 #endif //GLIBMM_VFUNCS_ENABLED
756
757
758 } // namespace Gtk
759
760