1
// Generated by gtkmmproc -- DO NOT MODIFY!
4
#include <gtkmm/cellrenderer.h>
5
#include <gtkmm/private/cellrenderer_p.h>
8
/* $Id: cellrenderer.ccg,v 1.2 2006/05/10 20:59:27 murrayc Exp $ */
10
/* Copyright 1998-2002 The gtkmm Development Team
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.
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.
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.
32
Glib::PropertyProxy_Base CellRenderer::_property_renderable()
34
g_assert_not_reached();
35
return Glib::PropertyProxy<int>(0, 0); // shut up warnings
38
//These vfunc callbacks are custom implemented because we want the output
39
//arguments of the C++ vfuncs to be int& (not int*), and the vfunc_callback
40
//functions may be called from gtk+ with a NULL pointer.
41
void CellRenderer_Class::get_preferred_width_vfunc_callback(GtkCellRenderer* self, GtkWidget* widget, gint* minimum_width, gint* natural_width)
43
Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
44
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
46
// Non-gtkmmproc-generated custom classes implicitly call the default
47
// Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
48
// generated classes can use this optimisation, which avoids the unnecessary
49
// parameter conversions if there is no possibility of the virtual function
51
if(obj_base && obj_base->is_derived_())
53
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
54
if(obj) // This can be NULL during destruction.
56
#ifdef GLIBMM_EXCEPTIONS_ENABLED
57
try // Trap C++ exceptions which would normally be lost because this is a C callback.
59
#endif //GLIBMM_EXCEPTIONS_ENABLED
60
// Call the virtual member method, which derived classes might override.
63
obj->get_preferred_width_vfunc(*Glib::wrap(widget),
64
(minimum_width ? *minimum_width : min_width),
65
(natural_width ? *natural_width : nat_width));
67
#ifdef GLIBMM_EXCEPTIONS_ENABLED
71
Glib::exception_handlers_invoke();
73
#endif //GLIBMM_EXCEPTIONS_ENABLED
77
BaseClassType *const base = static_cast<BaseClassType*>(
78
g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
81
// Call the original underlying C function:
82
if(base && base->get_preferred_width)
83
(*base->get_preferred_width)(self, widget, minimum_width, natural_width);
86
void CellRenderer_Class::get_preferred_height_for_width_vfunc_callback(GtkCellRenderer* self, GtkWidget* widget, gint width, gint* minimum_height, gint* natural_height)
88
Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
89
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
91
// Non-gtkmmproc-generated custom classes implicitly call the default
92
// Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
93
// generated classes can use this optimisation, which avoids the unnecessary
94
// parameter conversions if there is no possibility of the virtual function
96
if(obj_base && obj_base->is_derived_())
98
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
99
if(obj) // This can be NULL during destruction.
101
#ifdef GLIBMM_EXCEPTIONS_ENABLED
102
try // Trap C++ exceptions which would normally be lost because this is a C callback.
104
#endif //GLIBMM_EXCEPTIONS_ENABLED
105
// Call the virtual member method, which derived classes might override.
108
obj->get_preferred_height_for_width_vfunc(*Glib::wrap(widget), width,
109
(minimum_height ? *minimum_height : min_height),
110
(natural_height ? *natural_height : nat_height));
112
#ifdef GLIBMM_EXCEPTIONS_ENABLED
116
Glib::exception_handlers_invoke();
118
#endif //GLIBMM_EXCEPTIONS_ENABLED
122
BaseClassType *const base = static_cast<BaseClassType*>(
123
g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
126
// Call the original underlying C function:
127
if(base && base->get_preferred_height_for_width)
128
(*base->get_preferred_height_for_width)(self, widget, width, minimum_height, natural_height);
131
void CellRenderer_Class::get_preferred_height_vfunc_callback(GtkCellRenderer* self, GtkWidget* widget, gint* minimum_height, gint* natural_height)
133
Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
134
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
136
// Non-gtkmmproc-generated custom classes implicitly call the default
137
// Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
138
// generated classes can use this optimisation, which avoids the unnecessary
139
// parameter conversions if there is no possibility of the virtual function
141
if(obj_base && obj_base->is_derived_())
143
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
144
if(obj) // This can be NULL during destruction.
146
#ifdef GLIBMM_EXCEPTIONS_ENABLED
147
try // Trap C++ exceptions which would normally be lost because this is a C callback.
149
#endif //GLIBMM_EXCEPTIONS_ENABLED
150
// Call the virtual member method, which derived classes might override.
153
obj->get_preferred_height_vfunc(*Glib::wrap(widget),
154
(minimum_height ? *minimum_height : min_height),
155
(natural_height ? *natural_height : nat_height));
157
#ifdef GLIBMM_EXCEPTIONS_ENABLED
161
Glib::exception_handlers_invoke();
163
#endif //GLIBMM_EXCEPTIONS_ENABLED
167
BaseClassType *const base = static_cast<BaseClassType*>(
168
g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
171
// Call the original underlying C function:
172
if(base && base->get_preferred_height)
173
(*base->get_preferred_height)(self, widget, minimum_height, natural_height);
176
void CellRenderer_Class::get_preferred_width_for_height_vfunc_callback(GtkCellRenderer* self, GtkWidget* widget, gint height, gint* minimum_width, gint* natural_width)
178
Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
179
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
181
// Non-gtkmmproc-generated custom classes implicitly call the default
182
// Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
183
// generated classes can use this optimisation, which avoids the unnecessary
184
// parameter conversions if there is no possibility of the virtual function
186
if(obj_base && obj_base->is_derived_())
188
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
189
if(obj) // This can be NULL during destruction.
191
#ifdef GLIBMM_EXCEPTIONS_ENABLED
192
try // Trap C++ exceptions which would normally be lost because this is a C callback.
194
#endif //GLIBMM_EXCEPTIONS_ENABLED
195
// Call the virtual member method, which derived classes might override.
198
obj->get_preferred_width_for_height_vfunc(*Glib::wrap(widget), height,
199
(minimum_width ? *minimum_width : min_width),
200
(natural_width ? *natural_width : nat_width));
202
#ifdef GLIBMM_EXCEPTIONS_ENABLED
206
Glib::exception_handlers_invoke();
208
#endif //GLIBMM_EXCEPTIONS_ENABLED
212
BaseClassType *const base = static_cast<BaseClassType*>(
213
g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
216
// Call the original underlying C function:
217
if(base && base->get_preferred_width_for_height)
218
(*base->get_preferred_width_for_height)(self, widget, height, minimum_width, natural_width);
227
static const Glib::SignalProxyInfo CellRenderer_signal_editing_canceled_info =
230
(GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
231
(GCallback) &Glib::SignalProxyNormal::slot0_void_callback
235
static void CellRenderer_signal_editing_started_callback(GtkCellRenderer* self, GtkCellEditable* p0,const gchar* p1,void* data)
238
typedef sigc::slot< void,CellEditable*,const Glib::ustring& > SlotType;
240
// Do not try to call a signal on a disassociated wrapper.
241
if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
243
#ifdef GLIBMM_EXCEPTIONS_ENABLED
246
#endif //GLIBMM_EXCEPTIONS_ENABLED
247
if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
248
(*static_cast<SlotType*>(slot))(dynamic_cast<CellEditable*>(Glib::wrap_auto((GObject*)(p0), false))
249
, Glib::convert_const_gchar_ptr_to_ustring(p1)
251
#ifdef GLIBMM_EXCEPTIONS_ENABLED
255
Glib::exception_handlers_invoke();
257
#endif //GLIBMM_EXCEPTIONS_ENABLED
261
static const Glib::SignalProxyInfo CellRenderer_signal_editing_started_info =
264
(GCallback) &CellRenderer_signal_editing_started_callback,
265
(GCallback) &CellRenderer_signal_editing_started_callback
269
} // anonymous namespace
272
GType Glib::Value<Gtk::CellRendererState>::value_type()
274
return gtk_cell_renderer_state_get_type();
278
GType Glib::Value<Gtk::CellRendererMode>::value_type()
280
return gtk_cell_renderer_mode_get_type();
287
Gtk::CellRenderer* wrap(GtkCellRenderer* object, bool take_copy)
289
return dynamic_cast<Gtk::CellRenderer *> (Glib::wrap_auto ((GObject*)(object), take_copy));
292
} /* namespace Glib */
298
/* The *_Class implementation: */
300
const Glib::Class& CellRenderer_Class::init()
302
if(!gtype_) // create the GType if necessary
304
// Glib::Class has to know the class init function to clone custom types.
305
class_init_func_ = &CellRenderer_Class::class_init_function;
307
// This is actually just optimized away, apparently with no harm.
308
// Make sure that the parent type has been created.
309
//CppClassParent::CppObjectType::get_type();
311
// Create the wrapper type, with the same class/instance size as the base type.
312
register_derived_type(gtk_cell_renderer_get_type());
314
// Add derived versions of interfaces, if the C type implements any interfaces:
322
void CellRenderer_Class::class_init_function(void* g_class, void* class_data)
324
BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
325
CppClassParent::class_init_function(klass, class_data);
327
klass->get_request_mode = &get_request_mode_vfunc_callback;
328
klass->get_preferred_width = &get_preferred_width_vfunc_callback;
329
klass->get_preferred_height_for_width = &get_preferred_height_for_width_vfunc_callback;
330
klass->get_preferred_height = &get_preferred_height_vfunc_callback;
331
klass->get_preferred_width_for_height = &get_preferred_width_for_height_vfunc_callback;
332
klass->render = &render_vfunc_callback;
333
klass->activate = &activate_vfunc_callback;
334
klass->start_editing = &start_editing_vfunc_callback;
336
klass->editing_canceled = &editing_canceled_callback;
337
klass->editing_started = &editing_started_callback;
340
GtkSizeRequestMode CellRenderer_Class::get_request_mode_vfunc_callback(GtkCellRenderer* self)
342
Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
343
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
345
// Non-gtkmmproc-generated custom classes implicitly call the default
346
// Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
347
// generated classes can use this optimisation, which avoids the unnecessary
348
// parameter conversions if there is no possibility of the virtual function
350
if(obj_base && obj_base->is_derived_())
352
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
353
if(obj) // This can be NULL during destruction.
355
#ifdef GLIBMM_EXCEPTIONS_ENABLED
356
try // Trap C++ exceptions which would normally be lost because this is a C callback.
358
#endif //GLIBMM_EXCEPTIONS_ENABLED
359
// Call the virtual member method, which derived classes might override.
360
return ((GtkSizeRequestMode)(obj->get_request_mode_vfunc()));
361
#ifdef GLIBMM_EXCEPTIONS_ENABLED
365
Glib::exception_handlers_invoke();
367
#endif //GLIBMM_EXCEPTIONS_ENABLED
371
BaseClassType *const base = static_cast<BaseClassType*>(
372
g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
375
// Call the original underlying C function:
376
if(base && base->get_request_mode)
377
return (*base->get_request_mode)(self);
380
typedef GtkSizeRequestMode RType;
383
void CellRenderer_Class::render_vfunc_callback(GtkCellRenderer* self, cairo_t* cr, GtkWidget* widget, const GdkRectangle* background_area, const GdkRectangle* cell_area, GtkCellRendererState flags)
385
Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
386
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
388
// Non-gtkmmproc-generated custom classes implicitly call the default
389
// Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
390
// generated classes can use this optimisation, which avoids the unnecessary
391
// parameter conversions if there is no possibility of the virtual function
393
if(obj_base && obj_base->is_derived_())
395
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
396
if(obj) // This can be NULL during destruction.
398
#ifdef GLIBMM_EXCEPTIONS_ENABLED
399
try // Trap C++ exceptions which would normally be lost because this is a C callback.
401
#endif //GLIBMM_EXCEPTIONS_ENABLED
402
// Call the virtual member method, which derived classes might override.
403
obj->render_vfunc(Cairo::RefPtr<Cairo::Context>(new Cairo::Context(cr, false /* has_reference */))
404
, *Glib::wrap(widget)
405
, Glib::wrap(background_area)
406
, Glib::wrap(cell_area)
407
, ((CellRendererState)(flags))
410
#ifdef GLIBMM_EXCEPTIONS_ENABLED
414
Glib::exception_handlers_invoke();
416
#endif //GLIBMM_EXCEPTIONS_ENABLED
420
BaseClassType *const base = static_cast<BaseClassType*>(
421
g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
424
// Call the original underlying C function:
425
if(base && base->render)
426
(*base->render)(self, cr, widget, background_area, cell_area, flags);
429
gboolean CellRenderer_Class::activate_vfunc_callback(GtkCellRenderer* self, GdkEvent* event, GtkWidget* widget, const gchar* path, const GdkRectangle* background_area, const GdkRectangle* cell_area, GtkCellRendererState flags)
431
Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
432
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
434
// Non-gtkmmproc-generated custom classes implicitly call the default
435
// Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
436
// generated classes can use this optimisation, which avoids the unnecessary
437
// parameter conversions if there is no possibility of the virtual function
439
if(obj_base && obj_base->is_derived_())
441
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
442
if(obj) // This can be NULL during destruction.
444
#ifdef GLIBMM_EXCEPTIONS_ENABLED
445
try // Trap C++ exceptions which would normally be lost because this is a C callback.
447
#endif //GLIBMM_EXCEPTIONS_ENABLED
448
// Call the virtual member method, which derived classes might override.
449
return static_cast<int>(obj->activate_vfunc(event, *Glib::wrap(widget)
450
, Glib::convert_const_gchar_ptr_to_ustring(path)
451
, Glib::wrap(background_area)
452
, Glib::wrap(cell_area)
453
, ((CellRendererState)(flags))
455
#ifdef GLIBMM_EXCEPTIONS_ENABLED
459
Glib::exception_handlers_invoke();
461
#endif //GLIBMM_EXCEPTIONS_ENABLED
465
BaseClassType *const base = static_cast<BaseClassType*>(
466
g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
469
// Call the original underlying C function:
470
if(base && base->activate)
471
return (*base->activate)(self, event, widget, path, background_area, cell_area, flags);
474
typedef gboolean RType;
477
GtkCellEditable* CellRenderer_Class::start_editing_vfunc_callback(GtkCellRenderer* self, GdkEvent* event, GtkWidget* widget, const gchar* path, const GdkRectangle* background_area, const GdkRectangle* cell_area, GtkCellRendererState flags)
479
Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
480
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
482
// Non-gtkmmproc-generated custom classes implicitly call the default
483
// Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
484
// generated classes can use this optimisation, which avoids the unnecessary
485
// parameter conversions if there is no possibility of the virtual function
487
if(obj_base && obj_base->is_derived_())
489
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
490
if(obj) // This can be NULL during destruction.
492
#ifdef GLIBMM_EXCEPTIONS_ENABLED
493
try // Trap C++ exceptions which would normally be lost because this is a C callback.
495
#endif //GLIBMM_EXCEPTIONS_ENABLED
496
// Call the virtual member method, which derived classes might override.
497
return Glib::unwrap(obj->start_editing_vfunc(event, *Glib::wrap(widget)
498
, Glib::convert_const_gchar_ptr_to_ustring(path)
499
, Glib::wrap(background_area)
500
, Glib::wrap(cell_area)
501
, ((CellRendererState)(flags))
503
#ifdef GLIBMM_EXCEPTIONS_ENABLED
507
Glib::exception_handlers_invoke();
509
#endif //GLIBMM_EXCEPTIONS_ENABLED
513
BaseClassType *const base = static_cast<BaseClassType*>(
514
g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
517
// Call the original underlying C function:
518
if(base && base->start_editing)
519
return (*base->start_editing)(self, event, widget, path, background_area, cell_area, flags);
522
typedef GtkCellEditable* RType;
526
void CellRenderer_Class::editing_canceled_callback(GtkCellRenderer* self)
528
Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
529
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
531
// Non-gtkmmproc-generated custom classes implicitly call the default
532
// Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
533
// generated classes can use this optimisation, which avoids the unnecessary
534
// parameter conversions if there is no possibility of the virtual function
536
if(obj_base && obj_base->is_derived_())
538
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
539
if(obj) // This can be NULL during destruction.
541
#ifdef GLIBMM_EXCEPTIONS_ENABLED
542
try // Trap C++ exceptions which would normally be lost because this is a C callback.
544
#endif //GLIBMM_EXCEPTIONS_ENABLED
545
// Call the virtual member method, which derived classes might override.
546
obj->on_editing_canceled();
548
#ifdef GLIBMM_EXCEPTIONS_ENABLED
552
Glib::exception_handlers_invoke();
554
#endif //GLIBMM_EXCEPTIONS_ENABLED
558
BaseClassType *const base = static_cast<BaseClassType*>(
559
g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
562
// Call the original underlying C function:
563
if(base && base->editing_canceled)
564
(*base->editing_canceled)(self);
566
void CellRenderer_Class::editing_started_callback(GtkCellRenderer* self, GtkCellEditable* p0, const gchar* p1)
568
Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
569
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
571
// Non-gtkmmproc-generated custom classes implicitly call the default
572
// Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
573
// generated classes can use this optimisation, which avoids the unnecessary
574
// parameter conversions if there is no possibility of the virtual function
576
if(obj_base && obj_base->is_derived_())
578
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
579
if(obj) // This can be NULL during destruction.
581
#ifdef GLIBMM_EXCEPTIONS_ENABLED
582
try // Trap C++ exceptions which would normally be lost because this is a C callback.
584
#endif //GLIBMM_EXCEPTIONS_ENABLED
585
// Call the virtual member method, which derived classes might override.
586
obj->on_editing_started(dynamic_cast<CellEditable*>(Glib::wrap_auto((GObject*)(p0), false))
587
, Glib::convert_const_gchar_ptr_to_ustring(p1)
590
#ifdef GLIBMM_EXCEPTIONS_ENABLED
594
Glib::exception_handlers_invoke();
596
#endif //GLIBMM_EXCEPTIONS_ENABLED
600
BaseClassType *const base = static_cast<BaseClassType*>(
601
g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
604
// Call the original underlying C function:
605
if(base && base->editing_started)
606
(*base->editing_started)(self, p0, p1);
610
Glib::ObjectBase* CellRenderer_Class::wrap_new(GObject* o)
612
return manage(new CellRenderer((GtkCellRenderer*)(o)));
617
/* The implementation: */
619
CellRenderer::CellRenderer(const Glib::ConstructParams& construct_params)
621
Gtk::Object(construct_params)
625
CellRenderer::CellRenderer(GtkCellRenderer* castitem)
627
Gtk::Object((GObject*)(castitem))
631
CellRenderer::~CellRenderer()
636
CellRenderer::CppClassType CellRenderer::cellrenderer_class_; // initialize static member
638
GType CellRenderer::get_type()
640
return cellrenderer_class_.init().get_type();
644
GType CellRenderer::get_base_type()
646
return gtk_cell_renderer_get_type();
650
SizeRequestMode CellRenderer::get_request_mode() const
652
return ((SizeRequestMode)(gtk_cell_renderer_get_request_mode(const_cast<GtkCellRenderer*>(gobj()))));
655
void CellRenderer::get_preferred_width(Widget& widget, int& minimum_width, int& natural_width) const
657
gtk_cell_renderer_get_preferred_width(const_cast<GtkCellRenderer*>(gobj()), (widget).gobj(), &(minimum_width), &(natural_width));
660
void CellRenderer::get_preferred_height_for_width(Widget& widget, int width, int& minimum_height, int& natural_height) const
662
gtk_cell_renderer_get_preferred_height_for_width(const_cast<GtkCellRenderer*>(gobj()), (widget).gobj(), width, &(minimum_height), &(natural_height));
665
void CellRenderer::get_preferred_height(Widget& widget, int& minimum_height, int& natural_height) const
667
gtk_cell_renderer_get_preferred_height(const_cast<GtkCellRenderer*>(gobj()), (widget).gobj(), &(minimum_height), &(natural_height));
670
void CellRenderer::get_preferred_width_for_height(Widget& widget, int height, int& minimum_width, int& natural_width) const
672
gtk_cell_renderer_get_preferred_width_for_height(const_cast<GtkCellRenderer*>(gobj()), (widget).gobj(), height, &(minimum_width), &(natural_width));
675
void CellRenderer::get_preferred_size(Widget& widget, Requisition& minimum_size, Requisition& natural_size) const
677
gtk_cell_renderer_get_preferred_size(const_cast<GtkCellRenderer*>(gobj()), (widget).gobj(), (GtkRequisition*)(&minimum_size), (GtkRequisition*)(&natural_size));
680
void CellRenderer::get_aligned_area(Widget& widget, CellRendererState flags, const Gdk::Rectangle& cell_area, Gdk::Rectangle& aligned_area)
682
gtk_cell_renderer_get_aligned_area(gobj(), (widget).gobj(), ((GtkCellRendererState)(flags)), (cell_area).gobj(), (aligned_area).gobj());
685
void CellRenderer::render(const Cairo::RefPtr<Cairo::Context>& cr, Widget& widget, const Gdk::Rectangle& background_area, const Gdk::Rectangle& cell_area, CellRendererState flags)
687
gtk_cell_renderer_render(gobj(), (cr)->cobj(), (widget).gobj(), (background_area).gobj(), (cell_area).gobj(), ((GtkCellRendererState)(flags)));
690
bool CellRenderer::activate(GdkEvent* event, Widget& widget, const Glib::ustring& path, const Gdk::Rectangle& background_area, const Gdk::Rectangle& cell_area, CellRendererState flags)
692
return gtk_cell_renderer_activate(gobj(), event, (widget).gobj(), path.c_str(), (background_area).gobj(), (cell_area).gobj(), ((GtkCellRendererState)(flags)));
695
CellEditable* CellRenderer::start_editing(GdkEvent* event, Widget& widget, const Glib::ustring& path, const Gdk::Rectangle& background_area, const Gdk::Rectangle& cell_area, CellRendererState flags)
697
return dynamic_cast<CellEditable*>(Glib::wrap_auto((GObject*)(gtk_cell_renderer_start_editing(gobj(), event, (widget).gobj(), path.c_str(), (background_area).gobj(), (cell_area).gobj(), ((GtkCellRendererState)(flags)))), false));
700
void CellRenderer::set_fixed_size(int width, int height)
702
gtk_cell_renderer_set_fixed_size(gobj(), width, height);
705
void CellRenderer::get_fixed_size(int& width, int& height) const
707
gtk_cell_renderer_get_fixed_size(const_cast<GtkCellRenderer*>(gobj()), &(width), &(height));
710
void CellRenderer::set_alignment(float align, float yalign)
712
gtk_cell_renderer_set_alignment(gobj(), align, yalign);
715
void CellRenderer::get_alignment(float& xalign, float& yalign) const
717
gtk_cell_renderer_get_alignment(const_cast<GtkCellRenderer*>(gobj()), &(xalign), &(yalign));
720
void CellRenderer::set_padding(int xpad, int ypad)
722
gtk_cell_renderer_set_padding(gobj(), xpad, ypad);
725
void CellRenderer::get_padding(int& xpad, int& ypad) const
727
gtk_cell_renderer_get_padding(const_cast<GtkCellRenderer*>(gobj()), &(xpad), &(ypad));
730
void CellRenderer::set_visible(bool visible)
732
gtk_cell_renderer_set_visible(gobj(), static_cast<int>(visible));
735
bool CellRenderer::get_visible() const
737
return gtk_cell_renderer_get_visible(const_cast<GtkCellRenderer*>(gobj()));
740
void CellRenderer::set_sensitive(bool sensitive)
742
gtk_cell_renderer_set_sensitive(gobj(), static_cast<int>(sensitive));
745
bool CellRenderer::get_sensitive() const
747
return gtk_cell_renderer_get_sensitive(const_cast<GtkCellRenderer*>(gobj()));
750
bool CellRenderer::is_activatable() const
752
return gtk_cell_renderer_is_activatable(const_cast<GtkCellRenderer*>(gobj()));
755
void CellRenderer::stop_editing(bool canceled)
757
gtk_cell_renderer_stop_editing(gobj(), static_cast<int>(canceled));
760
StateFlags CellRenderer::get_state(Widget& widget, CellRendererState cell_state) const
762
return ((StateFlags)(gtk_cell_renderer_get_state(const_cast<GtkCellRenderer*>(gobj()), (widget).gobj(), ((GtkCellRendererState)(cell_state)))));
765
CellRenderer::CellRenderer()
767
// Mark this class as non-derived to allow C++ vfuncs to be skipped.
769
Gtk::Object(Glib::ConstructParams(cellrenderer_class_.init()))
776
Glib::SignalProxy0< void > CellRenderer::signal_editing_canceled()
778
return Glib::SignalProxy0< void >(this, &CellRenderer_signal_editing_canceled_info);
782
Glib::SignalProxy2< void,CellEditable*,const Glib::ustring& > CellRenderer::signal_editing_started()
784
return Glib::SignalProxy2< void,CellEditable*,const Glib::ustring& >(this, &CellRenderer_signal_editing_started_info);
788
#ifdef GLIBMM_PROPERTIES_ENABLED
789
Glib::PropertyProxy<CellRendererMode> CellRenderer::property_mode()
791
return Glib::PropertyProxy<CellRendererMode>(this, "mode");
793
#endif //GLIBMM_PROPERTIES_ENABLED
795
#ifdef GLIBMM_PROPERTIES_ENABLED
796
Glib::PropertyProxy_ReadOnly<CellRendererMode> CellRenderer::property_mode() const
798
return Glib::PropertyProxy_ReadOnly<CellRendererMode>(this, "mode");
800
#endif //GLIBMM_PROPERTIES_ENABLED
802
#ifdef GLIBMM_PROPERTIES_ENABLED
803
Glib::PropertyProxy<bool> CellRenderer::property_visible()
805
return Glib::PropertyProxy<bool>(this, "visible");
807
#endif //GLIBMM_PROPERTIES_ENABLED
809
#ifdef GLIBMM_PROPERTIES_ENABLED
810
Glib::PropertyProxy_ReadOnly<bool> CellRenderer::property_visible() const
812
return Glib::PropertyProxy_ReadOnly<bool>(this, "visible");
814
#endif //GLIBMM_PROPERTIES_ENABLED
816
#ifdef GLIBMM_PROPERTIES_ENABLED
817
Glib::PropertyProxy<bool> CellRenderer::property_sensitive()
819
return Glib::PropertyProxy<bool>(this, "sensitive");
821
#endif //GLIBMM_PROPERTIES_ENABLED
823
#ifdef GLIBMM_PROPERTIES_ENABLED
824
Glib::PropertyProxy_ReadOnly<bool> CellRenderer::property_sensitive() const
826
return Glib::PropertyProxy_ReadOnly<bool>(this, "sensitive");
828
#endif //GLIBMM_PROPERTIES_ENABLED
830
#ifdef GLIBMM_PROPERTIES_ENABLED
831
Glib::PropertyProxy<float> CellRenderer::property_xalign()
833
return Glib::PropertyProxy<float>(this, "xalign");
835
#endif //GLIBMM_PROPERTIES_ENABLED
837
#ifdef GLIBMM_PROPERTIES_ENABLED
838
Glib::PropertyProxy_ReadOnly<float> CellRenderer::property_xalign() const
840
return Glib::PropertyProxy_ReadOnly<float>(this, "xalign");
842
#endif //GLIBMM_PROPERTIES_ENABLED
844
#ifdef GLIBMM_PROPERTIES_ENABLED
845
Glib::PropertyProxy<float> CellRenderer::property_yalign()
847
return Glib::PropertyProxy<float>(this, "yalign");
849
#endif //GLIBMM_PROPERTIES_ENABLED
851
#ifdef GLIBMM_PROPERTIES_ENABLED
852
Glib::PropertyProxy_ReadOnly<float> CellRenderer::property_yalign() const
854
return Glib::PropertyProxy_ReadOnly<float>(this, "yalign");
856
#endif //GLIBMM_PROPERTIES_ENABLED
858
#ifdef GLIBMM_PROPERTIES_ENABLED
859
Glib::PropertyProxy<unsigned int> CellRenderer::property_xpad()
861
return Glib::PropertyProxy<unsigned int>(this, "xpad");
863
#endif //GLIBMM_PROPERTIES_ENABLED
865
#ifdef GLIBMM_PROPERTIES_ENABLED
866
Glib::PropertyProxy_ReadOnly<unsigned int> CellRenderer::property_xpad() const
868
return Glib::PropertyProxy_ReadOnly<unsigned int>(this, "xpad");
870
#endif //GLIBMM_PROPERTIES_ENABLED
872
#ifdef GLIBMM_PROPERTIES_ENABLED
873
Glib::PropertyProxy<unsigned int> CellRenderer::property_ypad()
875
return Glib::PropertyProxy<unsigned int>(this, "ypad");
877
#endif //GLIBMM_PROPERTIES_ENABLED
879
#ifdef GLIBMM_PROPERTIES_ENABLED
880
Glib::PropertyProxy_ReadOnly<unsigned int> CellRenderer::property_ypad() const
882
return Glib::PropertyProxy_ReadOnly<unsigned int>(this, "ypad");
884
#endif //GLIBMM_PROPERTIES_ENABLED
886
#ifdef GLIBMM_PROPERTIES_ENABLED
887
Glib::PropertyProxy<int> CellRenderer::property_width()
889
return Glib::PropertyProxy<int>(this, "width");
891
#endif //GLIBMM_PROPERTIES_ENABLED
893
#ifdef GLIBMM_PROPERTIES_ENABLED
894
Glib::PropertyProxy_ReadOnly<int> CellRenderer::property_width() const
896
return Glib::PropertyProxy_ReadOnly<int>(this, "width");
898
#endif //GLIBMM_PROPERTIES_ENABLED
900
#ifdef GLIBMM_PROPERTIES_ENABLED
901
Glib::PropertyProxy<int> CellRenderer::property_height()
903
return Glib::PropertyProxy<int>(this, "height");
905
#endif //GLIBMM_PROPERTIES_ENABLED
907
#ifdef GLIBMM_PROPERTIES_ENABLED
908
Glib::PropertyProxy_ReadOnly<int> CellRenderer::property_height() const
910
return Glib::PropertyProxy_ReadOnly<int>(this, "height");
912
#endif //GLIBMM_PROPERTIES_ENABLED
914
#ifdef GLIBMM_PROPERTIES_ENABLED
915
Glib::PropertyProxy<bool> CellRenderer::property_is_expander()
917
return Glib::PropertyProxy<bool>(this, "is-expander");
919
#endif //GLIBMM_PROPERTIES_ENABLED
921
#ifdef GLIBMM_PROPERTIES_ENABLED
922
Glib::PropertyProxy_ReadOnly<bool> CellRenderer::property_is_expander() const
924
return Glib::PropertyProxy_ReadOnly<bool>(this, "is-expander");
926
#endif //GLIBMM_PROPERTIES_ENABLED
928
#ifdef GLIBMM_PROPERTIES_ENABLED
929
Glib::PropertyProxy<bool> CellRenderer::property_is_expanded()
931
return Glib::PropertyProxy<bool>(this, "is-expanded");
933
#endif //GLIBMM_PROPERTIES_ENABLED
935
#ifdef GLIBMM_PROPERTIES_ENABLED
936
Glib::PropertyProxy_ReadOnly<bool> CellRenderer::property_is_expanded() const
938
return Glib::PropertyProxy_ReadOnly<bool>(this, "is-expanded");
940
#endif //GLIBMM_PROPERTIES_ENABLED
942
#ifdef GLIBMM_PROPERTIES_ENABLED
943
Glib::PropertyProxy_WriteOnly<Glib::ustring> CellRenderer::property_cell_background()
945
return Glib::PropertyProxy_WriteOnly<Glib::ustring>(this, "cell-background");
947
#endif //GLIBMM_PROPERTIES_ENABLED
949
#ifdef GLIBMM_PROPERTIES_ENABLED
950
Glib::PropertyProxy<Gdk::Color> CellRenderer::property_cell_background_gdk()
952
return Glib::PropertyProxy<Gdk::Color>(this, "cell-background-gdk");
954
#endif //GLIBMM_PROPERTIES_ENABLED
956
#ifdef GLIBMM_PROPERTIES_ENABLED
957
Glib::PropertyProxy_ReadOnly<Gdk::Color> CellRenderer::property_cell_background_gdk() const
959
return Glib::PropertyProxy_ReadOnly<Gdk::Color>(this, "cell-background-gdk");
961
#endif //GLIBMM_PROPERTIES_ENABLED
963
#ifdef GLIBMM_PROPERTIES_ENABLED
964
Glib::PropertyProxy<Gdk::RGBA> CellRenderer::property_cell_background_rgba()
966
return Glib::PropertyProxy<Gdk::RGBA>(this, "cell-background-rgba");
968
#endif //GLIBMM_PROPERTIES_ENABLED
970
#ifdef GLIBMM_PROPERTIES_ENABLED
971
Glib::PropertyProxy_ReadOnly<Gdk::RGBA> CellRenderer::property_cell_background_rgba() const
973
return Glib::PropertyProxy_ReadOnly<Gdk::RGBA>(this, "cell-background-rgba");
975
#endif //GLIBMM_PROPERTIES_ENABLED
977
#ifdef GLIBMM_PROPERTIES_ENABLED
978
Glib::PropertyProxy<bool> CellRenderer::property_cell_background_set()
980
return Glib::PropertyProxy<bool>(this, "cell-background-set");
982
#endif //GLIBMM_PROPERTIES_ENABLED
984
#ifdef GLIBMM_PROPERTIES_ENABLED
985
Glib::PropertyProxy_ReadOnly<bool> CellRenderer::property_cell_background_set() const
987
return Glib::PropertyProxy_ReadOnly<bool>(this, "cell-background-set");
989
#endif //GLIBMM_PROPERTIES_ENABLED
991
#ifdef GLIBMM_PROPERTIES_ENABLED
992
Glib::PropertyProxy_ReadOnly<bool> CellRenderer::property_editing() const
994
return Glib::PropertyProxy_ReadOnly<bool>(this, "editing");
996
#endif //GLIBMM_PROPERTIES_ENABLED
999
void Gtk::CellRenderer::on_editing_canceled()
1001
BaseClassType *const base = static_cast<BaseClassType*>(
1002
g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
1005
if(base && base->editing_canceled)
1006
(*base->editing_canceled)(gobj());
1008
void Gtk::CellRenderer::on_editing_started(CellEditable* editable, const Glib::ustring& path)
1010
BaseClassType *const base = static_cast<BaseClassType*>(
1011
g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
1014
if(base && base->editing_started)
1015
(*base->editing_started)(gobj(),Glib::unwrap(editable),path.c_str());
1018
SizeRequestMode Gtk::CellRenderer::get_request_mode_vfunc() const
1020
BaseClassType *const base = static_cast<BaseClassType*>(
1021
g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
1024
if(base && base->get_request_mode)
1025
return ((SizeRequestMode)((*base->get_request_mode)(const_cast<GtkCellRenderer*>(gobj()))));
1027
typedef SizeRequestMode RType;
1030
void Gtk::CellRenderer::get_preferred_width_vfunc(Widget& widget, int& minimum_width, int& natural_width) const
1032
BaseClassType *const base = static_cast<BaseClassType*>(
1033
g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
1036
if(base && base->get_preferred_width)
1037
(*base->get_preferred_width)(const_cast<GtkCellRenderer*>(gobj()),(widget).gobj(),&(minimum_width),&(natural_width));
1039
void Gtk::CellRenderer::get_preferred_height_for_width_vfunc(Widget& widget, int width, int& minimum_height, int& natural_height) const
1041
BaseClassType *const base = static_cast<BaseClassType*>(
1042
g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
1045
if(base && base->get_preferred_height_for_width)
1046
(*base->get_preferred_height_for_width)(const_cast<GtkCellRenderer*>(gobj()),(widget).gobj(),width,&(minimum_height),&(natural_height));
1048
void Gtk::CellRenderer::get_preferred_height_vfunc(Widget& widget, int& minimum_height, int& natural_height) const
1050
BaseClassType *const base = static_cast<BaseClassType*>(
1051
g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
1054
if(base && base->get_preferred_height)
1055
(*base->get_preferred_height)(const_cast<GtkCellRenderer*>(gobj()),(widget).gobj(),&(minimum_height),&(natural_height));
1057
void Gtk::CellRenderer::get_preferred_width_for_height_vfunc(Widget& widget, int height, int& minimum_width, int& natural_width) const
1059
BaseClassType *const base = static_cast<BaseClassType*>(
1060
g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
1063
if(base && base->get_preferred_width_for_height)
1064
(*base->get_preferred_width_for_height)(const_cast<GtkCellRenderer*>(gobj()),(widget).gobj(),height,&(minimum_width),&(natural_width));
1066
void Gtk::CellRenderer::render_vfunc(const Cairo::RefPtr<Cairo::Context>& cr, Widget& widget, const Gdk::Rectangle& background_area, const Gdk::Rectangle& cell_area, CellRendererState flags)
1068
BaseClassType *const base = static_cast<BaseClassType*>(
1069
g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
1072
if(base && base->render)
1073
(*base->render)(gobj(),(cr)->cobj(),(widget).gobj(),(background_area).gobj(),(cell_area).gobj(),((GtkCellRendererState)(flags)));
1075
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)
1077
BaseClassType *const base = static_cast<BaseClassType*>(
1078
g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
1081
if(base && base->activate)
1082
return (*base->activate)(gobj(),event,(widget).gobj(),path.c_str(),(background_area).gobj(),(cell_area).gobj(),((GtkCellRendererState)(flags)));
1087
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)
1089
BaseClassType *const base = static_cast<BaseClassType*>(
1090
g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
1093
if(base && base->start_editing)
1094
return dynamic_cast<CellEditable*>(Glib::wrap_auto((GObject*)((*base->start_editing)(gobj(),event,(widget).gobj(),path.c_str(),(background_area).gobj(),(cell_area).gobj(),((GtkCellRendererState)(flags)))), false));
1096
typedef CellEditable* RType;