~ubuntu-branches/ubuntu/precise/gtkmm3.0/precise

« back to all changes in this revision

Viewing changes to gtk/gtkmm/cellrenderer.cc

  • Committer: Bazaar Package Importer
  • Author(s): Michael Biebl
  • Date: 2011-06-17 00:12:44 UTC
  • Revision ID: james.westby@ubuntu.com-20110617001244-9hl5an15hiaaahi6
Tags: upstream-3.0.1
ImportĀ upstreamĀ versionĀ 3.0.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Generated by gtkmmproc -- DO NOT MODIFY!
 
2
 
 
3
 
 
4
#include <gtkmm/cellrenderer.h>
 
5
#include <gtkmm/private/cellrenderer_p.h>
 
6
 
 
7
// -*- c++ -*-
 
8
/* $Id: cellrenderer.ccg,v 1.2 2006/05/10 20:59:27 murrayc Exp $ */
 
9
 
 
10
/* Copyright 1998-2002 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 <gtk/gtk.h>
 
28
 
 
29
namespace Gtk
 
30
{
 
31
 
 
32
Glib::PropertyProxy_Base CellRenderer::_property_renderable()
 
33
{
 
34
  g_assert_not_reached();
 
35
  return Glib::PropertyProxy<int>(0, 0); // shut up warnings
 
36
}
 
37
 
 
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)
 
42
{
 
43
  Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
 
44
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));
 
45
 
 
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
 
50
  // being overridden:
 
51
  if(obj_base && obj_base->is_derived_())
 
52
  {
 
53
    CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
 
54
    if(obj) // This can be NULL during destruction.
 
55
    {
 
56
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
 
57
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
 
58
      {
 
59
      #endif //GLIBMM_EXCEPTIONS_ENABLED
 
60
        // Call the virtual member method, which derived classes might override.
 
61
        int min_width = 0;
 
62
        int nat_width = 0;
 
63
        obj->get_preferred_width_vfunc(*Glib::wrap(widget),
 
64
             (minimum_width ? *minimum_width : min_width),
 
65
             (natural_width ? *natural_width : nat_width));
 
66
        return;
 
67
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
 
68
      }
 
69
      catch(...)
 
70
      {
 
71
        Glib::exception_handlers_invoke();
 
72
      }
 
73
      #endif //GLIBMM_EXCEPTIONS_ENABLED
 
74
    }
 
75
  }
 
76
  
 
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).
 
79
  );
 
80
 
 
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);
 
84
}
 
85
 
 
86
void CellRenderer_Class::get_preferred_height_for_width_vfunc_callback(GtkCellRenderer* self, GtkWidget* widget, gint width, gint* minimum_height, gint* natural_height)
 
87
{
 
88
  Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
 
89
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));
 
90
 
 
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
 
95
  // being overridden:
 
96
  if(obj_base && obj_base->is_derived_())
 
97
  {
 
98
    CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
 
99
    if(obj) // This can be NULL during destruction.
 
100
    {
 
101
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
 
102
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
 
103
      {
 
104
      #endif //GLIBMM_EXCEPTIONS_ENABLED
 
105
        // Call the virtual member method, which derived classes might override.
 
106
        int min_height = 0;
 
107
        int nat_height = 0;
 
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));
 
111
        return;
 
112
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
 
113
      }
 
114
      catch(...)
 
115
      {
 
116
        Glib::exception_handlers_invoke();
 
117
      }
 
118
      #endif //GLIBMM_EXCEPTIONS_ENABLED
 
119
    }
 
120
  }
 
121
  
 
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).
 
124
  );
 
125
 
 
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);
 
129
}
 
130
 
 
131
void CellRenderer_Class::get_preferred_height_vfunc_callback(GtkCellRenderer* self, GtkWidget* widget, gint* minimum_height, gint* natural_height)
 
132
{
 
133
  Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
 
134
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));
 
135
 
 
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
 
140
  // being overridden:
 
141
  if(obj_base && obj_base->is_derived_())
 
142
  {
 
143
    CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
 
144
    if(obj) // This can be NULL during destruction.
 
145
    {
 
146
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
 
147
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
 
148
      {
 
149
      #endif //GLIBMM_EXCEPTIONS_ENABLED
 
150
        // Call the virtual member method, which derived classes might override.
 
151
        int min_height = 0;
 
152
        int nat_height = 0;
 
153
        obj->get_preferred_height_vfunc(*Glib::wrap(widget),
 
154
             (minimum_height ? *minimum_height : min_height),
 
155
             (natural_height ? *natural_height : nat_height));
 
156
        return;
 
157
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
 
158
      }
 
159
      catch(...)
 
160
      {
 
161
        Glib::exception_handlers_invoke();
 
162
      }
 
163
      #endif //GLIBMM_EXCEPTIONS_ENABLED
 
164
    }
 
165
  }
 
166
  
 
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).
 
169
  );
 
170
 
 
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);
 
174
}
 
175
 
 
176
void CellRenderer_Class::get_preferred_width_for_height_vfunc_callback(GtkCellRenderer* self, GtkWidget* widget, gint height, gint* minimum_width, gint* natural_width)
 
177
{
 
178
  Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
 
179
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));
 
180
 
 
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
 
185
  // being overridden:
 
186
  if(obj_base && obj_base->is_derived_())
 
187
  {
 
188
    CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
 
189
    if(obj) // This can be NULL during destruction.
 
190
    {
 
191
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
 
192
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
 
193
      {
 
194
      #endif //GLIBMM_EXCEPTIONS_ENABLED
 
195
        // Call the virtual member method, which derived classes might override.
 
196
        int min_width = 0;
 
197
        int nat_width = 0;
 
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));
 
201
        return;
 
202
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
 
203
      }
 
204
      catch(...)
 
205
      {
 
206
        Glib::exception_handlers_invoke();
 
207
      }
 
208
      #endif //GLIBMM_EXCEPTIONS_ENABLED
 
209
    }
 
210
  }
 
211
  
 
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).
 
214
  );
 
215
 
 
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);
 
219
}
 
220
 
 
221
} // namespace Gtk
 
222
 
 
223
namespace
 
224
{
 
225
 
 
226
 
 
227
static const Glib::SignalProxyInfo CellRenderer_signal_editing_canceled_info =
 
228
{
 
229
  "editing_canceled",
 
230
  (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
 
231
  (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
 
232
};
 
233
 
 
234
 
 
235
static void CellRenderer_signal_editing_started_callback(GtkCellRenderer* self, GtkCellEditable* p0,const gchar* p1,void* data)
 
236
{
 
237
  using namespace Gtk;
 
238
  typedef sigc::slot< void,CellEditable*,const Glib::ustring& > SlotType;
 
239
 
 
240
  // Do not try to call a signal on a disassociated wrapper.
 
241
  if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
 
242
  {
 
243
    #ifdef GLIBMM_EXCEPTIONS_ENABLED
 
244
    try
 
245
    {
 
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)
 
250
);
 
251
    #ifdef GLIBMM_EXCEPTIONS_ENABLED
 
252
    }
 
253
    catch(...)
 
254
    {
 
255
      Glib::exception_handlers_invoke();
 
256
    }
 
257
    #endif //GLIBMM_EXCEPTIONS_ENABLED
 
258
  }
 
259
}
 
260
 
 
261
static const Glib::SignalProxyInfo CellRenderer_signal_editing_started_info =
 
262
{
 
263
  "editing_started",
 
264
  (GCallback) &CellRenderer_signal_editing_started_callback,
 
265
  (GCallback) &CellRenderer_signal_editing_started_callback
 
266
};
 
267
 
 
268
 
 
269
} // anonymous namespace
 
270
 
 
271
// static
 
272
GType Glib::Value<Gtk::CellRendererState>::value_type()
 
273
{
 
274
  return gtk_cell_renderer_state_get_type();
 
275
}
 
276
 
 
277
// static
 
278
GType Glib::Value<Gtk::CellRendererMode>::value_type()
 
279
{
 
280
  return gtk_cell_renderer_mode_get_type();
 
281
}
 
282
 
 
283
 
 
284
namespace Glib
 
285
{
 
286
 
 
287
Gtk::CellRenderer* wrap(GtkCellRenderer* object, bool take_copy)
 
288
{
 
289
  return dynamic_cast<Gtk::CellRenderer *> (Glib::wrap_auto ((GObject*)(object), take_copy));
 
290
}
 
291
 
 
292
} /* namespace Glib */
 
