~ubuntu-branches/ubuntu/vivid/ardour/vivid-proposed

« back to all changes in this revision

Viewing changes to libs/gtkmm2/gtk/gtkmm/style.cc

  • Committer: Package Import Robot
  • Author(s): Felipe Sateler, Jaromír Mikeš, Felipe Sateler
  • Date: 2014-05-22 14:39:25 UTC
  • mfrom: (29 sid)
  • mto: This revision was merged to the branch mainline in revision 30.
  • Revision ID: package-import@ubuntu.com-20140522143925-vwqfo9287pmkrroe
Tags: 1:2.8.16+git20131003-3
* Team upload

[ Jaromír Mikeš ]
* Add -dbg package

[ Felipe Sateler ]
* Upload to experimental

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Generated by gtkmmproc -- DO NOT MODIFY!
 
2
 
 
3
#include <gtkmm/style.h>
 
4
#include <gtkmm/private/style_p.h>
 
5
 
 
6
// -*- c++ -*-
 
7
/* $Id$ */
 
8
 
 
9
/* Copyright 1998-2002 The gtkmm Development Team
 
10
 *
 
11
 * This library is free software; you can redistribute it and/or
 
12
 * modify it under the terms of the GNU Library General Public
 
13
 * License as published by the Free Software Foundation; either
 
14
 * version 2 of the License, or (at your option) any later version.
 
15
 *
 
16
 * This library is distributed in the hope that it will be useful,
 
17
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
18
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
19
 * Library General Public License for more details.
 
20
 *
 
21
 * You should have received a copy of the GNU Library General Public
 
22
 * License along with this library; if not, write to the Free
 
23
 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
24
 */
 
25
 
 
26
#include <gtkmm/widget.h>
 
27
#include <gtkmm/rc.h>
 
28
#include <gtk/gtkstyle.h>
 
29
 
 
30
 
 
31
namespace Gtk
 
32
{
 
33
 
 
34
/* 
 
35
Design notes:
 
36
 
 
37
Okay these are my notes on how a GtkStyle works.
 
38
They are not meant to be taken as documentation as I didn't
 
39
write the code.  
 
40
 
 
41
styles keeps a copy of itself for each color depth.  Thus
 
42
changing a style after it has been attached wont work!
 
43
 
 
44
At allocation time a Gtk Style has 
 
45
  - all GC set to 0 as they will be allocated later
 
46
  - has all color values set to default values.
 
47
  - a ref count of 1 and an attach count of 0 (floating?)
 
48
  - a properly referenced font.
 
49
  - colormap and depth are invalid.
 
50
  - The style list and rcstyle are 0. (??? styles wasn't set explicitly!)
 
51
 
 
52
It returns to this state if the style is detatched from
 
53
all widgets.
 
54
 
 
55
Attach acts to sink the object removing it from the floating state.
 
56
 
 
57
attaching a style for the first time initializes it. 
 
58
Initializing a style
 
59
  - sets the colormap and depth.
 
60
  - sets the mid colors. (thus allowing user to set these would be pointless)
 
61
  - gets black and white from the colormap.
 
62
  - allocates all the colors.
 
63
  - uses gtk_gc_get to share a gc if there is a matching one.
 
64
 
 
65
Conclusions, we need to rework the concept of Gdk to allow
 
66
for const objects.  
 
67
 
 
68
*/
 
69
 
 
70
void Style::set_font(const Pango::FontDescription& font_desc)
 
71
{
 
72
  g_return_if_fail(font_desc.gobj() != 0);
 
73
 
 
74
  // It will be freed when it goes out of scope.
 
75
  const Pango::FontDescription fontBefore (gobj()->font_desc, false);
 
76
 
 
77
  gobj()->font_desc = font_desc.gobj_copy();
 
78
}
 
79
 
 
80
Pango::FontDescription Style::get_font() const
 
81
{
 
82
  // Direct struct access seems the only way.
 
83
  return Pango::FontDescription(gobj()->font_desc, true); // true = make a copy.
 
84
}
 
85
 
 
86
Glib::RefPtr<Gdk::GC> Style::get_fg_gc(StateType state_type)
 
87
{
 
88
  return Glib::wrap(gobj()->fg_gc[state_type], true);
 
89
}
 
90
 
 
91
Glib::RefPtr<const Gdk::GC> Style::get_fg_gc(StateType state_type) const
 
92
{
 
93
  return Glib::wrap(gobj()->fg_gc[state_type], true);
 
94
}
 
95
 
 
96
Glib::RefPtr<Gdk::GC> Style::get_bg_gc(StateType state_type)
 
97
{
 
98
  return Glib::wrap(gobj()->bg_gc[state_type], true);
 
99
}
 
100
 
 
101
Glib::RefPtr<const Gdk::GC> Style::get_bg_gc(StateType state_type) const
 
102
{
 
103
  return Glib::wrap(gobj()->bg_gc[state_type], true);
 
104
}
 
105
 
 
106
Glib::RefPtr<Gdk::GC> Style::get_light_gc(StateType state_type)
 
107
{
 
108
  return Glib::wrap(gobj()->light_gc[state_type], true);
 
109
}
 
110
 
 
111
Glib::RefPtr<const Gdk::GC> Style::get_light_gc(StateType state_type) const
 
112
{
 
113
  return Glib::wrap(gobj()->light_gc[state_type], true);
 
114
}
 
115
 
 
116
Glib::RefPtr<Gdk::GC> Style::get_dark_gc(StateType state_type)
 
117
{
 
118
  return Glib::wrap(gobj()->dark_gc[state_type], true);
 
119
}
 
120
 
 
121
Glib::RefPtr<const Gdk::GC> Style::get_dark_gc(StateType state_type) const
 
122
{
 
123
  return Glib::wrap(gobj()->dark_gc[state_type], true);
 
124
}
 
125
 
 
126
Glib::RefPtr<Gdk::GC> Style::get_mid_gc(StateType state_type)
 
127
{
 
128
  return Glib::wrap(gobj()->mid_gc[state_type], true);
 
129
}
 
130
 
 
131
Glib::RefPtr<const Gdk::GC> Style::get_mid_gc(StateType state_type) const
 
132
{
 
133
  return Glib::wrap(gobj()->mid_gc[state_type], true);
 
134
}
 
135
 
 
136
Glib::RefPtr<Gdk::GC> Style::get_text_gc(StateType state_type)
 
137
{
 
138
  return Glib::wrap(gobj()->text_gc[state_type], true);
 
139
}
 
140
 
 
141
Glib::RefPtr<const Gdk::GC> Style::get_text_gc(StateType state_type) const
 
142
{
 
143
  return Glib::wrap(gobj()->text_gc[state_type], true);
 
144
}
 
145
 
 
146
Glib::RefPtr<Gdk::GC> Style::get_base_gc(StateType state_type)
 
147
{
 
148
  return Glib::wrap(gobj()->base_gc[state_type], true);
 
149
}
 
150
 
 
151
Glib::RefPtr<const Gdk::GC> Style::get_base_gc(StateType state_type) const
 
152
{
 
153
  return Glib::wrap(gobj()->base_gc[state_type], true);
 
154
}
 
155
 
 
156
Gdk::Color Style::get_background(StateType state_type) const
 
157
{
 
158
  GdkColor* pGdkColor = const_cast<GdkColor*>(&(gobj()->bg[state_type]));
 
159
  return Glib::wrap(pGdkColor, true); //true = take_copy.
 
160
}
 
161
 
 
162
Glib::RefPtr<Gdk::Pixmap> Style::get_background_pixmap(StateType state_type)
 
163
{
 
164
  return Glib::wrap((GdkPixmapObject*) (gobj()->bg_pixmap[state_type]), true); //true = take_copy.
 
165
}
 
166
 
 
167
void Style::set_bg_pixmap(StateType state_type, const Glib::RefPtr<Gdk::Pixmap>& pixmap)
 
168
{
 
169
  GdkPixmap *const old_pixmap = gobj()->bg_pixmap[state_type];
 
170
  gobj()->bg_pixmap[state_type] = Glib::unwrap_copy(pixmap);
 
171
 
 
172
  if(old_pixmap)
 
173
    g_object_unref(old_pixmap);
 
174
}
 
175
 
 
176
Glib::RefPtr<Gdk::Pixmap> Style::get_bg_pixmap(StateType state_type)
 
177
{
 
178
  return Glib::wrap((GdkPixmapObject*) (gobj()->bg_pixmap[state_type]), true); // true = take_copy
 
179
}
 
180
 
 
181
Glib::RefPtr<const Gdk::Pixmap> Style::get_bg_pixmap(StateType state_type) const
 
182
{
 
183
  return Glib::wrap((GdkPixmapObject*) (gobj()->bg_pixmap[state_type]), true); // true = take_copy
 
184
}
 
185
 
 
186
void Style::set_xthickness(int xthickness)
 
187
{
 
188
  gobj()->xthickness = xthickness;
 
189
}
 
190
 
 
191
void Style::set_ythickness(int ythickness)
 
192
{
 
193
  gobj()->ythickness = ythickness;
 
194
}
 
195
 
 
196
void Style::paint_polygon(const Glib::RefPtr<Gdk::Window>&      window,
 
197
                          StateType                             state_type,
 
198
                          ShadowType                            shadow_type,
 
199
                          const Gdk::Rectangle&                 area,
 
200
                          Widget&                               widget,
 
201
                          const Glib::ustring&                  detail,
 
202
                          const Glib::ArrayHandle<Gdk::Point>&  points,
 
203
                          bool                                  fill) const
 
204
{
 
205
  gtk_paint_polygon(
 
206
      const_cast<GtkStyle*>(gobj()),
 
207
      Glib::unwrap(window),
 
208
      (GtkStateType) state_type,
 
209
      (GtkShadowType) shadow_type,
 
210
      const_cast<GdkRectangle*>(area.gobj()),
 
211
      widget.gobj(),
 
212
      detail.c_str(),
 
213
      reinterpret_cast<GdkPoint*>(const_cast<Gdk::Point*>(points.data())),
 
214
      points.size(),
 
215
      fill);
 
216
}
 
217
 
 
218
} // namespace Gtk
 
219
 
 
220
 
 
221
namespace
 
