Install ardour as a binary, a script and a set of shared
[ardour.git] / libs / gtkmm2 / gtk / gtkmm / editable.cc
1 // Generated by gtkmmproc -- DO NOT MODIFY!
2
3 #include <gtkmm/editable.h>
4 #include <gtkmm/private/editable_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 <gtk/gtkeditable.h>
27
28
29 namespace
30 {
31
32 void Editable_signal_insert_text_callback(GtkEditable* self, const gchar* text,gint length,gint* position,void* data)
33 {
34   using namespace Gtk;
35   typedef sigc::slot< void,const Glib::ustring&,int* > SlotType;
36
37   // Do not try to call a signal on a disassociated wrapper.
38   if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
39   {
40     try
41     {
42       if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
43         (*static_cast<SlotType*>(slot))(      Glib::ustring(text, text + length), position);
44     }
45     catch(...)
46     {
47       Glib::exception_handlers_invoke();
48     }
49   }
50 }
51
52 const Glib::SignalProxyInfo Editable_signal_insert_text_info =
53 {
54   "insert_text",
55   (GCallback) &Editable_signal_insert_text_callback,
56   (GCallback) &Editable_signal_insert_text_callback
57 };
58
59
60 void Editable_signal_delete_text_callback(GtkEditable* self, gint start_pos,gint end_pos,void* data)
61 {
62   using namespace Gtk;
63   typedef sigc::slot< void,int,int > SlotType;
64
65   // Do not try to call a signal on a disassociated wrapper.
66   if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
67   {
68     try
69     {
70       if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
71         (*static_cast<SlotType*>(slot))(start_pos
72 , end_pos
73 );
74     }
75     catch(...)
76     {
77       Glib::exception_handlers_invoke();
78     }
79   }
80 }
81
82 const Glib::SignalProxyInfo Editable_signal_delete_text_info =
83 {
84   "delete_text",
85   (GCallback) &Editable_signal_delete_text_callback,
86   (GCallback) &Editable_signal_delete_text_callback
87 };
88
89
90 const Glib::SignalProxyInfo Editable_signal_changed_info =
91 {
92   "changed",
93   (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
94   (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
95 };
96
97 } // anonymous namespace
98
99
100 namespace Glib
101 {
102
103 Glib::RefPtr<Gtk::Editable> wrap(GtkEditable* object, bool take_copy)
104 {
105   return Glib::RefPtr<Gtk::Editable>( dynamic_cast<Gtk::Editable*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
106   //We use dynamic_cast<> in case of multiple inheritance.
107 }
108
109 } // namespace Glib
110
111
112 namespace Gtk
113 {
114
115
116 /* The *_Class implementation: */
117
118 const Glib::Interface_Class& Editable_Class::init()
119 {
120   if(!gtype_) // create the GType if necessary
121   {
122     // Glib::Interface_Class has to know the interface init function
123     // in order to add interfaces to implementing types.
124     class_init_func_ = &Editable_Class::iface_init_function;
125
126     // We can not derive from another interface, and it is not necessary anyway.
127     gtype_ = gtk_editable_get_type();
128   }
129
130   return *this;
131 }
132
133 void Editable_Class::iface_init_function(void* g_iface, void*)
134 {
135   BaseClassType *const klass = static_cast<BaseClassType*>(g_iface);
136
137   //This is just to avoid an "unused variable" warning when there are no vfuncs or signal handlers to connect.
138   //This is a temporary fix until I find out why I can not seem to derive a GtkFileChooser interface. murrayc
139   g_assert(klass != 0); 
140
141   klass->do_insert_text = &do_insert_text_vfunc_callback;
142   klass->do_delete_text = &do_delete_text_vfunc_callback;
143   klass->get_chars = &get_chars_vfunc_callback;
144   klass->set_selection_bounds = &set_selection_bounds_vfunc_callback;
145   klass->get_selection_bounds = &get_selection_bounds_vfunc_callback;
146   klass->set_position = &set_position_vfunc_callback;
147   klass->get_position = &get_position_vfunc_callback;
148   klass->insert_text = &insert_text_callback;
149   klass->delete_text = &delete_text_callback;
150   klass->changed = &changed_callback;
151 }
152
153 void Editable_Class::do_insert_text_vfunc_callback(GtkEditable* self, const gchar* text, gint length, gint* position)
154 {
155   CppObjectType *const obj = dynamic_cast<CppObjectType*>(
156       Glib::ObjectBase::_get_current_wrapper((GObject*)      self));
157
158   // Non-gtkmmproc-generated custom classes implicitly call the default
159   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
160   // generated classes can use this optimisation, which avoids the unnecessary
161   // parameter conversions if there is no possibility of the virtual function
162   // being overridden:
163   if(obj && obj->is_derived_())
164   {
165     try // Trap C++ exceptions which would normally be lost because this is a C callback.
166     {
167       // Call the virtual member method, which derived classes might override.
168       obj->insert_text_vfunc(      Glib::ustring(text, text + length), *position);
169     }
170     catch(...)
171     {
172       Glib::exception_handlers_invoke();
173     }
174   }
175   else
176   {
177     BaseClassType *const base = static_cast<BaseClassType*>(
178         g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
179 g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
180 )    );
181
182     // Call the original underlying C function:
183     if(base && base->do_insert_text)
184       (*base->do_insert_text)(      self, text, length, position);
185   }
186 }
187
188 void Editable_Class::do_delete_text_vfunc_callback(GtkEditable* self, gint start_pos, gint end_pos)
189 {
190   CppObjectType *const obj = dynamic_cast<CppObjectType*>(
191       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
192
193   // Non-gtkmmproc-generated custom classes implicitly call the default
194   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
195   // generated classes can use this optimisation, which avoids the unnecessary
196   // parameter conversions if there is no possibility of the virtual function
197   // being overridden:
198   if(obj && obj->is_derived_())
199   {
200     try // Trap C++ exceptions which would normally be lost because this is a C callback.
201     {
202       // Call the virtual member method, which derived classes might override.
203       obj->delete_text_vfunc(start_pos
204 , end_pos
205 );
206     }
207     catch(...)
208     {
209       Glib::exception_handlers_invoke();
210     }
211   }
212   else
213   {
214     BaseClassType *const base = static_cast<BaseClassType*>(
215         g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
216 g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
217 )    );
218
219     // Call the original underlying C function:
220     if(base && base->do_delete_text)
221       (*base->do_delete_text)(self, start_pos, end_pos);
222   }
223 }
224
225 gchar* Editable_Class::get_chars_vfunc_callback(GtkEditable* self, gint start_pos, gint end_pos)
226 {
227   CppObjectType *const obj = dynamic_cast<CppObjectType*>(
228       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
229
230   // Non-gtkmmproc-generated custom classes implicitly call the default
231   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
232   // generated classes can use this optimisation, which avoids the unnecessary
233   // parameter conversions if there is no possibility of the virtual function
234   // being overridden:
235   if(obj && obj->is_derived_())
236   {
237     try // Trap C++ exceptions which would normally be lost because this is a C callback.
238     {
239       // Call the virtual member method, which derived classes might override.
240       return g_strdup((obj->get_chars_vfunc(start_pos
241 , end_pos
242 )).c_str());
243     }
244     catch(...)
245     {
246       Glib::exception_handlers_invoke();
247     }
248   }
249   else
250   {
251     BaseClassType *const base = static_cast<BaseClassType*>(
252         g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
253 g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
254 )    );
255
256     // Call the original underlying C function:
257     if(base && base->get_chars)
258       return (*base->get_chars)(self, start_pos, end_pos);
259   }
260
261   typedef gchar* RType;
262   return RType();
263 }
264
265 void Editable_Class::set_selection_bounds_vfunc_callback(GtkEditable* self, gint start_pos, gint end_pos)
266 {
267   CppObjectType *const obj = dynamic_cast<CppObjectType*>(
268       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
269
270   // Non-gtkmmproc-generated custom classes implicitly call the default
271   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
272   // generated classes can use this optimisation, which avoids the unnecessary
273   // parameter conversions if there is no possibility of the virtual function
274   // being overridden:
275   if(obj && obj->is_derived_())
276   {
277     try // Trap C++ exceptions which would normally be lost because this is a C callback.
278     {
279       // Call the virtual member method, which derived classes might override.
280       obj->select_region_vfunc(start_pos
281 , end_pos
282 );
283     }
284     catch(...)
285     {
286       Glib::exception_handlers_invoke();
287     }
288   }
289   else
290   {
291     BaseClassType *const base = static_cast<BaseClassType*>(
292         g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
293 g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
294 )    );
295
296     // Call the original underlying C function:
297     if(base && base->set_selection_bounds)
298       (*base->set_selection_bounds)(self, start_pos, end_pos);
299   }
300 }
301
302 gboolean Editable_Class::get_selection_bounds_vfunc_callback(GtkEditable* self, gint* start_pos, gint* end_pos)
303 {
304   CppObjectType *const obj = dynamic_cast<CppObjectType*>(
305       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
306
307   // Non-gtkmmproc-generated custom classes implicitly call the default
308   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
309   // generated classes can use this optimisation, which avoids the unnecessary
310   // parameter conversions if there is no possibility of the virtual function
311   // being overridden:
312   if(obj && obj->is_derived_())
313   {
314     try // Trap C++ exceptions which would normally be lost because this is a C callback.
315     {
316       // Call the virtual member method, which derived classes might override.
317       return static_cast<int>(obj->get_selection_bounds_vfunc(*(start_pos)
318 , *(end_pos)
319 ));
320     }
321     catch(...)
322     {
323       Glib::exception_handlers_invoke();
324     }
325   }
326   else
327   {
328     BaseClassType *const base = static_cast<BaseClassType*>(
329         g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
330 g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
331 )    );
332
333     // Call the original underlying C function:
334     if(base && base->get_selection_bounds)
335       return (*base->get_selection_bounds)(self, start_pos, end_pos);
336   }
337
338   typedef gboolean RType;
339   return RType();
340 }
341
342 void Editable_Class::set_position_vfunc_callback(GtkEditable* self, gint position)
343 {
344   CppObjectType *const obj = dynamic_cast<CppObjectType*>(
345       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
346
347   // Non-gtkmmproc-generated custom classes implicitly call the default
348   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
349   // generated classes can use this optimisation, which avoids the unnecessary
350   // parameter conversions if there is no possibility of the virtual function
351   // being overridden:
352   if(obj && obj->is_derived_())
353   {
354     try // Trap C++ exceptions which would normally be lost because this is a C callback.
355     {
356       // Call the virtual member method, which derived classes might override.
357       obj->set_position_vfunc(position
358 );
359     }
360     catch(...)
361     {
362       Glib::exception_handlers_invoke();
363     }
364   }
365   else
366   {
367     BaseClassType *const base = static_cast<BaseClassType*>(
368         g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
369 g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
370 )    );
371
372     // Call the original underlying C function:
373     if(base && base->set_position)
374       (*base->set_position)(self, position);
375   }
376 }
377
378 gint Editable_Class::get_position_vfunc_callback(GtkEditable* self)
379 {
380   CppObjectType *const obj = dynamic_cast<CppObjectType*>(
381       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
382
383   // Non-gtkmmproc-generated custom classes implicitly call the default
384   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
385   // generated classes can use this optimisation, which avoids the unnecessary
386   // parameter conversions if there is no possibility of the virtual function
387   // being overridden:
388   if(obj && obj->is_derived_())
389   {
390     try // Trap C++ exceptions which would normally be lost because this is a C callback.
391     {
392       // Call the virtual member method, which derived classes might override.
393       return obj->get_position_vfunc();
394     }
395     catch(...)
396     {
397       Glib::exception_handlers_invoke();
398     }
399   }
400   else
401   {
402     BaseClassType *const base = static_cast<BaseClassType*>(
403         g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
404 g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
405 )    );
406
407     // Call the original underlying C function:
408     if(base && base->get_position)
409       return (*base->get_position)(self);
410   }
411
412   typedef gint RType;
413   return RType();
414 }
415
416
417 void Editable_Class::insert_text_callback(GtkEditable* self, const gchar* text, gint length, gint* position)
418 {
419   CppObjectType *const obj = dynamic_cast<CppObjectType*>(
420       Glib::ObjectBase::_get_current_wrapper((GObject*)      self));
421
422   // Non-gtkmmproc-generated custom classes implicitly call the default
423   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
424   // generated classes can use this optimisation, which avoids the unnecessary
425   // parameter conversions if there is no possibility of the virtual function
426   // being overridden:
427   if(obj && obj->is_derived_())
428   {
429     try // Trap C++ exceptions which would normally be lost because this is a C callback.
430     {
431       // Call the virtual member method, which derived classes might override.
432       obj->on_insert_text(      Glib::ustring(text, text + length), position);
433     }
434     catch(...)
435     {
436       Glib::exception_handlers_invoke();
437     }
438   }
439   else
440   {
441     BaseClassType *const base = static_cast<BaseClassType*>(
442         g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
443 g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
444 )    );
445
446     // Call the original underlying C function:
447     if(base && base->insert_text)
448       (*base->insert_text)(      self, text, length, position);
449   }
450 }
451
452 void Editable_Class::delete_text_callback(GtkEditable* self, gint start_pos, gint end_pos)
453 {
454   CppObjectType *const obj = dynamic_cast<CppObjectType*>(
455       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
456
457   // Non-gtkmmproc-generated custom classes implicitly call the default
458   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
459   // generated classes can use this optimisation, which avoids the unnecessary
460   // parameter conversions if there is no possibility of the virtual function
461   // being overridden:
462   if(obj && obj->is_derived_())
463   {
464     try // Trap C++ exceptions which would normally be lost because this is a C callback.
465     {
466       // Call the virtual member method, which derived classes might override.
467       obj->on_delete_text(start_pos
468 , end_pos
469 );
470     }
471     catch(...)
472     {
473       Glib::exception_handlers_invoke();
474     }
475   }
476   else
477   {
478     BaseClassType *const base = static_cast<BaseClassType*>(
479         g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
480 g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
481 )    );
482
483     // Call the original underlying C function:
484     if(base && base->delete_text)
485       (*base->delete_text)(self, start_pos, end_pos);
486   }
487 }
488
489 void Editable_Class::changed_callback(GtkEditable* self)
490 {
491   CppObjectType *const obj = dynamic_cast<CppObjectType*>(
492       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
493
494   // Non-gtkmmproc-generated custom classes implicitly call the default
495   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
496   // generated classes can use this optimisation, which avoids the unnecessary
497   // parameter conversions if there is no possibility of the virtual function
498   // being overridden:
499   if(obj && obj->is_derived_())
500   {
501     try // Trap C++ exceptions which would normally be lost because this is a C callback.
502     {
503       // Call the virtual member method, which derived classes might override.
504       obj->on_changed();
505     }
506     catch(...)
507     {
508       Glib::exception_handlers_invoke();
509     }
510   }
511   else
512   {
513     BaseClassType *const base = static_cast<BaseClassType*>(
514         g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
515 g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
516 )    );
517
518     // Call the original underlying C function:
519     if(base && base->changed)
520       (*base->changed)(self);
521   }
522 }
523
524
525 Glib::ObjectBase* Editable_Class::wrap_new(GObject* object)
526 {
527   return new Editable((GtkEditable*)(object));
528 }
529
530
531 /* The implementation: */
532
533 Editable::Editable()
534 :
535   Glib::Interface(editable_class_.init())
536 {}
537
538 Editable::Editable(GtkEditable* castitem)
539 :
540   Glib::Interface((GObject*)(castitem))
541 {}
542
543 Editable::~Editable()
544 {}
545
546 // static
547 void Editable::add_interface(GType gtype_implementer)
548 {
549   editable_class_.init().add_interface(gtype_implementer);
550 }
551
552 Editable::CppClassType Editable::editable_class_; // initialize static member
553
554 GType Editable::get_type()
555 {
556   return editable_class_.init().get_type();
557 }
558
559 GType Editable::get_base_type()
560 {
561   return gtk_editable_get_type();
562 }
563
564
565 void Editable::cut_clipboard()
566 {
567   gtk_editable_cut_clipboard(gobj());
568 }
569
570 void Editable::copy_clipboard()
571 {
572   gtk_editable_copy_clipboard(gobj());
573 }
574
575 void Editable::paste_clipboard()
576 {
577   gtk_editable_paste_clipboard(gobj());
578 }
579
580 void Editable::delete_selection()
581 {
582   gtk_editable_delete_selection(gobj());
583 }
584
585 void Editable::set_editable(bool is_editable)
586 {
587   gtk_editable_set_editable(gobj(), static_cast<int>(is_editable));
588 }
589
590 bool Editable::get_editable() const
591 {
592   return gtk_editable_get_editable(const_cast<GtkEditable*>(gobj()));
593 }
594
595 void Editable::insert_text(const Glib::ustring& text, int length, int& position)
596 {
597   gtk_editable_insert_text(gobj(), text.c_str(), length, &position);
598 }
599
600 void Editable::delete_text(int start_pos, int end_pos)
601 {
602   gtk_editable_delete_text(gobj(), start_pos, end_pos);
603 }
604
605 Glib::ustring Editable::get_chars(int start_pos, int end_pos) const
606 {
607   return Glib::convert_return_gchar_ptr_to_ustring(gtk_editable_get_chars(const_cast<GtkEditable*>(gobj()), start_pos, end_pos));
608 }
609
610 void Editable::select_region(int start_pos, int end_pos)
611 {
612   gtk_editable_select_region(gobj(), start_pos, end_pos);
613 }
614
615 bool Editable::get_selection_bounds(int& start_pos, int& end_pos) const
616 {
617   return gtk_editable_get_selection_bounds(const_cast<GtkEditable*>(gobj()), &start_pos, &end_pos);
618 }
619
620 void Editable::set_position(int position)
621 {
622   gtk_editable_set_position(gobj(), position);
623 }
624
625 int Editable::get_position() const
626 {
627   return gtk_editable_get_position(const_cast<GtkEditable*>(gobj()));
628 }
629
630
631 Glib::SignalProxy2< void,const Glib::ustring&,int* > Editable::signal_insert_text()
632 {
633   return Glib::SignalProxy2< void,const Glib::ustring&,int* >(this, &Editable_signal_insert_text_info);
634 }
635
636 Glib::SignalProxy2< void,int,int > Editable::signal_delete_text()
637 {
638   return Glib::SignalProxy2< void,int,int >(this, &Editable_signal_delete_text_info);
639 }
640
641 Glib::SignalProxy0< void > Editable::signal_changed()
642 {
643   return Glib::SignalProxy0< void >(this, &Editable_signal_changed_info);
644 }
645
646
647 void Gtk::Editable::on_insert_text(const Glib::ustring& text, int* position)
648 {
649   BaseClassType *const base = static_cast<BaseClassType*>(
650       g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
651 g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
652 )  );
653
654   if(base && base->insert_text)
655     (*base->insert_text)(gobj(),text.data(),text.bytes(),position);
656 }
657
658 void Gtk::Editable::on_delete_text(int start_pos, int end_pos)
659 {
660   BaseClassType *const base = static_cast<BaseClassType*>(
661       g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
662 g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
663 )  );
664
665   if(base && base->delete_text)
666     (*base->delete_text)(gobj(),start_pos,end_pos);
667 }
668
669 void Gtk::Editable::on_changed()
670 {
671   BaseClassType *const base = static_cast<BaseClassType*>(
672       g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
673 g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
674 )  );
675
676   if(base && base->changed)
677     (*base->changed)(gobj());
678 }
679
680
681 void Gtk::Editable::insert_text_vfunc(const Glib::ustring& text, int& position) 
682 {
683   BaseClassType *const base = static_cast<BaseClassType*>(
684       g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
685 g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
686 )  );
687
688   if(base && base->do_insert_text)
689     (*base->do_insert_text)(gobj(),text.data(),text.bytes(),&position);
690 }
691
692 void Gtk::Editable::delete_text_vfunc(int start_pos, int end_pos) 
693 {
694   BaseClassType *const base = static_cast<BaseClassType*>(
695       g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
696 g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
697 )  );
698
699   if(base && base->do_delete_text)
700     (*base->do_delete_text)(gobj(),start_pos,end_pos);
701 }
702
703 Glib::ustring Gtk::Editable::get_chars_vfunc(int start_pos, int end_pos) const
704 {
705   BaseClassType *const base = static_cast<BaseClassType*>(
706       g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
707 g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
708 )  );
709
710   if(base && base->get_chars)
711     return Glib::convert_const_gchar_ptr_to_ustring((*base->get_chars)(const_cast<GtkEditable*>(gobj()),start_pos,end_pos));
712
713   typedef Glib::ustring RType;
714   return RType();
715 }
716
717 void Gtk::Editable::select_region_vfunc(int start_pos, int end_pos) 
718 {
719   BaseClassType *const base = static_cast<BaseClassType*>(
720       g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
721 g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
722 )  );
723
724   if(base && base->set_selection_bounds)
725     (*base->set_selection_bounds)(gobj(),start_pos,end_pos);
726 }
727
728 bool Gtk::Editable::get_selection_bounds_vfunc(int& start_pos, int& end_pos) const
729 {
730   BaseClassType *const base = static_cast<BaseClassType*>(
731       g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
732 g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
733 )  );
734
735   if(base && base->get_selection_bounds)
736     return (*base->get_selection_bounds)(const_cast<GtkEditable*>(gobj()),&start_pos,&end_pos);
737
738   typedef bool RType;
739   return RType();
740 }
741
742 void Gtk::Editable::set_position_vfunc(int position) 
743 {
744   BaseClassType *const base = static_cast<BaseClassType*>(
745       g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
746 g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
747 )  );
748
749   if(base && base->set_position)
750     (*base->set_position)(gobj(),position);
751 }
752
753 int Gtk::Editable::get_position_vfunc() const
754 {
755   BaseClassType *const base = static_cast<BaseClassType*>(
756       g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
757 g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
758 )  );
759
760   if(base && base->get_position)
761     return (*base->get_position)(const_cast<GtkEditable*>(gobj()));
762
763   typedef int RType;
764   return RType();
765 }
766
767
768 } // namespace Gtk
769
770