293
 
 
294
namespace Gtk
 
295
{
 
296
 
 
297
 
 
298
/* The *_Class implementation: */
 
299
 
 
300
const Glib::Class& CellRenderer_Class::init()
 
301
{
 
302
  if(!gtype_) // create the GType if necessary
 
303
  {
 
304
    // Glib::Class has to know the class init function to clone custom types.
 
305
    class_init_func_ = &CellRenderer_Class::class_init_function;
 
306
 
 
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();
 
310
 
 
311
    // Create the wrapper type, with the same class/instance size as the base type.
 
312
    register_derived_type(gtk_cell_renderer_get_type());
 
313
 
 
314
    // Add derived versions of interfaces, if the C type implements any interfaces:
 
315
 
 
316
  }
 
317
 
 
318
  return *this;
 
319
}
 
320
 
 
321
 
 
322
void CellRenderer_Class::class_init_function(void* g_class, void* class_data)
 
323
{
 
324
  BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
 
325
  CppClassParent::class_init_function(klass, class_data);
 
326
 
 
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;
 
335
 
 
336
  klass->editing_canceled = &editing_canceled_callback;
 
337
  klass->editing_started = &editing_started_callback;
 
338
}
 
339
 
 
340
GtkSizeRequestMode CellRenderer_Class::get_request_mode_vfunc_callback(GtkCellRenderer* self)
 
341
{
 
342
  Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
 
343
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));
 