222
{
 
223
 
 
224
const Glib::SignalProxyInfo Style_signal_realize_info =
 
225
{
 
226
  "realize",
 
227
  (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
 
228
  (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
 
229
};
 
230
 
 
231
 
 
232
const Glib::SignalProxyInfo Style_signal_unrealize_info =
 
233
{
 
234
  "unrealize",
 
235
  (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
 
236
  (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
 
237
};
 
238
 
 
239
} // anonymous namespace
 
240
 
 
241
 
 
242
namespace Glib
 
243
{
 
244
 
 
245
Glib::RefPtr<Gtk::Style> wrap(GtkStyle* object, bool take_copy)
 
246
{
 
247
  return Glib::RefPtr<Gtk::Style>( dynamic_cast<Gtk::Style*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
 
248
  //We use dynamic_cast<> in case of multiple inheritance.
 
249
}
 
250
 
 
251
} /* namespace Glib */
 
252
 
 
253
 
 
254
namespace Gtk
 
255
{
 
256
 
 
257
 
 
258
/* The *_Class implementation: */
 
259
 
 
260
const Glib::Class& Style_Class::init()
 
261
{
 
262
  if(!gtype_) // create the GType if necessary
 
263
  {
 
264
    // Glib::Class has to know the class init function to clone custom types.
 
265
    class_init_func_ = &Style_Class::class_init_function;
 
266
 
 
267
    // This is actually just optimized away, apparently with no harm.
 
268
    // Make sure that the parent type has been created.
 
269
    //CppClassParent::CppObjectType::get_type();
 
270
 
 
271
    // Create the wrapper type, with the same class/instance size as the base type.
 
272
    register_derived_type(gtk_style_get_type());
 
273
 
 
274
    // Add derived versions of interfaces, if the C type implements any interfaces:
 
275
  }
 
276
 
 
277
  return *this;
 
278
}
 
279
 
 
280
void Style_Class::class_init_function(void* g_class, void* class_data)
 
281
{
 
282
  BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
 
283
  CppClassParent::class_init_function(klass, class_data);
 
284
 
 
285
  klass->realize = &realize_vfunc_callback;
 
286
  klass->unrealize = &unrealize_vfunc_callback;
 
287
  klass->copy = &copy_vfunc_callback;
 
288
  klass->clone = &clone_vfunc_callback;
 
289
  klass->init_from_rc = &init_from_rc_vfunc_callback;
 
290
  klass->set_background = &set_background_vfunc_callback;
 
291
  klass->render_icon = &render_icon_vfunc_callback;
 
292
  klass->draw_hline = &draw_hline_vfunc_callback;
 
293
  klass->draw_vline = &draw_vline_vfunc_callback;
 
294
  klass->draw_shadow = &draw_shadow_vfunc_callback;
 
295
  klass->draw_polygon = &draw_polygon_vfunc_callback;
 
296
  klass->draw_arrow = &draw_arrow_vfunc_callback;
 
297
  klass->draw_diamond = &draw_diamond_vfunc_callback;
 
298
  klass->draw_string = &draw_string_vfunc_callback;
 
299
  klass->draw_box = &draw_box_vfunc_callback;
 
300
  klass->draw_flat_box = &draw_flat_box_vfunc_callback;
 
301
  klass->draw_check = &draw_check_vfunc_callback;
 
302
  klass->draw_option = &draw_option_vfunc_callback;
 
303
  klass->draw_tab = &draw_tab_vfunc_callback;
 
304
  klass->draw_shadow_gap = &draw_shadow_gap_vfunc_callback;
 
305
  klass->draw_box_gap = &draw_box_gap_vfunc_callback;
 
306
  klass->draw_extension = &draw_extension_vfunc_callback;
 
307
  klass->draw_focus = &draw_focus_vfunc_callback;
 
308
  klass->draw_slider = &draw_slider_vfunc_callback;
 
309
  klass->draw_handle = &draw_handle_vfunc_callback;
 
310
  klass->draw_expander = &draw_expander_vfunc_callback;
 
311
  klass->draw_layout = &draw_layout_vfunc_callback;
 
312
  klass->draw_resize_grip = &draw_resize_grip_vfunc_callback;
 
313
  klass->realize = &realize_callback;
 
314
  klass->unrealize = &unrealize_callback;
 
315
}
 
316
 
 
317
void Style_Class::realize_vfunc_callback(GtkStyle* self)
 
318
{
 
319
  CppObjectType *const obj = dynamic_cast<CppObjectType*>(
 
320
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));
 
321
 
 
322
  // Non-gtkmmproc-generated custom classes implicitly call the default
 
323
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
 
324
  // generated classes can use this optimisation, which avoids the unnecessary
 
325
  // parameter conversions if there is no possibility of the virtual function
 
326
  // being overridden:
 
327
  if(obj && obj->is_derived_())
 
328
  {
 
329
    try // Trap C++ exceptions which would normally be lost because this is a C callback.
 
330
    {
 
331
      // Call the virtual member method, which derived classes might override.
 
332
      obj->realize_vfunc();
 
333
    }
 
334
    catch(...)
 
335
    {
 
336
      Glib::exception_handlers_invoke();
 
337
    }
 
338
  }
 
339
  else
 
340
  {
 
341
    BaseClassType *const base = static_cast<BaseClassType*>(
 
342
        g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
 
343
    );
 
344
 
 
345
    // Call the original underlying C function:
 
346
    if(base && base->realize)
 
347
      (*base->realize)(self);
 
348
  }
 
349
}
 
350
 
 
351
void Style_Class::unrealize_vfunc_callback(GtkStyle* self)
 
352
{
 
353
  CppObjectType *const obj = dynamic_cast<CppObjectType*>(
 
354
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));
 
355
 
 
356
  // Non-gtkmmproc-generated custom classes implicitly call the default
 
357
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
 
358
  // generated classes can use this optimisation, which avoids the unnecessary
 
359
  // parameter conversions if there is no possibility of the virtual function
 
360
  // being overridden:
 
361
  if(obj && obj->is_derived_())
 
362
  {
 
363
    try // Trap C++ exceptions which would normally be lost because this is a C callback.
 
364
    {
 
365
      // Call the virtual member method, which derived classes might override.
 
366
      obj->unrealize_vfunc();
 
367
    }
 
368
    catch(...)
 
369
    {
 
370
      Glib::exception_handlers_invoke();
 
371
    }
 
372
  }
 
373
  else
 
374
  {
 
375
    BaseClassType *const base = static_cast<BaseClassType*>(
 
376
        g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
 
377
    );
 
378
 
 
379
    // Call the original underlying C function:
 
380
    if(base && base->unrealize)
 
381
      (*base->unrealize)(self);
 
382
  }
 
383
}
 
384
 
 
385
void Style_Class::copy_vfunc_callback(GtkStyle* self, GtkStyle* src)
 
386
{
 
387
  CppObjectType *const obj = dynamic_cast<CppObjectType*>(
 
388
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));
 
389
 
 
390
  // Non-gtkmmproc-generated custom classes implicitly call the default
 
391
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
 
392
  // generated classes can use this optimisation, which avoids the unnecessary
 
393
  // parameter conversions if there is no possibility of the virtual function
 
394
  // being overridden:
 
395
  if(obj && obj->is_derived_())
 
396
  {
 
397
    try // Trap C++ exceptions which would normally be lost because this is a C callback.
 
398
    {
 
399
      // Call the virtual member method, which derived classes might override.
 
400
      obj->copy_vfunc(Glib::wrap(src, true)
 
401
);
 
402
    }
 
403
    catch(...)
 
404
    {
 
405
      Glib::exception_handlers_invoke();
 
406
    }
 
407
  }
 
408
  else
 
409
  {
 
410
    BaseClassType *const base = static_cast<BaseClassType*>(
 
411
        g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
 
412
    );
 
413
 
 
414
    // Call the original underlying C function:
 
415
    if(base && base->copy)
 
416
      (*base->copy)(self, src);
 
417
  }
 
418
}
 
419
 
 
420
GtkStyle* Style_Class::clone_vfunc_callback(GtkStyle* self)
 
421
{
 
422
  CppObjectType *const obj = dynamic_cast<CppObjectType*>(
 
423
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));
 
424
 
 
425
  // Non-gtkmmproc-generated custom classes implicitly call the default
 
426
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
 
427
  // generated classes can use this optimisation, which avoids the unnecessary
 
428
  // parameter conversions if there is no possibility of the virtual function
 
429
  // being overridden:
 
430
  if(obj && obj->is_derived_())
 
431
  {
 
432
    try // Trap C++ exceptions which would normally be lost because this is a C callback.
 
433
    {
 
434
      // Call the virtual member method, which derived classes might override.
 
435
      return Glib::unwrap(obj->clone_vfunc());
 
436
    }
 
437
    catch(...)
 
438
    {
 
439
      Glib::exception_handlers_invoke();
 
440
    }
 
441
  }
 
442
  else
 
443
  {
 
444
    BaseClassType *const base = static_cast<BaseClassType*>(
 
445
        g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
 
446
    );
 
447
 
 
448
    // Call the original underlying C function:
 
449
    if(base && base->clone)
 
450
      return (*base->clone)(self);
 
451
  }
 
452
 
 
453
  typedef GtkStyle* RType;
 
454
  return RType();
 
455
}
 
456
 
 
457
void Style_Class::init_from_rc_vfunc_callback(GtkStyle* self, GtkRcStyle* rc_style)
 
458
{
 
459
  CppObjectType *const obj = dynamic_cast<CppObjectType*>(
 
460
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));
 
461
 
 
462
  // Non-gtkmmproc-generated custom classes implicitly call the default
 
463
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
 
464
  // generated classes can use this optimisation, which avoids the unnecessary
 
465
  // parameter conversions if there is no possibility of the virtual function
 
466
  // being overridden:
 
467
  if(obj && obj->is_derived_())
 
468
  {
 
469
    try // Trap C++ exceptions which would normally be lost because this is a C callback.
 
470
    {
 
471
      // Call the virtual member method, which derived classes might override.
 
472
      obj->init_from_rc_vfunc(Glib::wrap(rc_style)
 
473
);
 
474
    }
 
475
    catch(...)
 
476
    {
 
477
      Glib::exception_handlers_invoke();
 
478
    }
 
479
  }
 
480
  else
 
481
  {
 
482
    BaseClassType *const base = static_cast<BaseClassType*>(
 
483
        g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
 
484
    );
 
485
 
 
486
    // Call the original underlying C function:
 
487
    if(base && base->init_from_rc)
 
488
      (*base->init_from_rc)(self, rc_style);
 
489
  }
 
490
}
 
491
 
 
492
void Style_Class::set_background_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type)
 
493
{
 
494
  CppObjectType *const obj = dynamic_cast<CppObjectType*>(
 
495
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));
 
496
 
 
497
  // Non-gtkmmproc-generated custom classes implicitly call the default
 
498
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
 
499
  // generated classes can use this optimisation, which avoids the unnecessary
 
500
  // parameter conversions if there is no possibility of the virtual function
 
501
  // being overridden:
 
502
  if(obj && obj->is_derived_())
 
503
  {
 
504
    try // Trap C++ exceptions which would normally be lost because this is a C callback.
 
505
    {
 
506
      // Call the virtual member method, which derived classes might override.
 
507
      obj->set_background_vfunc(Glib::wrap((GdkWindowObject*)(window), true)
 
508
, ((Gtk::StateType)(state_type))
 
509
);
 
510
    }
 
511
    catch(...)
 
512
    {
 
513
      Glib::exception_handlers_invoke();
 
514
    }
 
515
  }
 
516
  else
 
517
  {
 
518
    BaseClassType *const base = static_cast<BaseClassType*>(
 
519
        g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
 
520
    );
 
521
 
 
522
    // Call the original underlying C function:
 
523
    if(base && base->set_background)
 
524
      (*base->set_background)(self, window, state_type);
 
525
  }
 
526
}
 
527
 
 
528
GdkPixbuf* Style_Class::render_icon_vfunc_callback(GtkStyle* self, const GtkIconSource* source, GtkTextDirection direction, GtkStateType state, GtkIconSize size, GtkWidget* widget, const gchar* detail)
 
529
{
 
530
  CppObjectType *const obj = dynamic_cast<CppObjectType*>(
 
531
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));
 
532
 
 
533
  // Non-gtkmmproc-generated custom classes implicitly call the default
 
534
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
 
535
  // generated classes can use this optimisation, which avoids the unnecessary
 
536
  // parameter conversions if there is no possibility of the virtual function
 
537
  // being overridden:
 
538
  if(obj && obj->is_derived_())
 
539
  {
 
540
    try // Trap C++ exceptions which would normally be lost because this is a C callback.
 
541
    {
 
542
      // Call the virtual member method, which derived classes might override.
 
543
      return Glib::unwrap(obj->render_icon_vfunc(Glib::wrap(const_cast<GtkIconSource*>(source), true)
 
544
, ((TextDirection)(direction))
 
545
, ((Gtk::StateType)(state))
 
546
, IconSize(static_cast<int>(size))
 
547
, Glib::wrap(widget)
 
548
, Glib::convert_const_gchar_ptr_to_ustring(detail)
 
549
));
 
550
    }
 
551
    catch(...)
 
552
    {
 
553
      Glib::exception_handlers_invoke();
 
554
    }
 
555
  }
 
556
  else
 
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->render_icon)
 
564
      return (*base->render_icon)(self, source, direction, state, size, widget, detail);
 
565
  }
 
566
 
 
567
  typedef GdkPixbuf* RType;
 
568
  return RType();
 
569
}
 
570
 
 
571
void Style_Class::draw_hline_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type, GdkRectangle* area, GtkWidget* widget, const gchar* detail, gint x1, gint x2, gint y)
 
572
{
 
573
  CppObjectType *const obj = dynamic_cast<CppObjectType*>(
 
574
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));
 
575
 
 
576
  // Non-gtkmmproc-generated custom classes implicitly call the default
 
577
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
 
578
  // generated classes can use this optimisation, which avoids the unnecessary
 
579
  // parameter conversions if there is no possibility of the virtual function
 
580
  // being overridden:
 
581
  if(obj && obj->is_derived_())
 
582
  {
 
583
    try // Trap C++ exceptions which would normally be lost because this is a C callback.
 
584
    {
 
585
      // Call the virtual member method, which derived classes might override.
 
586
      obj->draw_hline_vfunc(Glib::wrap((GdkWindowObject*)(window), true)
 
587
, ((Gtk::StateType)(state_type))
 
588
, Glib::wrap(area)
 
589
, Glib::wrap(widget)
 
590
, Glib::convert_const_gchar_ptr_to_ustring(detail)
 
591
, x1
 
592
, x2
 
593
, y
 
594
);
 
595
    }
 
596
    catch(...)
 
597
    {
 
598
      Glib::exception_handlers_invoke();
 
599
    }
 
600
  }
 
601
  else
 
602
  {
 
603
    BaseClassType *const base = static_cast<BaseClassType*>(
 
604
        g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
 
605
    );
 
606
 
 
607
    // Call the original underlying C function:
 
608
    if(base && base->draw_hline)
 
609
      (*base->draw_hline)(self, window, state_type, area, widget, detail, x1, x2, y);
 
610
  }
 
611
}
 
612
 
 
613
void Style_Class::draw_vline_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type, GdkRectangle* area, GtkWidget* widget, const gchar* detail, gint y1, gint y2, gint x)
 
614
{
 
615
  CppObjectType *const obj = dynamic_cast<CppObjectType*>(
 
616
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));
 
617
 
 
618
  // Non-gtkmmproc-generated custom classes implicitly call the default
 
619
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
 
620
  // generated classes can use this optimisation, which avoids the unnecessary
 
