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