344
 
 
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
 
349
  // being overridden:
 
350
  if(obj_base && obj_base->is_derived_())
 
351
  {
 
352
    CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
 
353
    if(obj) // This can be NULL during destruction.
 
354
    {
 
355
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
 
356
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
 
357
      {
 
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
 
362
      }
 
363
      catch(...)
 
364
      {
 
365
        Glib::exception_handlers_invoke();
 
366
      }
 
367
      #endif //GLIBMM_EXCEPTIONS_ENABLED
 
368
    }
 
369
  }
 
370
  
 
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).
 
373
  );
 
374
 
 
375
  // Call the original underlying C function:
 
376
  if(base && base->get_request_mode)
 
377
    return (*base->get_request_mode)(self);
 
378
 
 
379
 
 
380
  typedef GtkSizeRequestMode RType;
 
381
  return RType();
 
382
}
 
383
void CellRenderer_Class::render_vfunc_callback(GtkCellRenderer* self, cairo_t* cr, GtkWidget* widget, const GdkRectangle* background_area, const GdkRectangle* cell_area, GtkCellRendererState flags)
 
384
{
 
385
  Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
 
386
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));
 
387
 
 
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
 
392
  // being overridden:
 
393
  if(obj_base && obj_base->is_derived_())
 
394
  {
 
395
    CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
 
396
    if(obj) // This can be NULL during destruction.
 
397
    {
 
398
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
 
399
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
 
400
      {
 
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))
 
408
);
 
409
        return;
 
410
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
 
411
      }
 
412
      catch(...)
 
413
      {
 
414
        Glib::exception_handlers_invoke();
 
415
      }
 
416
      #endif //GLIBMM_EXCEPTIONS_ENABLED
 
417
    }
 
418
  }
 
419
  
 
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).
 
422
  );
 
423
 
 
424
  // Call the original underlying C function:
 
425
  if(base && base->render)
 
426
    (*base->render)(self, cr, widget, background_area, cell_area, flags);
 
427
 
 
428
}
 
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)
 
430
{
 
431
  Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
 
432
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));
 
433
 
 
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
 
438
  // being overridden:
 
439
  if(obj_base && obj_base->is_derived_())
 
440
  {
 
441
    CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
 
442
    if(obj) // This can be NULL during destruction.
 
443
    {
 
444
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
 
445
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
 
446
      {
 
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))
 
454
));
 
455
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
 
456
      }
 
457
      catch(...)
 
458
      {
 
459
        Glib::exception_handlers_invoke();
 
460
      }
 
461
      #endif //GLIBMM_EXCEPTIONS_ENABLED
 
462
    }
 
463
  }
 
464
  
 
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).
 
467
  );
 
468
 
 
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);
 
472
 
 
473
 
 
474
  typedef gboolean RType;
 
475
  return RType();
 
476
}
 
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)
 
478
{
 
479
  Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
 
480
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));
 
481
 
 
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
 
486
  // being overridden:
 
487
  if(obj_base && obj_base->is_derived_())
 
488
  {
 
489
    CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
 
490
    if(obj) // This can be NULL during destruction.
 
491
    {
 
492
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
 
493
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
 
494
      {
 
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))
 
502
));
 
503
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
 
504
      }
 
505
      catch(...)
 
506
      {
 
507
        Glib::exception_handlers_invoke();
 
508
      }
 
509
      #endif //GLIBMM_EXCEPTIONS_ENABLED
 
510
    }
 
511
  }
 
512
  
 
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).
 
515
  );
 
516
 
 
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);
 
520
 
 
521
 
 
522
  typedef GtkCellEditable* RType;
 
523
  return RType();
 
524
}
 
525
 
 
526
void CellRenderer_Class::editing_canceled_callback(GtkCellRenderer* self)
 
527
{
 
528
  Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
 
529
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));
 
530
 
 
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
 
535
  // being overridden:
 
536
  if(obj_base && obj_base->is_derived_())
 
537
  {
 
538
    CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
 
539
    if(obj) // This can be NULL during destruction.
 
540
    {
 
541
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
 
542
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
 
543
      {
 
544
      #endif //GLIBMM_EXCEPTIONS_ENABLED
 
545
        // Call the virtual member method, which derived classes might override.
 
546
        obj->on_editing_canceled();
 
547
        return;
 
548
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
 
549
      }
 
550
      catch(...)
 
551
      {
 
552
        Glib::exception_handlers_invoke();
 
553
      }
 
554
      #endif //GLIBMM_EXCEPTIONS_ENABLED
 
555
    }
 
556
  }
 
557
  
 
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).
 
560
    );
 
561
 
 
562
  // Call the original underlying C function:
 
563
  if(base && base->editing_canceled)
 
564
    (*base->editing_canceled)(self);
 
565
}
 
566
void CellRenderer_Class::editing_started_callback(GtkCellRenderer* self, GtkCellEditable* p0, const gchar* p1)
 