621
  // parameter conversions if there is no possibility of the virtual function
 
622
  // being overridden:
 
623
  if(obj && obj->is_derived_())
 
624
  {
 
625
    try // Trap C++ exceptions which would normally be lost because this is a C callback.
 
626
    {
 
627
      // Call the virtual member method, which derived classes might override.
 
628
      obj->draw_vline_vfunc(Glib::wrap((GdkWindowObject*)(window), true)
 
629
, ((Gtk::StateType)(state_type))
 
630
, Glib::wrap(area)
 
631
, Glib::wrap(widget)
 
632
, Glib::convert_const_gchar_ptr_to_ustring(detail)
 
633
, y1
 
634
, y2
 
635
, x
 
636
);
 
637
    }
 
638
    catch(...)
 
639
    {
 
640
      Glib::exception_handlers_invoke();
 
641
    }
 
642
  }
 
643
  else
 
644
  {
 
645
    BaseClassType *const base = static_cast<BaseClassType*>(
 
646
        g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
 
647
    );
 
648
 
 
649
    // Call the original underlying C function:
 
650
    if(base && base->draw_vline)
 
651
      (*base->draw_vline)(self, window, state_type, area, widget, detail, y1, y2, x);
 
652
  }
 
653
}
 
654
 
 
655
void Style_Class::draw_shadow_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type, GtkShadowType shadow_type, GdkRectangle* area, GtkWidget* widget, const gchar* detail, gint x, gint y, gint width, gint height)
 
656
{
 
657
  CppObjectType *const obj = dynamic_cast<CppObjectType*>(
 
658
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));
 
659
 
 
660
  // Non-gtkmmproc-generated custom classes implicitly call the default
 
661
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
 
662
  // generated classes can use this optimisation, which avoids the unnecessary
 
663
  // parameter conversions if there is no possibility of the virtual function
 
664
  // being overridden:
 
665
  if(obj && obj->is_derived_())
 
666
  {
 
667
    try // Trap C++ exceptions which would normally be lost because this is a C callback.
 
668
    {
 
669
      // Call the virtual member method, which derived classes might override.
 
670
      obj->draw_shadow_vfunc(Glib::wrap((GdkWindowObject*)(window), true)
 
671
, ((Gtk::StateType)(state_type))
 
672
, ((ShadowType)(shadow_type))
 
673
, Glib::wrap(area)
 
674
, Glib::wrap(widget)
 
675
, Glib::convert_const_gchar_ptr_to_ustring(detail)
 
676
, x
 
677
, y
 
678
, width
 
679
, height
 
680
);
 
681
    }
 
682
    catch(...)
 
683
    {
 
684
      Glib::exception_handlers_invoke();
 
685
    }
 
686
  }
 
687
  else
 
688
  {
 
689
    BaseClassType *const base = static_cast<BaseClassType*>(
 
690
        g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
 
691
    );
 
692
 
 
693
    // Call the original underlying C function:
 
694
    if(base && base->draw_shadow)
 
695
      (*base->draw_shadow)(self, window, state_type, shadow_type, area, widget, detail, x, y, width, height);
 
696
  }
 
697
}
 
698
 
 
699
void Style_Class::draw_polygon_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type, GtkShadowType shadow_type, GdkRectangle* area, GtkWidget* widget, const gchar* detail, GdkPoint* point, gint npoints, gboolean fill)
 
700
{
 
701
  CppObjectType *const obj = dynamic_cast<CppObjectType*>(
 
702
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));
 
703
 
 
704
  // Non-gtkmmproc-generated custom classes implicitly call the default
 
705
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
 
706
  // generated classes can use this optimisation, which avoids the unnecessary
 
707
  // parameter conversions if there is no possibility of the virtual function
 
708
  // being overridden:
 
709
  if(obj && obj->is_derived_())
 
710
  {
 
711
    try // Trap C++ exceptions which would normally be lost because this is a C callback.
 
712
    {
 
713
      // Call the virtual member method, which derived classes might override.
 
714
      obj->draw_polygon_vfunc(Glib::wrap((GdkWindowObject*)(window), true)
 
715
, ((Gtk::StateType)(state_type))
 
716
, ((ShadowType)(shadow_type))
 
717
, Glib::wrap(area)
 
718
, Glib::wrap(widget)
 
719
, Glib::convert_const_gchar_ptr_to_ustring(detail)
 
720
, point, npoints
 
721
, fill
 
722
);
 
723
    }
 
724
    catch(...)
 
725
    {
 
726
      Glib::exception_handlers_invoke();
 
727
    }
 
728
  }
 
729
  else
 
730
  {
 
731
    BaseClassType *const base = static_cast<BaseClassType*>(
 
732
        g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
 
733
    );
 
734
 
 
735
    // Call the original underlying C function:
 
736
    if(base && base->draw_polygon)
 
737
      (*base->draw_polygon)(self, window, state_type, shadow_type, area, widget, detail, point, npoints, fill);
 
738
  }
 
739
}
 
740
 
 
741
void Style_Class::draw_arrow_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type, GtkShadowType shadow_type, GdkRectangle* area, GtkWidget* widget, const gchar* detail, GtkArrowType arrow_type, gboolean fill, gint x, gint y, gint width, gint height)
 
742
{
 
743
  CppObjectType *const obj = dynamic_cast<CppObjectType*>(
 
744
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));
 
745
 
 
746
  // Non-gtkmmproc-generated custom classes implicitly call the default
 
747
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
 
748
  // generated classes can use this optimisation, which avoids the unnecessary
 
749
  // parameter conversions if there is no possibility of the virtual function
 
750
  // being overridden:
 
751
  if(obj && obj->is_derived_())
 
752
  {
 
753
    try // Trap C++ exceptions which would normally be lost because this is a C callback.
 
754
    {
 
755
      // Call the virtual member method, which derived classes might override.
 
756
      obj->draw_arrow_vfunc(Glib::wrap((GdkWindowObject*)(window), true)
 
757
, ((Gtk::StateType)(state_type))
 
758
, ((ShadowType)(shadow_type))
 
759
, Glib::wrap(area)
 
760
, Glib::wrap(widget)
 
761
, Glib::convert_const_gchar_ptr_to_ustring(detail)
 
762
, ((Gtk::ArrowType)(arrow_type))
 
763
, fill
 
764
, x
 
765
, y
 
766
, width
 
767
, height
 
768
);
 
769
    }
 
770
    catch(...)
 
771
    {
 
772
      Glib::exception_handlers_invoke();
 
773
    }
 
774
  }
 
775
  else
 
776
  {
 
777
    BaseClassType *const base = static_cast<BaseClassType*>(
 
778
        g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
 
779
    );
 
780
 
 
781
    // Call the original underlying C function:
 
782
    if(base && base->draw_arrow)
 
783
      (*base->draw_arrow)(self, window, state_type, shadow_type, area, widget, detail, arrow_type, fill, x, y, width, height);
 
784
  }
 
785
}
 
786
 
 
787
void Style_Class::draw_diamond_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type, GtkShadowType shadow_type, GdkRectangle* area, GtkWidget* widget, const gchar* detail, gint x, gint y, gint width, gint height)
 
788
{
 
789
  CppObjectType *const obj = dynamic_cast<CppObjectType*>(
 
790
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));
 
791
 
 
792
  // Non-gtkmmproc-generated custom classes implicitly call the default
 
793
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
 
794
  // generated classes can use this optimisation, which avoids the unnecessary
 
795
  // parameter conversions if there is no possibility of the virtual function
 
796
  // being overridden:
 
797
  if(obj && obj->is_derived_())
 
798
  {
 
799
    try // Trap C++ exceptions which would normally be lost because this is a C callback.
 
800
    {
 
801
      // Call the virtual member method, which derived classes might override.
 
802
      obj->draw_diamond_vfunc(Glib::wrap((GdkWindowObject*)(window), true)
 
803
, ((Gtk::StateType)(state_type))
 
804
, ((ShadowType)(shadow_type))
 
805
, Glib::wrap(area)
 
806
, Glib::wrap(widget)
 
807
, Glib::convert_const_gchar_ptr_to_ustring(detail)
 
808
, x
 
809
, y
 
810
, width
 
811
, height
 
812
);
 
813
    }
 
814
    catch(...)
 
815
    {
 
816
      Glib::exception_handlers_invoke();
 
817
    }
 
818
  }
 
819
  else
 
820
  {
 
821
    BaseClassType *const base = static_cast<BaseClassType*>(
 
822
        g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
 
823
    );
 
824
 
 
825
    // Call the original underlying C function:
 
826
    if(base && base->draw_diamond)
 
827
      (*base->draw_diamond)(self, window, state_type, shadow_type, area, widget, detail, x, y, width, height);
 
828
  }
 
829
}
 
830
 
 
831
void Style_Class::draw_string_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type, GdkRectangle* area, GtkWidget* widget, const gchar* detail, gint x, gint y, const gchar* string)
 
832
{
 
833
  CppObjectType *const obj = dynamic_cast<CppObjectType*>(
 
834
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));
 
835
 
 
836
  // Non-gtkmmproc-generated custom classes implicitly call the default
 
837
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
 
838
  // generated classes can use this optimisation, which avoids the unnecessary
 
839
  // parameter conversions if there is no possibility of the virtual function
 
840
  // being overridden:
 
841
  if(obj && obj->is_derived_())
 
842
  {
 
843
    try // Trap C++ exceptions which would normally be lost because this is a C callback.
 
844
    {
 
845
      // Call the virtual member method, which derived classes might override.
 
846
      obj->draw_string_vfunc(Glib::wrap((GdkWindowObject*)(window), true)
 
847
, ((Gtk::StateType)(state_type))
 
848
, Glib::wrap(area)
 
849
, Glib::wrap(widget)
 
850
, Glib::convert_const_gchar_ptr_to_ustring(detail)
 
851
, x
 
852
, y
 
853
, Glib::convert_const_gchar_ptr_to_ustring(string)
 
854
);
 
855
    }
 
856
    catch(...)
 
857
    {
 
858
      Glib::exception_handlers_invoke();
 
859
    }
 
860
  }
 
861
  else
 
862
  {
 
863
    BaseClassType *const base = static_cast<BaseClassType*>(
 
864
        g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
 
865
    );
 
866
 
 
867
    // Call the original underlying C function:
 
868
    if(base && base->draw_string)
 
869
      (*base->draw_string)(self, window, state_type, area, widget, detail, x, y, string);
 
870
  }
 
871
}
 
872
 
 
873
void Style_Class::draw_box_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type, GtkShadowType shadow_type, GdkRectangle* area, GtkWidget* widget, const gchar* detail, gint x, gint y, gint width, gint height)
 
874
{
 
875
  CppObjectType *const obj = dynamic_cast<CppObjectType*>(
 
876
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));
 
877
 
 
878
  // Non-gtkmmproc-generated custom classes implicitly call the default
 
879
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
 
880
  // generated classes can use this optimisation, which avoids the unnecessary
 
881
  // parameter conversions if there is no possibility of the virtual function
 
882
  // being overridden:
 
883
  if(obj && obj->is_derived_())
 
884
  {
 
885
    try // Trap C++ exceptions which would normally be lost because this is a C callback.
 
886
    {
 
887
      // Call the virtual member method, which derived classes might override.
 
888
      obj->draw_box_vfunc(Glib::wrap((GdkWindowObject*)(window), true)
 
889
, ((Gtk::StateType)(state_type))
 
890
, ((ShadowType)(shadow_type))
 
891
, Glib::wrap(area)
 
892
, Glib::wrap(widget)
 
893
, Glib::convert_const_gchar_ptr_to_ustring(detail)
 
894
, x
 
895
, y
 
896
, width
 
897
, height
 
898
);
 
899
    }
 
900
    catch(...)
 
901
    {
 
902
      Glib::exception_handlers_invoke();
 
903
    }
 
904
  }
 
905
  else
 
906
  {
 
907
    BaseClassType *const base = static_cast<BaseClassType*>(
 
908
        g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
 
909
    );
 
910
 
 
911
    // Call the original underlying C function:
 
912
    if(base && base->draw_box)
 
913
      (*base->draw_box)(self, window, state_type, shadow_type, area, widget, detail, x, y, width, height);
 
914
  }
 
915
}
 
916
 
 
917
void Style_Class::draw_flat_box_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type, GtkShadowType shadow_type, GdkRectangle* area, GtkWidget* widget, const gchar* detail, gint x, gint y, gint width, gint height)
 
918
{
 
919
  CppObjectType *const obj = dynamic_cast<CppObjectType*>(
 
920
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));
 
921
 
 
922
  // Non-gtkmmproc-generated custom classes implicitly call the default
 
923
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
 
924
  // generated classes can use this optimisation, which avoids the unnecessary
 
925
  // parameter conversions if there is no possibility of the virtual function
 
926
  // being overridden:
 
927
  if(obj && obj->is_derived_())
 