567
{
 
568
  Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
 
569
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));
 
570
 
 
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
 
575
  // being overridden:
 
576
  if(obj_base && obj_base->is_derived_())
 
577
  {
 
578
    CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
 
579
    if(obj) // This can be NULL during destruction.
 
580
    {
 
581
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
 
582
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
 
583
      {
 
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)
 
588
);
 
589
        return;
 
590
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
 
591
      }
 
592
      catch(...)
 
593
      {
 
594
        Glib::exception_handlers_invoke();
 
595
      }
 
596
      #endif //GLIBMM_EXCEPTIONS_ENABLED
 
597
    }
 
598
  }
 
599
  
 
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).
 
602
    );
 
603
 
 
604
  // Call the original underlying C function:
 
605
  if(base && base->editing_started)
 
606
    (*base->editing_started)(self, p0, p1);
 
607
}
 
608
 
 
609
 
 
610
Glib::ObjectBase* CellRenderer_Class::wrap_new(GObject* o)
 
611
{
 
612
  return manage(new CellRenderer((GtkCellRenderer*)(o)));
 
613
 
 
614
}
 
615
 
 
616
 
 
617
/* The implementation: */
 
618
 
 
619
CellRenderer::CellRenderer(const Glib::ConstructParams& construct_params)
 
620
:
 
621
  Gtk::Object(construct_params)
 
622
{
 
623
  }
 
624
 
 
625
CellRenderer::CellRenderer(GtkCellRenderer* castitem)
 
626
:
 
627
  Gtk::Object((GObject*)(castitem))
 
628
{
 
629
  }
 
630
 
 
631
CellRenderer::~CellRenderer()
 
632
{
 
633
  destroy_();
 
634
}
 
635
 
 
636
CellRenderer::CppClassType CellRenderer::cellrenderer_class_; // initialize static member
 
637
 
 
638
GType CellRenderer::get_type()
 
639
{
 
640
  return cellrenderer_class_.init().get_type();
 
641
}
 
642
 
 
643
 
 
644
GType CellRenderer::get_base_type()
 
645
{
 
646
  return gtk_cell_renderer_get_type();
 
647
}
 
648
 
 
649
 
 
650
SizeRequestMode CellRenderer::get_request_mode() const
 
651
{
 
652
  return ((SizeRequestMode)(gtk_cell_renderer_get_request_mode(const_cast<GtkCellRenderer*>(gobj()))));
 
653
}
 
654
 
 
655
void CellRenderer::get_preferred_width(Widget& widget, int& minimum_width, int& natural_width) const
 
656
{
 
657
gtk_cell_renderer_get_preferred_width(const_cast<GtkCellRenderer*>(gobj()), (widget).gobj(), &(minimum_width), &(natural_width)); 
 
658
}
 
659
 
 
660
void CellRenderer::get_preferred_height_for_width(Widget& widget, int width, int& minimum_height, int& natural_height) const
 
661
{
 
662
gtk_cell_renderer_get_preferred_height_for_width(const_cast<GtkCellRenderer*>(gobj()), (widget).gobj(), width, &(minimum_height), &(natural_height)); 
 
663
}
 
664
 
 
665
void CellRenderer::get_preferred_height(Widget& widget, int& minimum_height, int& natural_height) const
 
666
{
 
667
gtk_cell_renderer_get_preferred_height(const_cast<GtkCellRenderer*>(gobj()), (widget).gobj(), &(minimum_height), &(natural_height)); 
 
668
}
 
669
 
 
670
void CellRenderer::get_preferred_width_for_height(Widget& widget, int height, int& minimum_width, int& natural_width) const
 
671
{
 
672
gtk_cell_renderer_get_preferred_width_for_height(const_cast<GtkCellRenderer*>(gobj()), (widget).gobj(), height, &(minimum_width), &(natural_width)); 
 
673
}
 
674
 
 
675
void CellRenderer::get_preferred_size(Widget& widget, Requisition& minimum_size, Requisition& natural_size) const
 
676
{
 
677
gtk_cell_renderer_get_preferred_size(const_cast<GtkCellRenderer*>(gobj()), (widget).gobj(), (GtkRequisition*)(&minimum_size), (GtkRequisition*)(&natural_size)); 
 
678
}
 
679
 
 
680
void CellRenderer::get_aligned_area(Widget& widget, CellRendererState flags, const Gdk::Rectangle& cell_area, Gdk::Rectangle& aligned_area)
 
681
{
 
682
gtk_cell_renderer_get_aligned_area(gobj(), (widget).gobj(), ((GtkCellRendererState)(flags)), (cell_area).gobj(), (aligned_area).gobj()); 
 
683
}
 
684
 
 
685
void CellRenderer::render(const Cairo::RefPtr<Cairo::Context>& cr, Widget& widget, const Gdk::Rectangle& background_area, const Gdk::Rectangle& cell_area, CellRendererState flags)
 