928
  {
 
929
    try // Trap C++ exceptions which would normally be lost because this is a C callback.
 
930
    {
 
931
      // Call the virtual member method, which derived classes might override.
 
932
      obj->draw_flat_box_vfunc(Glib::wrap((GdkWindowObject*)(window), true)
 
933
, ((Gtk::StateType)(state_type))
 
934
, ((ShadowType)(shadow_type))
 
935
, Glib::wrap(area)
 
936
, Glib::wrap(widget)
 
937
, Glib::convert_const_gchar_ptr_to_ustring(detail)
 
938
, x
 
939
, y
 
940
, width
 
941
, height
 
942
);
 
943
    }
 
944
    catch(...)
 
945
    {
 
946
      Glib::exception_handlers_invoke();
 
947
    }
 
948
  }
 
949
  else
 
950
  {
 
951
    BaseClassType *const base = static_cast<BaseClassType*>(
 
952
        g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
 
953
    );
 
954
 
 
955
    // Call the original underlying C function:
 
956
    if(base && base->draw_flat_box)
 
957
      (*base->draw_flat_box)(self, window, state_type, shadow_type, area, widget, detail, x, y, width, height);
 
958
  }
 
959
}
 
960
 
 
961
void Style_Class::draw_check_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type, GtkShadowType shadow_type, GdkRectangle* area, GtkWidget* widget, const gchar* detail, gint x, gint y, gint width, gint height)
 
962
{
 
963
  CppObjectType *const obj = dynamic_cast<CppObjectType*>(
 
964
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));
 
965
 
 
966
  // Non-gtkmmproc-generated custom classes implicitly call the default
 
967
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
 
968
  // generated classes can use this optimisation, which avoids the unnecessary
 
969
  // parameter conversions if there is no possibility of the virtual function
 
970
  // being overridden:
 
971
  if(obj && obj->is_derived_())
 
972
  {
 
973
    try // Trap C++ exceptions which would normally be lost because this is a C callback.
 
974
    {
 
975
      // Call the virtual member method, which derived classes might override.
 
976
      obj->draw_check_vfunc(Glib::wrap((GdkWindowObject*)(window), true)
 
977
, ((Gtk::StateType)(state_type))
 
978
, ((ShadowType)(shadow_type))
 
979
, Glib::wrap(area)
 
980
, Glib::wrap(widget)
 
981
, Glib::convert_const_gchar_ptr_to_ustring(detail)
 
982
, x
 
983
, y
 
984
, width
 
985
, height
 
986
);
 
987
    }
 
988
    catch(...)
 
989
    {
 
990
      Glib::exception_handlers_invoke();
 
991
    }
 
992
  }
 
993
  else
 
994
  {
 
995
    BaseClassType *const base = static_cast<BaseClassType*>(
 
996
        g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
 
997
    );
 
998
 
 
999
    // Call the original underlying C function:
 
1000
    if(base && base->draw_check)
 
1001
      (*base->draw_check)(self, window, state_type, shadow_type, area, widget, detail, x, y, width, height);
 
1002
  }
 
1003
}
 
1004
 
 
1005
void Style_Class::draw_option_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type, GtkShadowType shadow_type, GdkRectangle* area, GtkWidget* widget, const gchar* detail, gint x, gint y, gint width, gint height)
 
1006
{
 
1007
  CppObjectType *const obj = dynamic_cast<CppObjectType*>(
 
1008
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));
 
1009
 
 
1010
  // Non-gtkmmproc-generated custom classes implicitly call the default
 
1011
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
 
1012
  // generated classes can use this optimisation, which avoids the unnecessary
 
1013
  // parameter conversions if there is no possibility of the virtual function
 
1014
  // being overridden:
 
1015
  if(obj && obj->is_derived_())
 
1016
  {
 
1017
    try // Trap C++ exceptions which would normally be lost because this is a C callback.
 
1018
    {
 
1019
      // Call the virtual member method, which derived classes might override.
 
1020
      obj->draw_option_vfunc(Glib::wrap((GdkWindowObject*)(window), true)
 
1021
, ((Gtk::StateType)(state_type))
 
1022
, ((ShadowType)(shadow_type))
 
1023
, Glib::wrap(area)
 
1024
, Glib::wrap(widget)
 
1025
, Glib::convert_const_gchar_ptr_to_ustring(detail)
 
1026
, x
 
1027
, y
 
1028
, width
 
1029
, height
 
1030
);
 
1031
    }
 
1032
    catch(...)
 
1033
    {
 
1034
      Glib::exception_handlers_invoke();
 
1035
    }
 
1036
  }
 
1037
  else
 
1038
  {
 
1039
    BaseClassType *const base = static_cast<BaseClassType*>(
 
1040
        g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
 
1041
    );
 
1042
 
 
1043
    // Call the original underlying C function:
 
1044
    if(base && base->draw_option)
 
1045
      (*base->draw_option)(self, window, state_type, shadow_type, area, widget, detail, x, y, width, height);
 
1046
  }
 
1047
}
 
1048
 
 
1049
void Style_Class::draw_tab_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type, GtkShadowType shadow_type, GdkRectangle* area, GtkWidget* widget, const gchar* detail, gint x, gint y, gint width, gint height)
 
1050
{
 
1051
  CppObjectType *const obj = dynamic_cast<CppObjectType*>(
 
1052
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));
 
1053
 
 
1054
  // Non-gtkmmproc-generated custom classes implicitly call the default
 
1055
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
 
1056
  // generated classes can use this optimisation, which avoids the unnecessary
 
1057
  // parameter conversions if there is no possibility of the virtual function
 
1058
  // being overridden:
 
1059
  if(obj && obj->is_derived_())
 
1060
  {
 
1061
    try // Trap C++ exceptions which would normally be lost because this is a C callback.
 
1062
    {
 
1063
      // Call the virtual member method, which derived classes might override.
 
1064
      obj->draw_tab_vfunc(Glib::wrap((GdkWindowObject*)(window), true)
 
1065
, ((Gtk::StateType)(state_type))
 
1066
, ((ShadowType)(shadow_type))
 
1067
, Glib::wrap(area)
 
1068
, Glib::wrap(widget)
 
1069
, Glib::convert_const_gchar_ptr_to_ustring(detail)
 
1070
, x
 
1071
, y
 
1072
, width
 
1073
, height
 
1074
);
 
1075
    }
 
1076
    catch(...)
 
1077
    {
 
1078
      Glib::exception_handlers_invoke();
 
1079
    }
 
1080
  }
 
1081
  else
 
1082
  {
 
1083
    BaseClassType *const base = static_cast<BaseClassType*>(
 
1084
        g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
 
1085
    );
 
1086
 
 
1087
    // Call the original underlying C function:
 
1088
    if(base && base->draw_tab)
 
1089
      (*base->draw_tab)(self, window, state_type, shadow_type, area, widget, detail, x, y, width, height);
 
1090
  }
 
1091
}
 
1092
 
 
1093
void Style_Class::draw_shadow_gap_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type, GtkShadowType shadow_type, GdkRectangle* area, GtkWidget* widget, const gchar* detail, gint x, gint y, gint width, gint height, GtkPositionType gap_side, gint gap_x, gint gap_width)
 
1094
{
 
1095
  CppObjectType *const obj = dynamic_cast<CppObjectType*>(
 
1096
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));
 
1097
 
 
1098
  // Non-gtkmmproc-generated custom classes implicitly call the default
 
1099
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
 
1100
  // generated classes can use this optimisation, which avoids the unnecessary
 
1101
  // parameter conversions if there is no possibility of the virtual function
 
1102
  // being overridden:
 
1103
  if(obj && obj->is_derived_())
 
1104
  {
 
1105
    try // Trap C++ exceptions which would normally be lost because this is a C callback.
 
1106
    {
 
1107
      // Call the virtual member method, which derived classes might override.
 
1108
      obj->draw_shadow_gap_vfunc(Glib::wrap((GdkWindowObject*)(window), true)
 
1109
, ((Gtk::StateType)(state_type))
 
1110
, ((ShadowType)(shadow_type))
 
1111
, Glib::wrap(area)
 
1112
, Glib::wrap(widget)
 
1113
, Glib::convert_const_gchar_ptr_to_ustring(detail)
 
1114
, x
 
1115
, y
 
1116
, width
 
1117
, height
 
1118
, ((Gtk::PositionType)(gap_side))
 
1119
, gap_x
 
1120
, gap_width
 
1121
);
 
1122
    }
 
1123
    catch(...)
 
1124
    {
 
1125
      Glib::exception_handlers_invoke();
 
1126
    }
 
1127
  }
 
1128
  else
 
1129
  {
 
1130
    BaseClassType *const base = static_cast<BaseClassType*>(
 
1131
        g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
 
1132
    );
 
1133
 
 
1134
    // Call the original underlying C function:
 
1135
    if(base && base->draw_shadow_gap)
 
1136
      (*base->draw_shadow_gap)(self, window, state_type, shadow_type, area, widget, detail, x, y, width, height, gap_side, gap_x, gap_width);
 
1137
  }
 
1138
}
 
1139
 
 
1140
void Style_Class::draw_box_gap_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type, GtkShadowType shadow_type, GdkRectangle* area, GtkWidget* widget, const gchar* detail, gint x, gint y, gint width, gint height, GtkPositionType gap_side, gint gap_x, gint gap_width)
 
1141
{
 
1142
  CppObjectType *const obj = dynamic_cast<CppObjectType*>(
 
1143
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));
 
1144
 
 
1145
  // Non-gtkmmproc-generated custom classes implicitly call the default
 
1146
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
 
1147
  // generated classes can use this optimisation, which avoids the unnecessary
 
1148
  // parameter conversions if there is no possibility of the virtual function
 
1149
  // being overridden:
 
1150
  if(obj && obj->is_derived_())
 
1151
  {
 
1152
    try // Trap C++ exceptions which would normally be lost because this is a C callback.
 
1153
    {
 
1154
      // Call the virtual member method, which derived classes might override.
 
1155
      obj->draw_box_gap_vfunc(Glib::wrap((GdkWindowObject*)(window), true)
 
1156
, ((Gtk::StateType)(state_type))
 
1157
, ((ShadowType)(shadow_type))
 
1158
, Glib::wrap(area)
 
1159
, Glib::wrap(widget)
 
1160
, Glib::convert_const_gchar_ptr_to_ustring(detail)
 
1161
, x
 
1162
, y
 
1163
, width
 
1164
, height
 
1165
, ((Gtk::PositionType)(gap_side))
 
1166
, gap_x
 
1167
, gap_width
 
1168
);
 
1169
    }
 
1170
    catch(...)
 
1171
    {
 
1172
      Glib::exception_handlers_invoke();
 
1173
    }
 
1174
  }
 
1175
  else
 
1176
  {
 
1177
    BaseClassType *const base = static_cast<BaseClassType*>(
 
1178
        g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
 
1179
    );
 
1180
 
 
1181
    // Call the original underlying C function:
 
1182
    if(base && base->draw_box_gap)
 
1183
      (*base->draw_box_gap)(self, window, state_type, shadow_type, area, widget, detail, x, y, width, height, gap_side, gap_x, gap_width);
 
1184
  }
 
1185
}
 
1186
 
 
1187
void Style_Class::draw_extension_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type, GtkShadowType shadow_type, GdkRectangle* area, GtkWidget* widget, const gchar* detail, gint x, gint y, gint width, gint height, GtkPositionType gap_side)
 
1188
{
 
1189
  CppObjectType *const obj = dynamic_cast<CppObjectType*>(
 
1190
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));
 
1191
 
 
1192
  // Non-gtkmmproc-generated custom classes implicitly call the default
 
1193
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
 
1194
  // generated classes can use this optimisation, which avoids the unnecessary
 
1195
  // parameter conversions if there is no possibility of the virtual function
 
1196
  // being overridden:
 
1197
  if(obj && obj->is_derived_())
 
1198
  {
 
1199
    try // Trap C++ exceptions which would normally be lost because this is a C callback.
 
1200
    {
 
1201
      // Call the virtual member method, which derived classes might override.
 
1202
      obj->draw_extension_vfunc(Glib::wrap((GdkWindowObject*)(window), true)
 
1203
, ((Gtk::StateType)(state_type))
 
1204
, ((ShadowType)(shadow_type))
 
1205
, Glib::wrap(area)
 
1206
, Glib::wrap(widget)
 
1207
, Glib::convert_const_gchar_ptr_to_ustring(detail)
 
1208
, x
 
1209
, y
 
1210
, width
 
1211
, height
 
1212
, ((PositionType)(gap_side))
 
1213
);
 
1214
    }
 
1215
    catch(...)
 
1216
    {
 
1217
      Glib::exception_handlers_invoke();
 
1218
    }
 
1219
  }
 
1220
  else
 
1221
  {
 
1222
    BaseClassType *const base = static_cast<BaseClassType*>(
 
1223
        g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
 
1224
    );
 
1225
 
 
1226
    // Call the original underlying C function:
 
1227
    if(base && base->draw_extension)
 
1228
      (*base->draw_extension)(self, window, state_type, shadow_type, area, widget, detail, x, y, width, height, gap_side);
 
1229
  }
 