686
{
 
687
gtk_cell_renderer_render(gobj(), (cr)->cobj(), (widget).gobj(), (background_area).gobj(), (cell_area).gobj(), ((GtkCellRendererState)(flags))); 
 
688
}
 
689
 
 
690
bool CellRenderer::activate(GdkEvent* event, Widget& widget, const Glib::ustring& path, const Gdk::Rectangle& background_area, const Gdk::Rectangle& cell_area, CellRendererState flags)
 
691
{
 
692
  return gtk_cell_renderer_activate(gobj(), event, (widget).gobj(), path.c_str(), (background_area).gobj(), (cell_area).gobj(), ((GtkCellRendererState)(flags)));
 
693
}
 
694
 
 
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)
 
696
{
 
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));
 
698
}
 
699
 
 
700
void CellRenderer::set_fixed_size(int width, int height)
 
701
{
 
702
gtk_cell_renderer_set_fixed_size(gobj(), width, height); 
 
703
}
 
704
 
 
705
void CellRenderer::get_fixed_size(int& width, int& height) const
 
706
{
 
707
gtk_cell_renderer_get_fixed_size(const_cast<GtkCellRenderer*>(gobj()), &(width), &(height)); 
 
708
}
 
709
 
 
710
void CellRenderer::set_alignment(float align, float yalign)
 
711
{
 
712
gtk_cell_renderer_set_alignment(gobj(), align, yalign); 
 
713
}
 
714
 
 
715
void CellRenderer::get_alignment(float& xalign, float& yalign) const
 
716
{
 
717
gtk_cell_renderer_get_alignment(const_cast<GtkCellRenderer*>(gobj()), &(xalign), &(yalign)); 
 
718
}
 
719
 
 
720
void CellRenderer::set_padding(int xpad, int ypad)
 
721
{
 
722
gtk_cell_renderer_set_padding(gobj(), xpad, ypad); 
 
723
}
 
724
 
 
725
void CellRenderer::get_padding(int& xpad, int& ypad) const
 
726
{
 
727
gtk_cell_renderer_get_padding(const_cast<GtkCellRenderer*>(gobj()), &(xpad), &(ypad)); 
 
728
}
 
729
 
 
730
void CellRenderer::set_visible(bool visible)
 
731
{
 
732
gtk_cell_renderer_set_visible(gobj(), static_cast<int>(visible)); 
 
733
}
 
734
 
 
735
bool CellRenderer::get_visible() const
 
736
{
 
737
  return gtk_cell_renderer_get_visible(const_cast<GtkCellRenderer*>(gobj()));
 
738
}
 
739
 
 
740
void CellRenderer::set_sensitive(bool sensitive)
 
741
{
 
742
gtk_cell_renderer_set_sensitive(gobj(), static_cast<int>(sensitive)); 
 
743
}
 
744
 
 
745
bool CellRenderer::get_sensitive() const
 
746
{
 
747
  return gtk_cell_renderer_get_sensitive(const_cast<GtkCellRenderer*>(gobj()));
 
748
}
 
749
 
 
750
bool CellRenderer::is_activatable() const
 
751
{
 
752
  return gtk_cell_renderer_is_activatable(const_cast<GtkCellRenderer*>(gobj()));
 
753
}
 
754
 
 
755
void CellRenderer::stop_editing(bool canceled)
 
756
{
 
757
gtk_cell_renderer_stop_editing(gobj(), static_cast<int>(canceled)); 
 
758
}
 
759
 
 
760
StateFlags CellRenderer::get_state(Widget& widget, CellRendererState cell_state) const
 
761
{
 
762
  return ((StateFlags)(gtk_cell_renderer_get_state(const_cast<GtkCellRenderer*>(gobj()), (widget).gobj(), ((GtkCellRendererState)(cell_state)))));
 
763
}
 
764
 
 
765
CellRenderer::CellRenderer()
 
766
:
 
767
  // Mark this class as non-derived to allow C++ vfuncs to be skipped.
 
768
  Glib::ObjectBase(0),
 
769
  Gtk::Object(Glib::ConstructParams(cellrenderer_class_.init()))
 
770
{
 
771
  
 
772
 
 
773
}
 
774
 
 
775
 
 
776
Glib::SignalProxy0< void > CellRenderer::signal_editing_canceled()
 
777
{
 
778
  return Glib::SignalProxy0< void >(this, &CellRenderer_signal_editing_canceled_info);
 
779
}
 
780
 
 
781
 
 
782
Glib::SignalProxy2< void,CellEditable*,const Glib::ustring& > CellRenderer::signal_editing_started()
 
783
{
 
784
  return Glib::SignalProxy2< void,CellEditable*,const Glib::ustring& >(this, &CellRenderer_signal_editing_started_info);
 
785
}
 
786
 
 
787
 
 
788
#ifdef GLIBMM_PROPERTIES_ENABLED
 
789
Glib::PropertyProxy<CellRendererMode> CellRenderer::property_mode() 
 