1230
}
 
1231
 
 
1232
void Style_Class::draw_focus_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type, GdkRectangle* area, GtkWidget* widget, const gchar* detail, gint x, gint y, gint width, gint height)
 
1233
{
 
1234
  CppObjectType *const obj = dynamic_cast<CppObjectType*>(
 
1235
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));
 
1236
 
 
1237
  // Non-gtkmmproc-generated custom classes implicitly call the default
 
1238
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
 
1239
  // generated classes can use this optimisation, which avoids the unnecessary
 
1240
  // parameter conversions if there is no possibility of the virtual function
 
1241
  // being overridden:
 
1242
  if(obj && obj->is_derived_())
 
1243
  {
 
1244
    try // Trap C++ exceptions which would normally be lost because this is a C callback.
 
1245
    {
 
1246
      // Call the virtual member method, which derived classes might override.
 
1247
      obj->draw_focus_vfunc(Glib::wrap((GdkWindowObject*)(window), true)
 
1248
, ((Gtk::StateType)(state_type))
 
1249
, Glib::wrap(area)
 
1250
, Glib::wrap(widget)
 
1251
, Glib::convert_const_gchar_ptr_to_ustring(detail)
 
1252
, x
 
1253
, y
 
1254
, width
 
1255
, height
 
1256
);
 
1257
    }
 
1258
    catch(...)
 
1259
    {
 
1260
      Glib::exception_handlers_invoke();
 
1261
    }
 
1262
  }
 
1263
  else
 
1264
  {
 
1265
    BaseClassType *const base = static_cast<BaseClassType*>(
 
1266
        g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
 
1267
    );
 
1268
 
 
1269
    // Call the original underlying C function:
 
1270
    if(base && base->draw_focus)
 
1271
      (*base->draw_focus)(self, window, state_type, area, widget, detail, x, y, width, height);
 
1272
  }
 
1273
}
 
1274
 
 
1275
void Style_Class::draw_slider_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type, GtkShadowType shadow_type, GdkRectangle* area, GtkWidget* widget, const gchar* detail, gint x, gint y, gint width, gint height, GtkOrientation orientation)
 
1276
{
 
1277
  CppObjectType *const obj = dynamic_cast<CppObjectType*>(
 
1278
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));
 
1279
 
 
1280
  // Non-gtkmmproc-generated custom classes implicitly call the default
 
1281
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
 
1282
  // generated classes can use this optimisation, which avoids the unnecessary
 
1283
  // parameter conversions if there is no possibility of the virtual function
 
1284
  // being overridden:
 
1285
  if(obj && obj->is_derived_())
 
1286
  {
 
1287
    try // Trap C++ exceptions which would normally be lost because this is a C callback.
 
1288
    {
 
1289
      // Call the virtual member method, which derived classes might override.
 
1290
      obj->draw_slider_vfunc(Glib::wrap((GdkWindowObject*)(window), true)
 
1291
, ((Gtk::StateType)(state_type))
 
1292
, ((ShadowType)(shadow_type))
 
1293
, Glib::wrap(area)
 
1294
, Glib::wrap(widget)
 
1295
, Glib::convert_const_gchar_ptr_to_ustring(detail)
 
1296
, x
 
1297
, y
 
1298
, width
 
1299
, height
 
1300
, ((Orientation)(orientation))
 
1301
);
 
1302
    }
 
1303
    catch(...)
 
1304
    {
 
1305
      Glib::exception_handlers_invoke();
 
1306
    }
 
1307
  }
 
1308
  else
 
1309
  {
 
1310
    BaseClassType *const base = static_cast<BaseClassType*>(
 
1311
        g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
 
1312
    );
 
1313
 
 
1314
    // Call the original underlying C function:
 
1315
    if(base && base->draw_slider)
 
1316
      (*base->draw_slider)(self, window, state_type, shadow_type, area, widget, detail, x, y, width, height, orientation);
 
1317
  }
 
1318
}
 
1319
 
 
1320
void Style_Class::draw_handle_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type, GtkShadowType shadow_type, GdkRectangle* area, GtkWidget* widget, const gchar* detail, gint x, gint y, gint width, gint height, GtkOrientation orientation)
 
1321
{
 
1322
  CppObjectType *const obj = dynamic_cast<CppObjectType*>(
 
1323
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));
 
1324
 
 
1325
  // Non-gtkmmproc-generated custom classes implicitly call the default
 
1326
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
 
1327
  // generated classes can use this optimisation, which avoids the unnecessary
 
1328
  // parameter conversions if there is no possibility of the virtual function
 
1329
  // being overridden:
 
1330
  if(obj && obj->is_derived_())
 
1331
  {
 
1332
    try // Trap C++ exceptions which would normally be lost because this is a C callback.
 
1333
    {
 
1334
      // Call the virtual member method, which derived classes might override.
 
1335
      obj->draw_handle_vfunc(Glib::wrap((GdkWindowObject*)(window), true)
 
1336
, ((Gtk::StateType)(state_type))
 
1337
, ((ShadowType)(shadow_type))
 
1338
, Glib::wrap(area)
 
1339
, Glib::wrap(widget)
 
1340
, Glib::convert_const_gchar_ptr_to_ustring(detail)
 
1341
, x
 
1342
, y
 
1343
, width
 
1344
, height
 
1345
, ((Orientation)(orientation))
 
1346
);
 
1347
    }
 
1348
    catch(...)
 
1349
    {
 
1350
      Glib::exception_handlers_invoke();
 
1351
    }
 
1352
  }
 
1353
  else
 
1354
  {
 
1355
    BaseClassType *const base = static_cast<BaseClassType*>(
 
1356
        g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
 
1357
    );
 
1358
 
 
1359
    // Call the original underlying C function:
 
1360
    if(base && base->draw_handle)
 
1361
      (*base->draw_handle)(self, window, state_type, shadow_type, area, widget, detail, x, y, width, height, orientation);
 
1362
  }
 
1363
}
 
1364
 
 
1365
void Style_Class::draw_expander_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type, GdkRectangle* area, GtkWidget* widget, const gchar* detail, gint x, gint y, GtkExpanderStyle expander_style)
 
1366
{
 
1367
  CppObjectType *const obj = dynamic_cast<CppObjectType*>(
 
1368
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));
 
1369
 
 
1370
  // Non-gtkmmproc-generated custom classes implicitly call the default
 
1371
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
 
1372
  // generated classes can use this optimisation, which avoids the unnecessary
 
1373
  // parameter conversions if there is no possibility of the virtual function
 
1374
  // being overridden:
 
1375
  if(obj && obj->is_derived_())
 
1376
  {
 
1377
    try // Trap C++ exceptions which would normally be lost because this is a C callback.
 
1378
    {
 
1379
      // Call the virtual member method, which derived classes might override.
 
1380
      obj->draw_expander_vfunc(Glib::wrap((GdkWindowObject*)(window), true)
 
1381
, ((Gtk::StateType)(state_type))
 
1382
, Glib::wrap(area)
 
1383
, Glib::wrap(widget)
 
1384
, Glib::convert_const_gchar_ptr_to_ustring(detail)
 
1385
, x
 
1386
, y
 
1387
, ((ExpanderStyle)(expander_style))
 
1388
);
 
1389
    }
 
1390
    catch(...)
 
1391
    {
 
1392
      Glib::exception_handlers_invoke();
 
1393
    }
 
1394
  }
 
1395
  else
 
1396
  {
 
1397
    BaseClassType *const base = static_cast<BaseClassType*>(
 
1398
        g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
 
1399
    );
 
1400
 
 
1401
    // Call the original underlying C function:
 
1402
    if(base && base->draw_expander)
 
1403
      (*base->draw_expander)(self, window, state_type, area, widget, detail, x, y, expander_style);
 
1404
  }
 
1405
}
 
1406
 
 
1407
void Style_Class::draw_layout_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type, gboolean use_text, GdkRectangle* area, GtkWidget* widget, const gchar* detail, gint x, gint y, PangoLayout* layout)
 
1408
{
 
1409
  CppObjectType *const obj = dynamic_cast<CppObjectType*>(
 
1410
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));
 
1411
 
 
1412
  // Non-gtkmmproc-generated custom classes implicitly call the default
 
1413
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
 
1414
  // generated classes can use this optimisation, which avoids the unnecessary
 
1415
  // parameter conversions if there is no possibility of the virtual function
 
1416
  // being overridden:
 
1417
  if(obj && obj->is_derived_())
 
1418
  {
 
1419
    try // Trap C++ exceptions which would normally be lost because this is a C callback.
 
1420
    {
 
1421
      // Call the virtual member method, which derived classes might override.
 
1422
      obj->draw_layout_vfunc(Glib::wrap((GdkWindowObject*)(window), true)
 
1423
, ((Gtk::StateType)(state_type))
 
1424
, use_text
 
1425
, Glib::wrap(area)
 
1426
, Glib::wrap(widget)
 
1427
, Glib::convert_const_gchar_ptr_to_ustring(detail)
 
1428
, x
 
1429
, y
 
1430
, Glib::wrap(layout)
 
1431
);
 
1432
    }
 
1433
    catch(...)
 
1434
    {
 
1435
      Glib::exception_handlers_invoke();
 
1436
    }
 
1437
  }
 
1438
  else
 
1439
  {
 
1440
    BaseClassType *const base = static_cast<BaseClassType*>(
 
1441
        g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
 
1442
    );
 
1443
 
 
1444
    // Call the original underlying C function:
 
1445
    if(base && base->draw_layout)
 
1446
      (*base->draw_layout)(self, window, state_type, use_text, area, widget, detail, x, y, layout);
 
1447
  }
 
1448
}
 
1449
 
 
1450
void Style_Class::draw_resize_grip_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type, GdkRectangle* area, GtkWidget* widget, const gchar* detail, GdkWindowEdge edge, gint x, gint y, gint width, gint height)
 
1451
{
 
1452
  CppObjectType *const obj = dynamic_cast<CppObjectType*>(
 
1453
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));
 
1454
 
 
1455
  // Non-gtkmmproc-generated custom classes implicitly call the default
 
1456
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
 
1457
  // generated classes can use this optimisation, which avoids the unnecessary
 
1458
  // parameter conversions if there is no possibility of the virtual function
 
1459
  // being overridden:
 
1460
  if(obj && obj->is_derived_())
 
1461
  {
 
1462
    try // Trap C++ exceptions which would normally be lost because this is a C callback.
 
1463
    {
 
1464
      // Call the virtual member method, which derived classes might override.
 
1465
      obj->draw_resize_grip_vfunc(Glib::wrap((GdkWindowObject*)(window), true)
 
1466
, ((Gtk::StateType)(state_type))
 
1467
, Glib::wrap(area)
 
1468
, Glib::wrap(widget)
 
1469
, Glib::convert_const_gchar_ptr_to_ustring(detail)
 
1470
, ((Gdk::WindowEdge)(edge))
 
1471
, x
 
1472
, y
 
1473
, width
 
1474
, height
 
1475
);
 
1476
    }
 
1477
    catch(...)
 
1478
    {
 
1479
      Glib::exception_handlers_invoke();
 
1480
    }
 
1481
  }
 
1482
  else
 
1483
  {
 
1484
    BaseClassType *const base = static_cast<BaseClassType*>(
 
1485
        g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
 
1486
    );
 
1487
 
 
1488
    // Call the original underlying C function:
 
1489
    if(base && base->draw_resize_grip)
 
1490
      (*base->draw_resize_grip)(self, window, state_type, area, widget, detail, edge, x, y, width, height);
 
1491
  }
 
1492
}
 
1493
 
 
1494
 
 
1495
void Style_Class::realize_callback(GtkStyle* self)
 
1496
{
 
1497
  CppObjectType *const obj = dynamic_cast<CppObjectType*>(
 
1498
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));
 
1499
 
 
1500
  // Non-gtkmmproc-generated custom classes implicitly call the default
 
1501
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
 
1502
  // generated classes can use this optimisation, which avoids the unnecessary
 
1503
  // parameter conversions if there is no possibility of the virtual function
 
1504
  // being overridden:
 
1505
  if(obj && obj->is_derived_())
 
1506
  {
 
1507
    try // Trap C++ exceptions which would normally be lost because this is a C callback.
 
1508
    {
 
1509
      // Call the virtual member method, which derived classes might override.
 
1510
      obj->on_realize();
 
1511
    }
 
1512
    catch(...)
 
1513
    {
 
1514
      Glib::exception_handlers_invoke();
 
1515
    }
 
1516
  }
 
1517
  else
 
1518
  {
 
1519
    BaseClassType *const base = static_cast<BaseClassType*>(
 
1520
        g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
 
1521
    );
 
1522
 
 
1523
    // Call the original underlying C function:
 
1524
    if(base && base->realize)
 
1525
      (*base->realize)(self);
 
1526
  }
 