790
{
 
791
  return Glib::PropertyProxy<CellRendererMode>(this, "mode");
 
792
}
 
793
#endif //GLIBMM_PROPERTIES_ENABLED
 
794
 
 
795
#ifdef GLIBMM_PROPERTIES_ENABLED
 
796
Glib::PropertyProxy_ReadOnly<CellRendererMode> CellRenderer::property_mode() const
 
797
{
 
798
  return Glib::PropertyProxy_ReadOnly<CellRendererMode>(this, "mode");
 
799
}
 
800
#endif //GLIBMM_PROPERTIES_ENABLED
 
801
 
 
802
#ifdef GLIBMM_PROPERTIES_ENABLED
 
803
Glib::PropertyProxy<bool> CellRenderer::property_visible() 
 
804
{
 
805
  return Glib::PropertyProxy<bool>(this, "visible");
 
806
}
 
807
#endif //GLIBMM_PROPERTIES_ENABLED
 
808
 
 
809
#ifdef GLIBMM_PROPERTIES_ENABLED
 
810
Glib::PropertyProxy_ReadOnly<bool> CellRenderer::property_visible() const
 
811
{
 
812
  return Glib::PropertyProxy_ReadOnly<bool>(this, "visible");
 
813
}
 
814
#endif //GLIBMM_PROPERTIES_ENABLED
 
815
 
 
816
#ifdef GLIBMM_PROPERTIES_ENABLED
 
817
Glib::PropertyProxy<bool> CellRenderer::property_sensitive() 
 
818
{
 
819
  return Glib::PropertyProxy<bool>(this, "sensitive");
 
820
}
 
821
#endif //GLIBMM_PROPERTIES_ENABLED
 
822
 
 
823
#ifdef GLIBMM_PROPERTIES_ENABLED
 
824
Glib::PropertyProxy_ReadOnly<bool> CellRenderer::property_sensitive() const
 
825
{
 
826
  return Glib::PropertyProxy_ReadOnly<bool>(this, "sensitive");
 
827
}
 
828
#endif //GLIBMM_PROPERTIES_ENABLED
 
829
 
 
830
#ifdef GLIBMM_PROPERTIES_ENABLED
 
831
Glib::PropertyProxy<float> CellRenderer::property_xalign() 
 
832
{
 
833
  return Glib::PropertyProxy<float>(this, "xalign");
 
834
}
 
835
#endif //GLIBMM_PROPERTIES_ENABLED
 
836
 
 
837
#ifdef GLIBMM_PROPERTIES_ENABLED
 
838
Glib::PropertyProxy_ReadOnly<float> CellRenderer::property_xalign() const
 
839
{
 
840
  return Glib::PropertyProxy_ReadOnly<float>(this, "xalign");
 
841
}
 
842
#endif //GLIBMM_PROPERTIES_ENABLED
 
843
 
 
844
#ifdef GLIBMM_PROPERTIES_ENABLED
 
845
Glib::PropertyProxy<float> CellRenderer::property_yalign() 
 
846
{
 
847
  return Glib::PropertyProxy<float>(this, "yalign");
 
848
}
 
849
#endif //GLIBMM_PROPERTIES_ENABLED
 
850
 
 
851
#ifdef GLIBMM_PROPERTIES_ENABLED
 
852
Glib::PropertyProxy_ReadOnly<float> CellRenderer::property_yalign() const
 
853
{
 
854
  return Glib::PropertyProxy_ReadOnly<float>(this, "yalign");
 
855
}
 
856
#endif //GLIBMM_PROPERTIES_ENABLED
 
857
 
 
858
#ifdef GLIBMM_PROPERTIES_ENABLED
 
859
Glib::PropertyProxy<unsigned int> CellRenderer::property_xpad() 
 
860
{
 
861
  return Glib::PropertyProxy<unsigned int>(this, "xpad");
 
862
}
 
863
#endif //GLIBMM_PROPERTIES_ENABLED
 
864
 
 
865
#ifdef GLIBMM_PROPERTIES_ENABLED
 
866
Glib::PropertyProxy_ReadOnly<unsigned int> CellRenderer::property_xpad() const
 
867
{
 
868
  return Glib::PropertyProxy_ReadOnly<unsigned int>(this, "xpad");
 
869
}
 
870
#endif //GLIBMM_PROPERTIES_ENABLED
 
871
 
 
872
#ifdef GLIBMM_PROPERTIES_ENABLED
 
873
Glib::PropertyProxy<unsigned int> CellRenderer::property_ypad() 
 
874
{
 
875
  return Glib::PropertyProxy<unsigned int>(this, "ypad");
 
876
}
 
877
#endif //GLIBMM_PROPERTIES_ENABLED
 
878
 
 
879
#ifdef GLIBMM_PROPERTIES_ENABLED
 
880
Glib::PropertyProxy_ReadOnly<unsigned int> CellRenderer::property_ypad() const
 
881
{
 
882
  return Glib::PropertyProxy_ReadOnly<unsigned int>(this, "ypad");
 
883
}
 
884
#endif //GLIBMM_PROPERTIES_ENABLED
 
885
 
 
886
#ifdef GLIBMM_PROPERTIES_ENABLED
 
887
Glib::PropertyProxy<int> CellRenderer::property_width() 
 
888
{
 
889
  return Glib::PropertyProxy<int>(this, "width");
 
890
}
 
891
#endif //GLIBMM_PROPERTIES_ENABLED
 
892
 
 
893
#ifdef GLIBMM_PROPERTIES_ENABLED
 
894
Glib::PropertyProxy_ReadOnly<int> CellRenderer::property_width() const
 
895
{
 
896
  return Glib::PropertyProxy_ReadOnly<int>(this, "width");
 
897
}
 
898
#endif //GLIBMM_PROPERTIES_ENABLED
 
899
 
 
900
#ifdef GLIBMM_PROPERTIES_ENABLED
 
901
Glib::PropertyProxy<int> CellRenderer::property_height() 
 
902
{
 
903
  return Glib::PropertyProxy<int>(this, "height");
 
904
}
 
905
#endif //GLIBMM_PROPERTIES_ENABLED
 
906
 
 
907
#ifdef GLIBMM_PROPERTIES_ENABLED
 
908
Glib::PropertyProxy_ReadOnly<int> CellRenderer::property_height() const
 
909
{
 
910
  return Glib::PropertyProxy_ReadOnly<int>(this, "height");
 
911
}
 
912
#endif //GLIBMM_PROPERTIES_ENABLED
 
913
 
 
914
#ifdef GLIBMM_PROPERTIES_ENABLED
 
915
Glib::PropertyProxy<bool> CellRenderer::property_is_expander() 
 
916
{
 
917
  return Glib::PropertyProxy<bool>(this, "is-expander");
 
918
}
 
919
#endif //GLIBMM_PROPERTIES_ENABLED
 
920
 
 
921
#ifdef GLIBMM_PROPERTIES_ENABLED
 
922
Glib::PropertyProxy_ReadOnly<bool> CellRenderer::property_is_expander() const
 
923
{
 
924
  return Glib::PropertyProxy_ReadOnly<bool>(this, "is-expander");
 
925
}
 
926
#endif //GLIBMM_PROPERTIES_ENABLED
 
927
 
 
928
#ifdef GLIBMM_PROPERTIES_ENABLED
 
929
Glib::PropertyProxy<bool> CellRenderer::property_is_expanded() 
 
930
{
 
931
  return Glib::PropertyProxy<bool>(this, "is-expanded");
 
932
}
 
933
#endif //GLIBMM_PROPERTIES_ENABLED
 
934
 
 
935
#ifdef GLIBMM_PROPERTIES_ENABLED
 
936
Glib::PropertyProxy_ReadOnly<bool> CellRenderer::property_is_expanded() const
 
937
{
 
938
  return Glib::PropertyProxy_ReadOnly<bool>(this, "is-expanded");
 
939
}
 
940
#endif //GLIBMM_PROPERTIES_ENABLED
 
941
 
 
942
#ifdef GLIBMM_PROPERTIES_ENABLED
 
943
Glib::PropertyProxy_WriteOnly<Glib::ustring> CellRenderer::property_cell_background() 
 
944
{
 
945
  return Glib::PropertyProxy_WriteOnly<Glib::ustring>(this, "cell-background");
 
946
}
 
947
#endif //GLIBMM_PROPERTIES_ENABLED
 
948
 
 
949
#ifdef GLIBMM_PROPERTIES_ENABLED
 
950
Glib::PropertyProxy<Gdk::Color> CellRenderer::property_cell_background_gdk() 
 
951
{
 
952
  return Glib::PropertyProxy<Gdk::Color>(this, "cell-background-gdk");
 
953
}
 
954
#endif //GLIBMM_PROPERTIES_ENABLED
 
955
 
 
956
#ifdef GLIBMM_PROPERTIES_ENABLED
 
957
Glib::PropertyProxy_ReadOnly<Gdk::Color> CellRenderer::property_cell_background_gdk() const
 
958
{
 
959
  return Glib::PropertyProxy_ReadOnly<Gdk::Color>(this, "cell-background-gdk");
 
960
}
 
961
#endif //GLIBMM_PROPERTIES_ENABLED
 
962
 
 
963
#ifdef GLIBMM_PROPERTIES_ENABLED
 
964
Glib::PropertyProxy<Gdk::RGBA> CellRenderer::property_cell_background_rgba() 
 
965
{
 
966
  return Glib::PropertyProxy<Gdk::RGBA>(this, "cell-background-rgba");
 
967
}
 
968
#endif //GLIBMM_PROPERTIES_ENABLED
 
969
 
 
970
#ifdef GLIBMM_PROPERTIES_ENABLED
 
971
Glib::PropertyProxy_ReadOnly<Gdk::RGBA> CellRenderer::property_cell_background_rgba() const
 