1527
}
 
1528
 
 
1529
void Style_Class::unrealize_callback(GtkStyle* self)
 
1530
{
 
1531
  CppObjectType *const obj = dynamic_cast<CppObjectType*>(
 
1532
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));
 
1533
 
 
1534
  // Non-gtkmmproc-generated custom classes implicitly call the default
 
1535
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
 
1536
  // generated classes can use this optimisation, which avoids the unnecessary
 
1537
  // parameter conversions if there is no possibility of the virtual function
 
1538
  // being overridden:
 
1539
  if(obj && obj->is_derived_())
 
1540
  {
 
1541
    try // Trap C++ exceptions which would normally be lost because this is a C callback.
 
1542
    {
 
1543
      // Call the virtual member method, which derived classes might override.
 
1544
      obj->on_unrealize();
 
1545
    }
 
1546
    catch(...)
 
1547
    {
 
1548
      Glib::exception_handlers_invoke();
 
1549
    }
 
1550
  }
 
1551
  else
 
1552
  {
 
1553
    BaseClassType *const base = static_cast<BaseClassType*>(
 
1554
        g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
 
1555
    );
 
1556
 
 
1557
    // Call the original underlying C function:
 
1558
    if(base && base->unrealize)
 
1559
      (*base->unrealize)(self);
 
1560
  }
 
1561
}
 
1562
 
 
1563
 
 
1564
Glib::ObjectBase* Style_Class::wrap_new(GObject* object)
 
1565
{
 
1566
  return new Style((GtkStyle*)object);
 
1567
}
 
1568
 
 
1569
 
 
1570
/* The implementation: */
 
1571
 
 
1572
GtkStyle* Style::gobj_copy()
 
1573
{
 
1574
  reference();
 
1575
  return gobj();
 
1576
}
 
1577
 
 
1578
Style::Style(const Glib::ConstructParams& construct_params)
 
1579
:
 
1580
  Glib::Object(construct_params)
 
1581
{}
 
1582
 
 
1583
Style::Style(GtkStyle* castitem)
 
1584
:
 
1585
  Glib::Object((GObject*)(castitem))
 
1586
{}
 
1587
 
 
1588
Style::~Style()
 
1589
{}
 
1590
 
 
1591
 
 
1592
Style::CppClassType Style::style_class_; // initialize static member
 
1593
 
 
1594
GType Style::get_type()
 
1595
{
 
1596
  return style_class_.init().get_type();
 
1597
}
 
1598
 
 
1599
GType Style::get_base_type()
 
1600
{
 
1601
  return gtk_style_get_type();
 
1602
}
 
1603
 
 
1604
 
 
1605
Style::Style()
 
1606
:
 
1607
  Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
 
1608
  Glib::Object(Glib::ConstructParams(style_class_.init()))
 
1609
{
 
1610
  }
 
1611
 
 
1612
Glib::RefPtr<Style> Style::create()
 
1613
{
 
1614
  return Glib::RefPtr<Style>( new Style() );
 
1615
}
 
1616
void Style::set_fg(StateType state, const Gdk::Color& color)
 
1617
{
 
1618
  gobj()->fg[state] = *color.gobj();
 
1619
}
 
1620
 
 
1621
Gdk::Color Style::get_fg(StateType state) const
 
1622
{
 
1623
  return Gdk::Color(const_cast<GdkColor*>(&gobj()->fg[state]), true);
 
1624
}
 
1625
 
 
1626
void Style::set_bg(StateType state, const Gdk::Color& color)
 
1627
{
 
1628
  gobj()->bg[state] = *color.gobj();
 
1629
}
 
1630
 
 
1631
Gdk::Color Style::get_bg(StateType state) const
 
1632
{
 
1633
  return Gdk::Color(const_cast<GdkColor*>(&gobj()->bg[state]), true);
 
1634
}
 
1635
 
 
1636
void Style::set_light(StateType state, const Gdk::Color& color)
 
1637
{
 
1638
  gobj()->light[state] = *color.gobj();
 
1639
}
 
1640
 
 
1641
Gdk::Color Style::get_light(StateType state) const
 
1642
{
 
1643
  return Gdk::Color(const_cast<GdkColor*>(&gobj()->light[state]), true);
 
1644
}
 
1645
 
 
1646
void Style::set_dark(StateType state, const Gdk::Color& color)
 
1647
{
 
1648
  gobj()->dark[state] = *color.gobj();
 
1649
}
 
1650
 
 
1651
Gdk::Color Style::get_dark(StateType state) const
 
1652
{
 
1653
  return Gdk::Color(const_cast<GdkColor*>(&gobj()->dark[state]), true);
 
1654
}
 
1655
 
 
1656
void Style::set_mid(StateType state, const Gdk::Color& color)
 
1657
{
 
1658
  gobj()->mid[state] = *color.gobj();
 
1659
}
 
1660
 
 
1661
Gdk::Color Style::get_mid(StateType state) const
 
1662
{
 
1663
  return Gdk::Color(const_cast<GdkColor*>(&gobj()->mid[state]), true);
 
1664
}
 
1665
 
 
1666
void Style::set_text(StateType state, const Gdk::Color& color)
 
1667
{
 
1668
  gobj()->text[state] = *color.gobj();
 
1669
}
 
1670
 
 
1671
Gdk::Color Style::get_text(StateType state) const
 
1672
{
 
1673
  return Gdk::Color(const_cast<GdkColor*>(&gobj()->text[state]), true);
 
1674
}
 
1675
 
 
1676
void Style::set_base(StateType state, const Gdk::Color& color)
 
1677
{
 
1678
  gobj()->base[state] = *color.gobj();
 
1679
}
 
1680
 
 
1681
Gdk::Color Style::get_base(StateType state) const
 
1682
{
 
1683
  return Gdk::Color(const_cast<GdkColor*>(&gobj()->base[state]), true);
 
1684
}
 
1685
 
 
1686
void Style::set_text_aa(StateType state, const Gdk::Color& color)
 
1687
{
 
1688
  gobj()->text_aa[state] = *color.gobj();
 
1689
}
 
1690
 
 
1691
Gdk::Color Style::get_text_aa(StateType state) const
 
1692
{
 
1693
  return Gdk::Color(const_cast<GdkColor*>(&gobj()->text_aa[state]), true);
 
1694
}
 
1695
 
 
1696
void Style::set_black(const Gdk::Color& value)
 
1697
{
 
1698
  gobj()->black = (*(value).gobj());
 
1699
}
 
1700
 
 
1701
Gdk::Color Style::get_black() const
 
1702
{
 
1703
  return Gdk::Color(const_cast<GdkColor*>(&(gobj()->black)), true);
 
1704
}
 
1705
 
 
1706
void Style::set_white(const Gdk::Color& value)
 
1707
{
 
1708
  gobj()->white = (*(value).gobj());
 
1709
}
 
1710
 
 
1711
Gdk::Color Style::get_white() const
 
1712
{
 
1713
  return Gdk::Color(const_cast<GdkColor*>(&(gobj()->white)), true);
 
1714
}
 
1715
 
 
1716
int Style::get_xthickness() const
 
1717
{
 
1718
  return gobj()->xthickness;
 
1719
}
 
1720
 
 
1721
int Style::get_ythickness() const
 
1722
{
 
1723
  return gobj()->ythickness;
 
1724
}
 
1725
 
 
1726
Glib::RefPtr<Gdk::GC> Style::get_black_gc()
 
1727
{
 
1728
  Glib::RefPtr<Gdk::GC> ref_ptr(Glib::wrap(gobj()->black_gc));
 
1729
 
 
1730
  if(ref_ptr)
 
1731
    ref_ptr->reference();
 
1732
 
 
1733
  return ref_ptr;
 
1734
}
 
1735
 
 
1736
Glib::RefPtr<const Gdk::GC> Style::get_black_gc() const
 
1737
{
 
1738
  Glib::RefPtr<const Gdk::GC> ref_ptr(Glib::wrap(gobj()->black_gc));
 
1739
 
 
1740
  if(ref_ptr)
 
1741
    ref_ptr->reference();
 
1742
 
 
1743
  return ref_ptr;
 
1744
}
 
1745
 
 
1746
Glib::RefPtr<Gdk::GC> Style::get_white_gc()
 
1747
{
 
1748
  Glib::RefPtr<Gdk::GC> ref_ptr(Glib::wrap(gobj()->white_gc));
 
1749
 
 
1750
  if(ref_ptr)
 
1751
    ref_ptr->reference();
 
1752
 
 
1753
  return ref_ptr;
 
1754
}
 
1755
 
 
1756
Glib::RefPtr<const Gdk::GC> Style::get_white_gc() const
 
1757
{
 
1758
  Glib::RefPtr<const Gdk::GC> ref_ptr(Glib::wrap(gobj()->white_gc));
 
1759
 
 
1760
  if(ref_ptr)
 
1761
    ref_ptr->reference();
 
1762
 
 
1763
  return ref_ptr;
 
1764
}
 
1765
 
 
1766
void Style::paint_arrow(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget& widget, const Glib::ustring& detail, ArrowType arrow_type, bool fill, int x, int y, int width, int height) const
 
1767
{
 
1768
  gtk_paint_arrow(const_cast<GtkStyle*>(gobj()), Glib::unwrap(window), ((GtkStateType)(state_type)), ((GtkShadowType)(shadow_type)), const_cast<GdkRectangle*>(area.gobj()), (widget).gobj(), detail.c_str(), ((GtkArrowType)(arrow_type)), static_cast<int>(fill), x, y, width, height);
 
1769
}
 
1770
 
 
1771
void Style::paint_box(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget& widget, const Glib::ustring& detail, int x, int y, int width, int height) const
 
1772
{
 
1773
  gtk_paint_box(const_cast<GtkStyle*>(gobj()), Glib::unwrap(window), ((GtkStateType)(state_type)), ((GtkShadowType)(shadow_type)), const_cast<GdkRectangle*>(area.gobj()), (widget).gobj(), detail.c_str(), x, y, width, height);
 
1774
}
 
1775
 
 
1776
void Style::paint_box_gap(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget& widget, const Glib::ustring& detail, int x, int y, int width, int height, PositionType gap_side, int gap_x, int gap_width) const
 
1777
{
 
1778
  gtk_paint_box_gap(const_cast<GtkStyle*>(gobj()), Glib::unwrap(window), ((GtkStateType)(state_type)), ((GtkShadowType)(shadow_type)), const_cast<GdkRectangle*>(area.gobj()), (widget).gobj(), const_cast<gchar*>(detail.c_str()), x, y, width, height, ((GtkPositionType)(gap_side)), gap_x, gap_width);
 
1779
}
 
1780
 
 
1781
void Style::paint_check(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget& widget, const Glib::ustring& detail, int x, int y, int width, int height) const
 
1782
{
 
1783
  gtk_paint_check(const_cast<GtkStyle*>(gobj()), Glib::unwrap(window), ((GtkStateType)(state_type)), ((GtkShadowType)(shadow_type)), const_cast<GdkRectangle*>(area.gobj()), (widget).gobj(), detail.c_str(), x, y, width, height);
 
1784
}
 
1785
 
 
1786
void Style::paint_diamond(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget& widget, const Glib::ustring& detail, int x, int y, int width, int height) const
 
1787
{
 
1788
  gtk_paint_diamond(const_cast<GtkStyle*>(gobj()), Glib::unwrap(window), ((GtkStateType)(state_type)), ((GtkShadowType)(shadow_type)), const_cast<GdkRectangle*>(area.gobj()), (widget).gobj(), detail.c_str(), x, y, width, height);
 
1789
}
 
1790
 
 
1791
void Style::paint_extension(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget& widget, const Glib::ustring& detail, int x, int y, int width, int height, PositionType gap_side) const
 
1792
{
 
1793
  gtk_paint_extension(const_cast<GtkStyle*>(gobj()), Glib::unwrap(window), ((GtkStateType)(state_type)), ((GtkShadowType)(shadow_type)), const_cast<GdkRectangle*>(area.gobj()), (widget).gobj(), const_cast<gchar*>(detail.c_str()), x, y, width, height, ((GtkPositionType)(gap_side)));
 
1794
}
 
1795
 
 
1796
void Style::paint_flat_box(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget& widget, const Glib::ustring& detail, int x, int y, int width, int height) const
 
1797
{
 
1798
  gtk_paint_flat_box(const_cast<GtkStyle*>(gobj()), Glib::unwrap(window), ((GtkStateType)(state_type)), ((GtkShadowType)(shadow_type)), const_cast<GdkRectangle*>(area.gobj()), (widget).gobj(), detail.c_str(), x, y, width, height);
 
1799
}
 
1800
 
 
1801
void Style::paint_focus(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, const Gdk::Rectangle& area, Widget& widget, const Glib::ustring& detail, int x, int y, int width, int height) const
 