972
{
 
973
  return Glib::PropertyProxy_ReadOnly<Gdk::RGBA>(this, "cell-background-rgba");
 
974
}
 
975
#endif //GLIBMM_PROPERTIES_ENABLED
 
976
 
 
977
#ifdef GLIBMM_PROPERTIES_ENABLED
 
978
Glib::PropertyProxy<bool> CellRenderer::property_cell_background_set() 
 
979
{
 
980
  return Glib::PropertyProxy<bool>(this, "cell-background-set");
 
981
}
 
982
#endif //GLIBMM_PROPERTIES_ENABLED
 
983
 
 
984
#ifdef GLIBMM_PROPERTIES_ENABLED
 
985
Glib::PropertyProxy_ReadOnly<bool> CellRenderer::property_cell_background_set() const
 
986
{
 
987
  return Glib::PropertyProxy_ReadOnly<bool>(this, "cell-background-set");
 
988
}
 
989
#endif //GLIBMM_PROPERTIES_ENABLED
 
990
 
 
991
#ifdef GLIBMM_PROPERTIES_ENABLED
 
992
Glib::PropertyProxy_ReadOnly<bool> CellRenderer::property_editing() const
 
993
{
 
994
  return Glib::PropertyProxy_ReadOnly<bool>(this, "editing");
 
995
}
 
996
#endif //GLIBMM_PROPERTIES_ENABLED
 
997
 
 
998
 
 
999
void Gtk::CellRenderer::on_editing_canceled()
 
1000
{
 
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).
 
1003
  );
 
1004
 
 
1005
  if(base && base->editing_canceled)
 
1006
    (*base->editing_canceled)(gobj());
 
1007
}
 
1008
void Gtk::CellRenderer::on_editing_started(CellEditable* editable, const Glib::ustring& path)
 
1009
{
 
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).
 
1012
  );
 
1013
 
 
1014
  if(base && base->editing_started)
 
1015
    (*base->editing_started)(gobj(),Glib::unwrap(editable),path.c_str());
 
1016
}
 
1017
 
 
1018
SizeRequestMode Gtk::CellRenderer::get_request_mode_vfunc() const
 
1019
{
 
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).
 
1022
  );
 
1023
 
 
1024
  if(base && base->get_request_mode)
 
1025
    return ((SizeRequestMode)((*base->get_request_mode)(const_cast<GtkCellRenderer*>(gobj()))));
 
1026
 
 
1027
  typedef SizeRequestMode RType;
 
1028
  return RType();
 
1029
}
 
1030
void Gtk::CellRenderer::get_preferred_width_vfunc(Widget& widget, int& minimum_width, int& natural_width) const
 
1031
{
 
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).
 
1034
  );
 
1035
 
 
1036
  if(base && base->get_preferred_width)
 
1037
    (*base->get_preferred_width)(const_cast<GtkCellRenderer*>(gobj()),(widget).gobj(),&(minimum_width),&(natural_width));
 
1038
}
 
1039
void Gtk::CellRenderer::get_preferred_height_for_width_vfunc(Widget& widget, int width, int& minimum_height, int& natural_height) const
 
1040
{
 
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).
 
1043
  );
 
1044
 
 
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));
 
1047
}
 
1048
void Gtk::CellRenderer::get_preferred_height_vfunc(Widget& widget, int& minimum_height, int& natural_height) const
 
1049
{
 
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).
 
1052
  );
 
1053
 
 
1054
  if(base && base->get_preferred_height)
 
1055
    (*base->get_preferred_height)(const_cast<GtkCellRenderer*>(gobj()),(widget).gobj(),&(minimum_height),&(natural_height));
 
1056
}
 
1057
void Gtk::CellRenderer::get_preferred_width_for_height_vfunc(Widget& widget, int height, int& minimum_width, int& natural_width) const
 
1058
{
 
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).
 
1061
  );
 
1062
 
 
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));
 
1065
}
 
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) 
 
1067
{
 
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).
 
1070
  );
 
1071
 
 
1072
  if(base && base->render)
 
1073
    (*base->render)(gobj(),(cr)->cobj(),(widget).gobj(),(background_area).gobj(),(cell_area).gobj(),((GtkCellRendererState)(flags)));
 
1074
}
 
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) 
 
1076
{
 
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).
 
1079
  );
 
1080
 
 
1081
  if(base && base->activate)
 
1082
    return (*base->activate)(gobj(),event,(widget).gobj(),path.c_str(),(background_area).gobj(),(cell_area).gobj(),((GtkCellRendererState)(flags)));
 
1083
 
 
1084
  typedef bool RType;
 
1085
  return RType();
 
1086
}
 
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) 
 
1088
{
 
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).
 
1091
  );
 
1092
 
 
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));
 
1095
 
 
1096
  typedef CellEditable* RType;
 
1097
  return RType();
 
1098
}
 
1099
 
 
1100
 
 
1101
} // namespace Gtk
 
1102
 
 
1103