1802
{
 
1803
  gtk_paint_focus(const_cast<GtkStyle*>(gobj()), Glib::unwrap(window), ((GtkStateType)(state_type)), const_cast<GdkRectangle*>(area.gobj()), (widget).gobj(), detail.c_str(), x, y, width, height);
 
1804
}
 
1805
 
 
1806
void Style::paint_handle(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget& widget, const Glib::ustring& detail, int x, int y, int width, int height, Orientation orientation) const
 
1807
{
 
1808
  gtk_paint_handle(const_cast<GtkStyle*>(gobj()), Glib::unwrap(window), ((GtkStateType)(state_type)), ((GtkShadowType)(shadow_type)), const_cast<GdkRectangle*>(area.gobj()), (widget).gobj(), detail.c_str(), x, y, width, height, ((GtkOrientation)(orientation)));
 
1809
}
 
1810
 
 
1811
void Style::paint_hline(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, const Gdk::Rectangle& area, Widget& widget, const Glib::ustring& detail, int x1, int x2, int y) const
 
1812
{
 
1813
  gtk_paint_hline(const_cast<GtkStyle*>(gobj()), Glib::unwrap(window), ((GtkStateType)(state_type)), const_cast<GdkRectangle*>(area.gobj()), (widget).gobj(), detail.c_str(), x1, x2, y);
 
1814
}
 
1815
 
 
1816
void Style::paint_option(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget& widget, const Glib::ustring& detail, int x, int y, int width, int height) const
 
1817
{
 
1818
  gtk_paint_option(const_cast<GtkStyle*>(gobj()), Glib::unwrap(window), ((GtkStateType)(state_type)), ((GtkShadowType)(shadow_type)), const_cast<GdkRectangle*>(area.gobj()), (widget).gobj(), detail.c_str(), x, y, width, height);
 
1819
}
 
1820
 
 
1821
void Style::paint_shadow(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget& widget, const Glib::ustring& detail, int x, int y, int width, int height) const
 
1822
{
 
1823
  gtk_paint_shadow(const_cast<GtkStyle*>(gobj()), Glib::unwrap(window), ((GtkStateType)(state_type)), ((GtkShadowType)(shadow_type)), const_cast<GdkRectangle*>(area.gobj()), (widget).gobj(), detail.c_str(), x, y, width, height);
 
1824
}
 
1825
 
 
1826
void Style::paint_shadow_gap(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget& widget, const Glib::ustring& detail, int x, int y, int width, int height, PositionType gap_side, int gap_x, int gap_width) const
 
1827
{
 
1828
  gtk_paint_shadow_gap(const_cast<GtkStyle*>(gobj()), Glib::unwrap(window), ((GtkStateType)(state_type)), ((GtkShadowType)(shadow_type)), const_cast<GdkRectangle*>(area.gobj()), (widget).gobj(), const_cast<gchar*>(detail.c_str()), x, y, width, height, ((GtkPositionType)(gap_side)), gap_x, gap_width);
 
1829
}
 
1830
 
 
1831
void Style::paint_slider(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget& widget, const Glib::ustring& detail, int x, int y, int width, int height, Orientation orientation) const
 
1832
{
 
1833
  gtk_paint_slider(const_cast<GtkStyle*>(gobj()), Glib::unwrap(window), ((GtkStateType)(state_type)), ((GtkShadowType)(shadow_type)), const_cast<GdkRectangle*>(area.gobj()), (widget).gobj(), detail.c_str(), x, y, width, height, ((GtkOrientation)(orientation)));
 
1834
}
 
1835
 
 
1836
void Style::paint_tab(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget& widget, const Glib::ustring& detail, int x, int y, int width, int height) const
 
1837
{
 
1838
  gtk_paint_tab(const_cast<GtkStyle*>(gobj()), Glib::unwrap(window), ((GtkStateType)(state_type)), ((GtkShadowType)(shadow_type)), const_cast<GdkRectangle*>(area.gobj()), (widget).gobj(), detail.c_str(), x, y, width, height);
 
1839
}
 
1840
 
 
1841
void Style::paint_vline(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, const Gdk::Rectangle& area, Widget& widget, const Glib::ustring& detail, int y1, int y2, int x) const
 
1842
{
 
1843
  gtk_paint_vline(const_cast<GtkStyle*>(gobj()), Glib::unwrap(window), ((GtkStateType)(state_type)), const_cast<GdkRectangle*>(area.gobj()), (widget).gobj(), detail.c_str(), y1, y2, x);
 
1844
}
 
1845
 
 
1846
void Style::paint_expander(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, const Gdk::Rectangle& area, Widget& widget, const Glib::ustring& detail, int x, int y, ExpanderStyle expander_style) const
 
1847
{
 
1848
  gtk_paint_expander(const_cast<GtkStyle*>(gobj()), Glib::unwrap(window), ((GtkStateType)(state_type)), const_cast<GdkRectangle*>(area.gobj()), (widget).gobj(), detail.c_str(), x, y, ((GtkExpanderStyle)(expander_style)));
 
1849
}
 
1850
 
 
1851
void Style::paint_layout(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, bool use_text, const Gdk::Rectangle& area, Widget& widget, const Glib::ustring& detail, int x, int y, const Glib::RefPtr<Pango::Layout>& layout) const
 
1852
{
 
1853
  gtk_paint_layout(const_cast<GtkStyle*>(gobj()), Glib::unwrap(window), ((GtkStateType)(state_type)), static_cast<int>(use_text), const_cast<GdkRectangle*>(area.gobj()), (widget).gobj(), detail.c_str(), x, y, Glib::unwrap(layout));
 
1854
}
 
1855
 
 
1856
void Style::paint_resize_grip(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, const Gdk::Rectangle& area, Widget& widget, const Glib::ustring& detail, Gdk::WindowEdge edge, int x, int y, int width, int height) const
 
1857
{
 
1858
  gtk_paint_resize_grip(const_cast<GtkStyle*>(gobj()), Glib::unwrap(window), ((GtkStateType)(state_type)), const_cast<GdkRectangle*>(area.gobj()), (widget).gobj(), detail.c_str(), ((GdkWindowEdge)(edge)), x, y, width, height);
 
1859
}
 
1860
 
 
1861
Glib::RefPtr<Style> Style::copy()
 
1862
{
 
1863
  return Glib::wrap(gtk_style_copy(gobj()));
 
1864
}
 
1865
 
 
1866
void Style::set_background(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type)
 
1867
{
 
1868
  gtk_style_set_background(gobj(), Glib::unwrap(window), ((GtkStateType)(state_type)));
 
1869
}
 
1870
 
 
1871
void Style::apply_default_background(const Glib::RefPtr<Gdk::Window>& window, bool set_bg, Gtk::StateType state_type, const Gdk::Rectangle& area, int x, int y, int width, int height)
 
1872
{
 
1873
  gtk_style_apply_default_background(gobj(), Glib::unwrap(window), static_cast<int>(set_bg), ((GtkStateType)(state_type)), const_cast<GdkRectangle*>(area.gobj()), x, y, width, height);
 
1874
}
 
1875
 
 
1876
IconSet Style::lookup_icon_set(const Gtk::StockID& stock_id)
 
1877
{
 
1878
  return Glib::wrap(gtk_style_lookup_icon_set(gobj(), (stock_id).get_c_str()));
 
1879
}
 
1880
 
 
1881
Glib::RefPtr<Gdk::Pixbuf> Style::render_icon(const IconSource& source, Gtk::TextDirection direction, Gtk::StateType state, Gtk::IconSize size, Gtk::Widget& widget, const Glib::ustring& detail)
 
1882
{
 
1883
  return Glib::wrap(gtk_style_render_icon(gobj(), (source).gobj(), ((GtkTextDirection)(direction)), ((GtkStateType)(state)), static_cast<GtkIconSize>(int(size)), (widget).gobj(), detail.c_str()));
 
1884
}
 
1885
 
 
1886
 
 
1887
Glib::SignalProxy0< void > Style::signal_realize()
 
1888
{
 
1889
  return Glib::SignalProxy0< void >(this, &Style_signal_realize_info);
 
1890
}
 
1891
 
 
1892
Glib::SignalProxy0< void > Style::signal_unrealize()
 
1893
{
 
1894
  return Glib::SignalProxy0< void >(this, &Style_signal_unrealize_info);
 
1895
}
 
1896
 
 
1897
 
 
1898
void Gtk::Style::on_realize()
 
1899
{
 
1900
  BaseClassType *const base = static_cast<BaseClassType*>(
 
1901
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
 
1902
  );
 
1903
 
 
1904
  if(base && base->realize)
 
1905
    (*base->realize)(gobj());
 
1906
}
 
1907
 
 
1908
void Gtk::Style::on_unrealize()
 
1909
{
 
1910
  BaseClassType *const base = static_cast<BaseClassType*>(
 
1911
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
 
1912
  );
 
1913
 
 
1914
  if(base && base->unrealize)
 
1915
    (*base->unrealize)(gobj());
 
1916
}
 
1917
 
 
1918
 
 
1919
void Gtk::Style::realize_vfunc() 
 
1920
{
 
1921
  BaseClassType *const base = static_cast<BaseClassType*>(
 
1922
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
 
1923
  );
 
1924
 
 
1925
  if(base && base->realize)
 
1926
    (*base->realize)(gobj());
 
1927
}
 
1928
 
 
1929
void Gtk::Style::unrealize_vfunc() 
 
1930
{
 
1931
  BaseClassType *const base = static_cast<BaseClassType*>(
 
1932
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
 
1933
  );
 
1934
 
 
1935
  if(base && base->unrealize)
 
1936
    (*base->unrealize)(gobj());
 
1937
}
 
1938
 
 
1939
void Gtk::Style::copy_vfunc(const Glib::RefPtr<Style>& src) 
 
1940
{
 
1941
  BaseClassType *const base = static_cast<BaseClassType*>(
 
1942
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
 
1943
  );
 
1944
 
 
1945
  if(base && base->copy)
 
1946
    (*base->copy)(gobj(),Glib::unwrap(src));
 
1947
}
 
1948
 
 
1949
Glib::RefPtr<Style> Gtk::Style::clone_vfunc() 
 
1950
{
 
1951
  BaseClassType *const base = static_cast<BaseClassType*>(
 
1952
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
 
1953
  );
 
1954
 
 
1955
  if(base && base->clone)
 
1956
    return Glib::wrap((*base->clone)(gobj()));
 
1957
 
 
1958
  typedef Glib::RefPtr<Style> RType;
 
1959
  return RType();
 
1960
}
 
1961
 
 
1962
void Gtk::Style::init_from_rc_vfunc(const Glib::RefPtr<RcStyle>& rc_style) 
 
1963
{
 
1964
  BaseClassType *const base = static_cast<BaseClassType*>(
 
1965
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
 
1966
  );
 
1967
 
 
1968
  if(base && base->init_from_rc)
 
1969
    (*base->init_from_rc)(gobj(),Glib::unwrap(rc_style));
 
1970
}
 
1971
 
 
1972
void Gtk::Style::set_background_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type) 
 
1973
{
 
1974
  BaseClassType *const base = static_cast<BaseClassType*>(
 
1975
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
 
1976
  );
 
1977
 
 
1978
  if(base && base->set_background)
 
1979
    (*base->set_background)(gobj(),Glib::unwrap(window),((GtkStateType)(state_type)));
 
1980
}
 
1981
 
 
1982
Glib::RefPtr<Gdk::Pixbuf> Gtk::Style::render_icon_vfunc(const IconSource& source, TextDirection direction, Gtk::StateType state, IconSize size, Widget* widget, const Glib::ustring& detail) 
 
1983
{
 
1984
  BaseClassType *const base = static_cast<BaseClassType*>(
 
1985
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
 
1986
  );
 
1987
 
 
1988
  if(base && base->render_icon)
 
1989
    return Glib::wrap((*base->render_icon)(gobj(),(source).gobj(),((GtkTextDirection)(direction)),((GtkStateType)(state)),static_cast<GtkIconSize>(int(size)),(GtkWidget*)Glib::unwrap(widget),detail.c_str()));
 
1990
 
 
1991
  typedef Glib::RefPtr<Gdk::Pixbuf> RType;
 
1992
  return RType();
 
1993
}
 
1994
 
 
1995
void Gtk::Style::draw_hline_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x1, int x2, int y) 
 
1996
{
 
1997
  BaseClassType *const base = static_cast<BaseClassType*>(
 
1998
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
 
1999
  );
 
2000
 
 
2001
  if(base && base->draw_hline)
 
2002
    (*base->draw_hline)(gobj(),Glib::unwrap(window),((GtkStateType)(state_type)),const_cast<GdkRectangle*>(area.gobj()),(GtkWidget*)Glib::unwrap(widget),detail.c_str(),x1,x2,y);
 
2003
}
 
2004
 
 
2005
void Gtk::Style::draw_vline_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int y1, int y2, int x) 
 
2006
{
 
2007
  BaseClassType *const base = static_cast<BaseClassType*>(
 
2008
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
 
2009
  );
 
2010
 
 
2011
  if(base && base->draw_vline)
 
2012
    (*base->draw_vline)(gobj(),Glib::unwrap(window),((GtkStateType)(state_type)),const_cast<GdkRectangle*>(area.gobj()),(GtkWidget*)Glib::unwrap(widget),detail.c_str(),y1,y2,x);
 
2013
}
 
2014
 
 
2015
void Gtk::Style::draw_shadow_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x, int y, int width, int height) 
 
2016
{
 
2017
  BaseClassType *const base = static_cast<BaseClassType*>(
 
2018
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
 
2019
  );
 
2020
 
 
2021
  if(base && base->draw_shadow)
 
2022
    (*base->draw_shadow)(gobj(),Glib::unwrap(window),((GtkStateType)(state_type)),((GtkShadowType)(shadow_type)),const_cast<GdkRectangle*>(area.gobj()),(GtkWidget*)Glib::unwrap(widget),detail.c_str(),x,y,width,height);
 
2023
}
 
2024
 
 
2025
void Gtk::Style::draw_polygon_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, GdkPoint* point, int npoints, bool fill) 
 
2026
{
 
2027
  BaseClassType *const base = static_cast<BaseClassType*>(
 
2028
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
 
2029
  );
 
2030
 
 
2031
  if(base && base->draw_polygon)
 
2032
    (*base->draw_polygon)(gobj(),Glib::unwrap(window),((GtkStateType)(state_type)),((GtkShadowType)(shadow_type)),const_cast<GdkRectangle*>(area.gobj()),(GtkWidget*)Glib::unwrap(widget),detail.c_str(),point,npoints,static_cast<int>(fill));
 
2033
}
 
2034
 
 
2035
void Gtk::Style::draw_arrow_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, Gtk::ArrowType arrow_type, bool fill, int x, int y, int width, int height) 
 
2036
{
 
2037
  BaseClassType *const base = static_cast<BaseClassType*>(
 
2038
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
 
2039
  );
 
2040
 
 
2041
  if(base && base->draw_arrow)
 
2042
    (*base->draw_arrow)(gobj(),Glib::unwrap(window),((GtkStateType)(state_type)),((GtkShadowType)(shadow_type)),const_cast<GdkRectangle*>(area.gobj()),(GtkWidget*)Glib::unwrap(widget),detail.c_str(),((GtkArrowType)(arrow_type)),static_cast<int>(fill),x,y,width,height);
 
2043
}
 
2044
 
 
2045
void Gtk::Style::draw_diamond_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x, int y, int width, int height) 
 
2046
{
 
2047
  BaseClassType *const base = static_cast<BaseClassType*>(
 
2048
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
 
2049
  );
 
2050
 
 
2051
  if(base && base->draw_diamond)
 
2052
    (*base->draw_diamond)(gobj(),Glib::unwrap(window),((GtkStateType)(state_type)),((GtkShadowType)(shadow_type)),const_cast<GdkRectangle*>(area.gobj()),(GtkWidget*)Glib::unwrap(widget),detail.c_str(),x,y,width,height);
 
2053
}
 
2054
 
 
2055
void Gtk::Style::draw_string_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x, int y, const Glib::ustring& string) 
 
2056
{
 
2057
  BaseClassType *const base = static_cast<BaseClassType*>(
 
2058
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
 
2059
  );
 
2060
 
 
2061
  if(base && base->draw_string)
 
2062
    (*base->draw_string)(gobj(),Glib::unwrap(window),((GtkStateType)(state_type)),const_cast<GdkRectangle*>(area.gobj()),(GtkWidget*)Glib::unwrap(widget),detail.c_str(),x,y,string.c_str());
 
2063
}
 
2064
 
 
2065
void Gtk::Style::draw_box_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x, int y, int width, int height) 
 
2066
{
 
2067
  BaseClassType *const base = static_cast<BaseClassType*>(
 
2068
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
 
2069
  );
 
2070
 
 
2071
  if(base && base->draw_box)
 
2072
    (*base->draw_box)(gobj(),Glib::unwrap(window),((GtkStateType)(state_type)),((GtkShadowType)(shadow_type)),const_cast<GdkRectangle*>(area.gobj()),(GtkWidget*)Glib::unwrap(widget),detail.c_str(),x,y,width,height);
 
2073
}
 
2074
 
 
2075
void Gtk::Style::draw_flat_box_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x, int y, int width, int height) 
 
2076
{
 
2077
  BaseClassType *const base = static_cast<BaseClassType*>(
 
2078
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
 
2079
  );
 
2080
 
 
2081
  if(base && base->draw_flat_box)
 
2082
    (*base->draw_flat_box)(gobj(),Glib::unwrap(window),((GtkStateType)(state_type)),((GtkShadowType)(shadow_type)),const_cast<GdkRectangle*>(area.gobj()),(GtkWidget*)Glib::unwrap(widget),detail.c_str(),x,y,width,height);
 
2083
}
 
2084
 
 
2085
void Gtk::Style::draw_check_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x, int y, int width, int height) 
 
2086
{
 
2087
  BaseClassType *const base = static_cast<BaseClassType*>(
 
2088
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
 
2089
  );
 
2090
 
 
2091
  if(base && base->draw_check)
 
2092
    (*base->draw_check)(gobj(),Glib::unwrap(window),((GtkStateType)(state_type)),((GtkShadowType)(shadow_type)),const_cast<GdkRectangle*>(area.gobj()),(GtkWidget*)Glib::unwrap(widget),detail.c_str(),x,y,width,height);
 
2093
}
 
2094
 
 
2095
void Gtk::Style::draw_option_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x, int y, int width, int height) 
 
2096
{
 
2097
  BaseClassType *const base = static_cast<BaseClassType*>(
 
2098
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
 
2099
  );
 
2100
 
 
2101
  if(base && base->draw_option)
 
2102
    (*base->draw_option)(gobj(),Glib::unwrap(window),((GtkStateType)(state_type)),((GtkShadowType)(shadow_type)),const_cast<GdkRectangle*>(area.gobj()),(GtkWidget*)Glib::unwrap(widget),detail.c_str(),x,y,width,height);
 
2103
}
 
2104
 
 
2105
void Gtk::Style::draw_tab_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x, int y, int width, int height) 
 
2106
{
 
2107
  BaseClassType *const base = static_cast<BaseClassType*>(
 
2108
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
 
2109
  );
 
2110
 
 
2111
  if(base && base->draw_tab)
 
2112
    (*base->draw_tab)(gobj(),Glib::unwrap(window),((GtkStateType)(state_type)),((GtkShadowType)(shadow_type)),const_cast<GdkRectangle*>(area.gobj()),(GtkWidget*)Glib::unwrap(widget),detail.c_str(),x,y,width,height);
 
2113
}
 
2114
 
 
2115
void Gtk::Style::draw_shadow_gap_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x, int y, int width, int height, Gtk::PositionType gap_side, int gap_x, int gap_width) 
 
2116
{
 
2117
  BaseClassType *const base = static_cast<BaseClassType*>(
 
2118
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
 
2119
  );
 
2120
 
 
2121
  if(base && base->draw_shadow_gap)
 
2122
    (*base->draw_shadow_gap)(gobj(),Glib::unwrap(window),((GtkStateType)(state_type)),((GtkShadowType)(shadow_type)),const_cast<GdkRectangle*>(area.gobj()),(GtkWidget*)Glib::unwrap(widget),detail.c_str(),x,y,width,height,((GtkPositionType)(gap_side)),gap_x,gap_width);
 
2123
}
 
2124
 
 
2125
void Gtk::Style::draw_box_gap_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x, int y, int width, int height, Gtk::PositionType gap_side, int gap_x, int gap_width) 
 
2126
{
 
2127
  BaseClassType *const base = static_cast<BaseClassType*>(
 
2128
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
 
2129
  );
 
2130
 
 
2131
  if(base && base->draw_box_gap)
 
2132
    (*base->draw_box_gap)(gobj(),Glib::unwrap(window),((GtkStateType)(state_type)),((GtkShadowType)(shadow_type)),const_cast<GdkRectangle*>(area.gobj()),(GtkWidget*)Glib::unwrap(widget),detail.c_str(),x,y,width,height,((GtkPositionType)(gap_side)),gap_x,gap_width);
 
2133
}
 
2134
 
 
2135
void Gtk::Style::draw_extension_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x, int y, int width, int height, PositionType gap_side) 
 
2136
{
 
2137
  BaseClassType *const base = static_cast<BaseClassType*>(
 
2138
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
 
2139
  );
 
2140
 
 
2141
  if(base && base->draw_extension)
 
2142
    (*base->draw_extension)(gobj(),Glib::unwrap(window),((GtkStateType)(state_type)),((GtkShadowType)(shadow_type)),const_cast<GdkRectangle*>(area.gobj()),(GtkWidget*)Glib::unwrap(widget),detail.c_str(),x,y,width,height,((GtkPositionType)(gap_side)));
 
2143
}
 
2144
 
 
2145
void Gtk::Style::draw_focus_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x, int y, int width, int height) 
 
2146
{
 
2147
  BaseClassType *const base = static_cast<BaseClassType*>(
 
2148
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
 
2149
  );
 
2150
 
 
2151
  if(base && base->draw_focus)
 
2152
    (*base->draw_focus)(gobj(),Glib::unwrap(window),((GtkStateType)(state_type)),const_cast<GdkRectangle*>(area.gobj()),(GtkWidget*)Glib::unwrap(widget),detail.c_str(),x,y,width,height);
 
2153
}
 
2154
 
 
2155
void Gtk::Style::draw_slider_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x, int y, int width, int height, Orientation orientation) 
 
2156
{
 
2157
  BaseClassType *const base = static_cast<BaseClassType*>(
 
2158
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
 
2159
  );
 
2160
 
 
2161
  if(base && base->draw_slider)
 
2162
    (*base->draw_slider)(gobj(),Glib::unwrap(window),((GtkStateType)(state_type)),((GtkShadowType)(shadow_type)),const_cast<GdkRectangle*>(area.gobj()),(GtkWidget*)Glib::unwrap(widget),detail.c_str(),x,y,width,height,((GtkOrientation)(orientation)));
 
2163
}
 
2164
 
 
2165
void Gtk::Style::draw_handle_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x, int y, int width, int height, Orientation orientation) 
 
2166
{
 
2167
  BaseClassType *const base = static_cast<BaseClassType*>(
 
2168
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
 
2169
  );
 
2170
 
 
2171
  if(base && base->draw_handle)
 
2172
    (*base->draw_handle)(gobj(),Glib::unwrap(window),((GtkStateType)(state_type)),((GtkShadowType)(shadow_type)),const_cast<GdkRectangle*>(area.gobj()),(GtkWidget*)Glib::unwrap(widget),detail.c_str(),x,y,width,height,((GtkOrientation)(orientation)));
 
2173
}
 
2174
 
 
2175
void Gtk::Style::draw_expander_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x, int y, ExpanderStyle expander_style) 
 
2176
{
 
2177
  BaseClassType *const base = static_cast<BaseClassType*>(
 
2178
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
 
2179
  );
 
2180
 
 
2181
  if(base && base->draw_expander)
 
2182
    (*base->draw_expander)(gobj(),Glib::unwrap(window),((GtkStateType)(state_type)),const_cast<GdkRectangle*>(area.gobj()),(GtkWidget*)Glib::unwrap(widget),detail.c_str(),x,y,((GtkExpanderStyle)(expander_style)));
 
2183
}
 
2184
 
 
2185
void Gtk::Style::draw_layout_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, bool use_text, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x, int y, const Glib::RefPtr<Pango::Layout>& layout) 
 
2186
{
 
2187
  BaseClassType *const base = static_cast<BaseClassType*>(
 
2188
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
 
2189
  );
 
2190
 
 
2191
  if(base && base->draw_layout)
 
2192
    (*base->draw_layout)(gobj(),Glib::unwrap(window),((GtkStateType)(state_type)),static_cast<int>(use_text),const_cast<GdkRectangle*>(area.gobj()),(GtkWidget*)Glib::unwrap(widget),detail.c_str(),x,y,Glib::unwrap(layout));
 
2193
}
 
2194
 
 
2195
void Gtk::Style::draw_resize_grip_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, Gdk::WindowEdge edge, int x, int y, int width, int height) 
 
2196
{
 
2197
  BaseClassType *const base = static_cast<BaseClassType*>(
 
2198
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
 
2199
  );
 
2200
 
 
2201
  if(base && base->draw_resize_grip)
 
2202
    (*base->draw_resize_grip)(gobj(),Glib::unwrap(window),((GtkStateType)(state_type)),const_cast<GdkRectangle*>(area.gobj()),(GtkWidget*)Glib::unwrap(widget),detail.c_str(),((GdkWindowEdge)(edge)),x,y,width,height);
 
2203
}
 
2204
 
 
2205
 
 
2206
} // namespace Gtk
 
2207
 
 
2208