1
// Generated by gtkmmproc -- DO NOT MODIFY!
4
#include <gtkmm/textbuffer.h>
5
#include <gtkmm/private/textbuffer_p.h>
8
/* $Id: textbuffer.ccg,v 1.8 2006/11/20 09:19:49 murrayc Exp $ */
10
/* Copyright(C) 1998-2002 The gtkmm Development Team
12
* This library is free software; you can redistribute it and/or
13
* modify it under the terms of the GNU Lesser General Public
14
* License as published by the Free Software Foundation; either
15
* version 2.1 of the License, or (at your option) any later version.
17
* This library is distributed in the hope that it will be useful,
18
* but WITHOUT ANY WARRANTY; without even the implied warranty of
19
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20
* Lesser General Public License for more details.
22
* You should have received a copy of the GNU Lesser General Public
23
* License along with this library; if not, write to the Free
24
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27
#include <glibmm/vectorutils.h>
31
#include <gtkmm/textmark.h>
32
#include <gtkmm/textiter.h>
36
static guint8* SignalProxy_Serialize(GtkTextBuffer* , GtkTextBuffer* content_buffer,
37
const GtkTextIter* start, const GtkTextIter* end,
41
Gtk::TextBuffer::SlotSerialize* the_slot = static_cast<Gtk::TextBuffer::SlotSerialize*>(user_data);
45
return (*the_slot)(Glib::wrap(content_buffer), Glib::wrap(start), Glib::wrap(end), *length);
49
Glib::exception_handlers_invoke();
52
return 0; // arbitrary value
55
static void SignalProxy_Serialize_gtk_callback_destroy(void* user_data)
57
delete static_cast<Gtk::TextBuffer::SlotSerialize*>(user_data);
60
static gboolean SignalProxy_Deserialize(GtkTextBuffer* , GtkTextBuffer* content_buffer,
61
GtkTextIter* iter, const guint8* data,
62
gsize length, gboolean create_tags,
66
Gtk::TextBuffer::SlotDeserialize* the_slot = static_cast<Gtk::TextBuffer::SlotDeserialize*>(user_data);
70
(*the_slot)(Glib::wrap(content_buffer, true), Glib::wrap(iter), data, length, create_tags);
75
//TODO: Fill the error parameter.
76
Glib::exception_handlers_invoke();
79
return 0; // arbitrary value
82
static void SignalProxy_Deserialize_gtk_callback_destroy(void* user_data)
84
delete static_cast<Gtk::TextBuffer::SlotDeserialize*>(user_data);
91
typedef TextChildAnchor ChildAnchor; //Help the code-generator so that it does not have to fully qualify this type in the .cc file.
93
TextBuffer::TextBuffer(const Glib::RefPtr<TagTable>& tag_table)
95
// Mark this class as non-derived to allow C++ vfuncs to be skipped.
97
Glib::Object(Glib::ConstructParams(textbuffer_class_.init(), "tag_table",Glib::unwrap(tag_table), static_cast<char*>(0)))
100
Glib::RefPtr<TextBuffer::Tag> TextBuffer::create_tag(const Glib::ustring& tag_name)
102
//gtk_text_buffer_create_tag takes a varargs list of property names and values.
103
//gtkmm coders should use the Tag.set_* method instead.
104
return Glib::wrap(gtk_text_buffer_create_tag(gobj(), tag_name.c_str(), (char*)0), true); //true = take_copy.
105
//We have to take a copy because gtk_text_buffer_create_tag() doesn't ref for us, for no real reason.
108
Glib::RefPtr<TextBuffer::Tag> TextBuffer::create_tag()
110
//gtk_text_buffer_create_tag takes a varargs list of property names and values.
111
//gtkmm coders should use the Tag.set_* method instead.
112
return Glib::wrap(gtk_text_buffer_create_tag(gobj(), (const char*)0, (char*)0), true); //true = take_copy.
113
//We have to take a copy because gtk_text_buffer_create_tag() doesn't ref for us, for no real reason.
116
Glib::RefPtr<TextBuffer::Mark>
117
TextBuffer::create_mark(const TextBuffer::iterator& where, bool left_gravity)
119
return Glib::wrap(gtk_text_buffer_create_mark(
120
gobj(), 0, const_cast<GtkTextIter*>(where.gobj()), left_gravity),
121
true); // acquire reference
124
TextBuffer::iterator TextBuffer::get_iter_at_line_offset(int line_number, int char_offset)
127
gtk_text_buffer_get_iter_at_line_offset(gobj(), iter.gobj(), line_number, char_offset);
131
TextBuffer::iterator TextBuffer::get_iter_at_line_index(int line_number, int byte_index)
134
gtk_text_buffer_get_iter_at_line_index(gobj(), iter.gobj(), line_number, byte_index);
138
TextBuffer::iterator TextBuffer::get_iter_at_offset(int char_offset)
141
gtk_text_buffer_get_iter_at_offset(gobj(), iter.gobj(), char_offset);
145
TextBuffer::iterator TextBuffer::get_iter_at_line(int line_number)
148
gtk_text_buffer_get_iter_at_line(gobj(), iter.gobj(), line_number);
152
TextBuffer::iterator TextBuffer::begin()
155
gtk_text_buffer_get_start_iter(gobj(), iter.gobj());
159
TextBuffer::iterator TextBuffer::end()
162
gtk_text_buffer_get_end_iter(gobj(), iter.gobj());
166
void TextBuffer::get_bounds(iterator& range_begin, iterator& range_end)
168
gtk_text_buffer_get_bounds(gobj(), range_begin.gobj(), range_end.gobj());
171
TextBuffer::iterator TextBuffer::get_iter_at_mark(const Glib::RefPtr<Mark>& mark)
174
gtk_text_buffer_get_iter_at_mark(gobj(), iter.gobj(), mark->gobj());
178
void TextBuffer::set_text(const Glib::ustring& text)
180
gtk_text_buffer_set_text(gobj(), text.data(), text.bytes());
183
void TextBuffer::set_text(const char* text_begin, const char* text_end)
185
gtk_text_buffer_set_text(gobj(), text_begin, text_end - text_begin);
188
TextBuffer::iterator TextBuffer::insert(const iterator& pos, const Glib::ustring& text)
190
// gtk_text_buffer_insert() modifies the iterator, but that's not the
191
// STL way so we give it something that we don't mind it modifying.
192
iterator iterCopy (pos);
193
gtk_text_buffer_insert(gobj(), iterCopy.gobj(), text.data(), text.bytes());
195
// According to the gtk_text_buffer_insert() docs, the "default signal handler
196
// revalidates it to point to the end of the inserted text".
200
TextBuffer::iterator TextBuffer::insert(const iterator& pos, const char* text_begin, const char* text_end)
202
// gtk_text_buffer_insert() modifies the iterator, but that's not the
203
// STL way so we give it something that we don't mind it modifying.
204
iterator iterCopy (pos);
205
gtk_text_buffer_insert(gobj(), iterCopy.gobj(), text_begin, text_end - text_begin);
207
// According to the gtk_text_buffer_insert() docs, the "default signal handler
208
// revalidates it to point to the end of the inserted text".
212
TextBuffer::iterator TextBuffer::insert_pixbuf(const iterator& pos, const Glib::RefPtr<Gdk::Pixbuf>& pixbuf)
214
iterator iterCopy (pos);
215
gtk_text_buffer_insert_pixbuf(gobj(), iterCopy.gobj(), pixbuf->gobj());
219
TextBuffer::iterator TextBuffer::insert_child_anchor(const iterator& pos,
220
const Glib::RefPtr<ChildAnchor>& anchor)
222
// Copy the iterator. It might be changed because it is used as a signal parameter internally.
223
iterator iterCopy (pos);
224
gtk_text_buffer_insert_child_anchor(gobj(), iterCopy.gobj(), Glib::unwrap(anchor));
228
Glib::RefPtr<ChildAnchor> TextBuffer::create_child_anchor(const iterator& pos)
230
// Copy the iterator. It might be changed because it is used as a signal parameter internally.
231
iterator iterCopy (pos);
232
return Glib::wrap(gtk_text_buffer_create_child_anchor(gobj(), iterCopy.gobj()),
233
true); // The function does not do a ref for us.
236
void TextBuffer::insert_at_cursor(const Glib::ustring& text)
238
gtk_text_buffer_insert_at_cursor(gobj(), text.data(), text.bytes());
241
void TextBuffer::insert_at_cursor(const char* text_begin, const char* text_end)
243
gtk_text_buffer_insert_at_cursor(gobj(), text_begin, text_end - text_begin);
246
std::pair<TextBuffer::iterator,bool>
247
TextBuffer::insert_interactive(const iterator& pos, const Glib::ustring& text, bool default_editable)
249
// Since we have to copy the iterator anyway we can as well create the
250
// std::pair now. That saves another copy later (mind you, TextIter is
251
// a heavy struct), and allows modern compilers to apply the return value
253
std::pair<iterator,bool> pair_iter_success (pos, false);
255
pair_iter_success.second = gtk_text_buffer_insert_interactive(
256
gobj(), pair_iter_success.first.gobj(), text.data(), text.bytes(), default_editable);
258
return pair_iter_success;
261
std::pair<TextBuffer::iterator,bool>
262
TextBuffer::insert_interactive(const iterator& pos, const char* text_begin, const char* text_end,
263
bool default_editable)
265
// Since we have to copy the iterator anyway we can as well create the
266
// std::pair now. That saves another copy later (mind you, TextIter is
267
// a heavy struct), and allows modern compilers to apply the return value
269
std::pair<iterator,bool> pair_iter_success (pos, false);
271
pair_iter_success.second = gtk_text_buffer_insert_interactive(
272
gobj(), pair_iter_success.first.gobj(), text_begin, text_end - text_begin, default_editable);
274
return pair_iter_success;
277
bool TextBuffer::insert_interactive_at_cursor(const Glib::ustring& text, bool default_editable)
279
return gtk_text_buffer_insert_interactive_at_cursor(
280
gobj(), text.data(), text.bytes(), default_editable);
283
bool TextBuffer::insert_interactive_at_cursor(const char* text_begin, const char* text_end,
284
bool default_editable)
286
return gtk_text_buffer_insert_interactive_at_cursor(
287
gobj(), text_begin, text_end - text_begin, default_editable);
290
TextBuffer::iterator TextBuffer::insert_with_tag(const iterator& pos, const Glib::ustring& text,
291
const Glib::RefPtr<Tag>& tag)
293
// gtk_text_buffer_insert_with_tags() invalidates the iterator, but this lets us recreate it later.
294
const int offset = pos.get_offset();
296
iterator iterCopy (pos);
297
gtk_text_buffer_insert_with_tags(
298
gobj(), iterCopy.gobj(), text.data(), text.bytes(), tag->gobj(), (GtkTextTag*)0);
300
return get_iter_at_offset(offset + text.size());
303
TextBuffer::iterator TextBuffer::insert_with_tag(const iterator& pos,
304
const char* text_begin, const char* text_end,
305
const Glib::RefPtr<Tag>& tag)
307
// gtk_text_buffer_insert_with_tags() invalidates the iterator, but this lets us recreate it later.
308
const int offset = pos.get_offset();
310
iterator iterCopy (pos);
311
gtk_text_buffer_insert_with_tags(
312
gobj(), iterCopy.gobj(), text_begin, text_end - text_begin, tag->gobj(), (GtkTextTag*)0);
314
return get_iter_at_offset(offset + (text_end - text_begin));
317
TextBuffer::iterator TextBuffer::insert_with_tag(const iterator& pos, const Glib::ustring& text,
318
const Glib::ustring& tag_name)
320
// gtk_text_buffer_insert_with_tags() invalidates the iterator, but this lets us recreate it later.
321
const int offset = pos.get_offset();
323
iterator iterCopy (pos);
324
gtk_text_buffer_insert_with_tags_by_name(
325
gobj(), iterCopy.gobj(), text.data(), text.bytes(), tag_name.c_str(), (char*)0);
327
return get_iter_at_offset(offset + text.size());
330
TextBuffer::iterator TextBuffer::insert_with_tag(const iterator& pos,
331
const char* text_begin, const char* text_end,
332
const Glib::ustring& tag_name)
334
// gtk_text_buffer_insert_with_tags() invalidates the iterator, but this lets us recreate it later.
335
const int offset = pos.get_offset();
337
iterator iterCopy (pos);
338
gtk_text_buffer_insert_with_tags_by_name(
339
gobj(), iterCopy.gobj(), text_begin, text_end - text_begin, tag_name.c_str(), (char*)0);
341
return get_iter_at_offset(offset + (text_end - text_begin));
344
TextBuffer::iterator TextBuffer::insert_with_tags(const iterator& pos, const Glib::ustring& text,
345
const std::vector< Glib::RefPtr<Tag> >& tags)
347
const char *const text_begin = text.data();
348
return insert_with_tags(pos, text_begin, text_begin + text.bytes(), tags);
351
TextBuffer::iterator TextBuffer::insert_with_tags(const iterator& pos,
352
const char* text_begin, const char* text_end,
353
const std::vector< Glib::RefPtr<Tag> >& tags)
355
const int start_offset = pos.get_offset();
356
iterator range_end (insert(pos, text_begin, text_end));
358
GtkTextIter range_begin;
359
gtk_text_buffer_get_iter_at_offset(gobj(), &range_begin, start_offset);
361
Glib::ArrayHandler<Glib::RefPtr<Tag> >::ArrayKeeperType array_keeper (Glib::ArrayHandler<Glib::RefPtr<Tag> >::vector_to_array(tags));
363
//This was GtkTextTag* const * const, but the SUN Forte compiler said that it couldn't convert to that. murrayc
364
const GtkTextTag* const* tags_begin = array_keeper.data();
365
const GtkTextTag* const* tags_end = tags_begin + tags.size();
367
//TODO: Investigate if this const_cast<> is really necessary.
368
//I added it for the SUN Forte compiler. murrayc.
369
for(GtkTextTag *const * ptag = const_cast<GtkTextTag* const *>(tags_begin); ptag != const_cast<GtkTextTag* const *>(tags_end); ++ptag)
371
gtk_text_buffer_apply_tag(gobj(), *ptag, &range_begin, range_end.gobj());
377
TextBuffer::iterator TextBuffer::insert_with_tags_by_name(const iterator& pos, const Glib::ustring& text,
378
const std::vector<Glib::ustring>& tag_names)
380
const char *const text_begin = text.data();
381
return insert_with_tags_by_name(pos, text_begin, text_begin + text.bytes(), tag_names);
384
TextBuffer::iterator TextBuffer::insert_with_tags_by_name(const iterator& pos,
385
const char* text_begin, const char* text_end,
386
const std::vector<Glib::ustring>& tag_names)
388
// gtk_buffer_insert_with_tags_by_name() is a convenience wrapper, so it's kind of OK to reimplement it:
390
const int start_offset = pos.get_offset();
391
iterator range_end (insert(pos, text_begin, text_end));
393
GtkTextIter range_begin;
394
gtk_text_buffer_get_iter_at_offset(gobj(), &range_begin, start_offset);
396
GtkTextTagTable *const tag_table = gtk_text_buffer_get_tag_table(gobj());
397
Glib::ArrayHandler<Glib::ustring>::ArrayKeeperType array_keeper (Glib::ArrayHandler<Glib::ustring>::vector_to_array(tag_names));
399
const char *const *const names_begin = array_keeper.data();
400
const char *const *const names_end = names_begin + tag_names.size();
402
for(const char *const * pname = names_begin; pname != names_end; ++pname)
404
if(GtkTextTag *const tag = gtk_text_tag_table_lookup(tag_table, *pname))
406
gtk_text_buffer_apply_tag(gobj(), tag, &range_begin, range_end.gobj());
410
g_warning("Gtk::TextBuffer::insert_with_tags_by_name(): no tag with name '%s'!", *pname);
417
TextBuffer::iterator TextBuffer::insert(const iterator& pos,
418
const iterator& range_begin, const iterator& range_end)
420
iterator iterCopy (pos);
421
gtk_text_buffer_insert_range(gobj(), iterCopy.gobj(), range_begin.gobj(), range_end.gobj());
425
std::pair<TextBuffer::iterator,bool>
426
TextBuffer::insert_interactive(const iterator& pos, const iterator& range_begin,
427
const iterator& range_end, bool default_editable)
429
// Since we have to copy the iterator anyway we can as well create the
430
// std::pair now. That saves another copy later (mind you, TextIter is
431
// a heavy struct), and allows modern compilers to apply the return value
433
std::pair<iterator,bool> pair_iter_success (pos, false);
435
pair_iter_success.second = gtk_text_buffer_insert_range_interactive(
436
gobj(), pair_iter_success.first.gobj(), range_begin.gobj(), range_end.gobj(), default_editable);
438
return pair_iter_success;
441
TextBuffer::iterator TextBuffer::erase(const iterator& range_begin, const iterator& range_end)
443
// GTK+ sets the iterators to where the deletion occured. We do it the STL way and therefore need copies.
444
iterator beginCopy (range_begin);
445
iterator endCopy (range_end);
446
gtk_text_buffer_delete(gobj(), beginCopy.gobj(), endCopy.gobj());
450
TextBuffer::iterator TextBuffer::backspace(const iterator& iter, bool interactive, bool default_editable)
452
// GTK+ sets the iterators to where the deletion occured. We do it the STL way and therefore need copies.
454
gtk_text_buffer_backspace(gobj(), copy.gobj(), interactive, default_editable);
459
std::pair<TextBuffer::iterator,bool>
460
TextBuffer::erase_interactive(const iterator& range_begin, const iterator& range_end,
461
bool default_editable)
463
// Since we have to copy the iterator anyway we can as well create the
464
// std::pair now. That saves another copy later (mind you, TextIter is
465
// a heavy struct), and allows modern compilers to apply the return value
467
std::pair<iterator,bool> pair_iter_success (range_begin, false);
469
// GTK+ sets the iterators to where the deletion occured.
470
// We do it the STL way and therefore need copies.
471
iterator endCopy (range_end);
473
pair_iter_success.second = gtk_text_buffer_delete_interactive(
474
gobj(), pair_iter_success.first.gobj(), endCopy.gobj(), default_editable);
476
return pair_iter_success;
479
void TextBuffer::paste_clipboard(const Glib::RefPtr<Clipboard>& clipboard, const iterator& override_location,
480
bool default_editable)
482
gtk_text_buffer_paste_clipboard(gobj(), clipboard->gobj(),
483
const_cast<GtkTextIter*>(override_location.gobj()), default_editable);
486
void TextBuffer::paste_clipboard(const Glib::RefPtr<Clipboard>& clipboard, bool default_editable)
488
gtk_text_buffer_paste_clipboard(gobj(), clipboard->gobj(), 0, default_editable);
491
TextBuffer::iterator TextBuffer::get_iter_at_child_anchor(const Glib::RefPtr<ChildAnchor>& anchor)
494
gtk_text_buffer_get_iter_at_child_anchor(gobj(), iter.gobj(), anchor->gobj());
498
int TextBuffer::size() const
500
return get_char_count();
503
Glib::ustring TextBuffer::get_text(bool include_hidden_chars) const
505
TextBuffer* unconst = const_cast<TextBuffer*>(this); //Because begin() and end() are not const.
506
return get_text(unconst->begin(), unconst->end(), include_hidden_chars);
509
std::vector<Glib::ustring> TextBuffer::get_serialize_formats() const
512
GdkAtom* atoms = gtk_text_buffer_get_serialize_formats(const_cast<GtkTextBuffer*>(gobj()), &n_atoms);
513
return Glib::ArrayHandler<Glib::ustring, Gdk::AtomUstringTraits>::array_to_vector(atoms, n_atoms, Glib::OWNERSHIP_SHALLOW);
516
std::vector<Glib::ustring> TextBuffer::get_deserialize_formats() const
519
GdkAtom* atoms = gtk_text_buffer_get_deserialize_formats(const_cast<GtkTextBuffer*>(gobj()), &n_atoms);
520
return Glib::ArrayHandler<Glib::ustring, Gdk::AtomUstringTraits>::array_to_vector(atoms, n_atoms, Glib::OWNERSHIP_SHALLOW);
524
Glib::ustring TextBuffer::register_serialize_format(const Glib::ustring& mime_type, const SlotSerialize& slot)
526
SlotSerialize* slot_copy = new SlotSerialize(slot);
527
GdkAtom atom = gtk_text_buffer_register_serialize_format(gobj(), mime_type.c_str(),
528
&SignalProxy_Serialize, slot_copy, &SignalProxy_Serialize_gtk_callback_destroy);
530
//Convert the atom to a string:
531
Glib::ustring atom_as_string;
532
char* atom_name = gdk_atom_name(atom);
535
atom_as_string = atom_name;
539
return atom_as_string;
542
Glib::ustring TextBuffer::register_deserialize_format(const Glib::ustring& mime_type, const SlotDeserialize& slot)
544
SlotDeserialize* slot_copy = new SlotDeserialize(slot);
545
GdkAtom atom = gtk_text_buffer_register_deserialize_format(gobj(), mime_type.c_str(),
546
&SignalProxy_Deserialize, slot_copy, &SignalProxy_Deserialize_gtk_callback_destroy);
548
//Convert the atom to a string:
549
Glib::ustring atom_as_string;
550
char* atom_name = gdk_atom_name(atom);
553
atom_as_string = atom_name;
557
return atom_as_string;
567
static void TextBuffer_signal_insert_callback(GtkTextBuffer* self, GtkTextIter* p0,const gchar* p1,gint p2,void* data)
570
typedef sigc::slot< void,const TextBuffer::iterator&,const Glib::ustring&,int > SlotType;
572
// Do not try to call a signal on a disassociated wrapper.
573
if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
575
#ifdef GLIBMM_EXCEPTIONS_ENABLED
578
#endif //GLIBMM_EXCEPTIONS_ENABLED
579
if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
580
(*static_cast<SlotType*>(slot))(Glib::wrap(p0)
581
, Glib::ustring(p1, p1 + p2)
584
#ifdef GLIBMM_EXCEPTIONS_ENABLED
588
Glib::exception_handlers_invoke();
590
#endif //GLIBMM_EXCEPTIONS_ENABLED
594
static const Glib::SignalProxyInfo TextBuffer_signal_insert_info =
597
(GCallback) &TextBuffer_signal_insert_callback,
598
(GCallback) &TextBuffer_signal_insert_callback
602
static void TextBuffer_signal_insert_pixbuf_callback(GtkTextBuffer* self, GtkTextIter* p0,GdkPixbuf* p1,void* data)
605
typedef sigc::slot< void,const TextBuffer::iterator&,const Glib::RefPtr<Gdk::Pixbuf>& > SlotType;
607
// Do not try to call a signal on a disassociated wrapper.
608
if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
610
#ifdef GLIBMM_EXCEPTIONS_ENABLED
613
#endif //GLIBMM_EXCEPTIONS_ENABLED
614
if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
615
(*static_cast<SlotType*>(slot))(Glib::wrap(p0)
616
, Glib::wrap(p1, true)
618
#ifdef GLIBMM_EXCEPTIONS_ENABLED
622
Glib::exception_handlers_invoke();
624
#endif //GLIBMM_EXCEPTIONS_ENABLED
628
static const Glib::SignalProxyInfo TextBuffer_signal_insert_pixbuf_info =
631
(GCallback) &TextBuffer_signal_insert_pixbuf_callback,
632
(GCallback) &TextBuffer_signal_insert_pixbuf_callback
636
static void TextBuffer_signal_insert_child_anchor_callback(GtkTextBuffer* self, GtkTextIter* p0,GtkTextChildAnchor* p1,void* data)
639
typedef sigc::slot< void,const TextBuffer::iterator&,const Glib::RefPtr<ChildAnchor>& > SlotType;
641
// Do not try to call a signal on a disassociated wrapper.
642
if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
644
#ifdef GLIBMM_EXCEPTIONS_ENABLED
647
#endif //GLIBMM_EXCEPTIONS_ENABLED
648
if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
649
(*static_cast<SlotType*>(slot))(Glib::wrap(p0)
650
, Glib::wrap(p1, true)
652
#ifdef GLIBMM_EXCEPTIONS_ENABLED
656
Glib::exception_handlers_invoke();
658
#endif //GLIBMM_EXCEPTIONS_ENABLED
662
static const Glib::SignalProxyInfo TextBuffer_signal_insert_child_anchor_info =
664
"insert_child_anchor",
665
(GCallback) &TextBuffer_signal_insert_child_anchor_callback,
666
(GCallback) &TextBuffer_signal_insert_child_anchor_callback
670
static void TextBuffer_signal_erase_callback(GtkTextBuffer* self, GtkTextIter* p0,GtkTextIter* p1,void* data)
673
typedef sigc::slot< void,const TextBuffer::iterator&,const TextBuffer::iterator& > SlotType;
675
// Do not try to call a signal on a disassociated wrapper.
676
if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
678
#ifdef GLIBMM_EXCEPTIONS_ENABLED
681
#endif //GLIBMM_EXCEPTIONS_ENABLED
682
if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
683
(*static_cast<SlotType*>(slot))(Glib::wrap(p0)
686
#ifdef GLIBMM_EXCEPTIONS_ENABLED
690
Glib::exception_handlers_invoke();
692
#endif //GLIBMM_EXCEPTIONS_ENABLED
696
static const Glib::SignalProxyInfo TextBuffer_signal_erase_info =
699
(GCallback) &TextBuffer_signal_erase_callback,
700
(GCallback) &TextBuffer_signal_erase_callback
704
static const Glib::SignalProxyInfo TextBuffer_signal_changed_info =
707
(GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
708
(GCallback) &Glib::SignalProxyNormal::slot0_void_callback
712
static const Glib::SignalProxyInfo TextBuffer_signal_modified_changed_info =
715
(GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
716
(GCallback) &Glib::SignalProxyNormal::slot0_void_callback
720
static void TextBuffer_signal_mark_set_callback(GtkTextBuffer* self, const GtkTextIter* p0,GtkTextMark* p1,void* data)
723
typedef sigc::slot< void,const TextBuffer::iterator&,const Glib::RefPtr<TextBuffer::Mark>& > SlotType;
725
// Do not try to call a signal on a disassociated wrapper.
726
if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
728
#ifdef GLIBMM_EXCEPTIONS_ENABLED
731
#endif //GLIBMM_EXCEPTIONS_ENABLED
732
if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
733
(*static_cast<SlotType*>(slot))(Glib::wrap(p0)
734
, Glib::wrap(p1, true)
736
#ifdef GLIBMM_EXCEPTIONS_ENABLED
740
Glib::exception_handlers_invoke();
742
#endif //GLIBMM_EXCEPTIONS_ENABLED
746
static const Glib::SignalProxyInfo TextBuffer_signal_mark_set_info =
749
(GCallback) &TextBuffer_signal_mark_set_callback,
750
(GCallback) &TextBuffer_signal_mark_set_callback
754
static void TextBuffer_signal_mark_deleted_callback(GtkTextBuffer* self, GtkTextMark* p0,void* data)
757
typedef sigc::slot< void,const Glib::RefPtr<TextBuffer::Mark>& > SlotType;
759
// Do not try to call a signal on a disassociated wrapper.
760
if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
762
#ifdef GLIBMM_EXCEPTIONS_ENABLED
765
#endif //GLIBMM_EXCEPTIONS_ENABLED
766
if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
767
(*static_cast<SlotType*>(slot))(Glib::wrap(p0, true)
769
#ifdef GLIBMM_EXCEPTIONS_ENABLED
773
Glib::exception_handlers_invoke();
775
#endif //GLIBMM_EXCEPTIONS_ENABLED
779
static const Glib::SignalProxyInfo TextBuffer_signal_mark_deleted_info =
782
(GCallback) &TextBuffer_signal_mark_deleted_callback,
783
(GCallback) &TextBuffer_signal_mark_deleted_callback
787
static void TextBuffer_signal_apply_tag_callback(GtkTextBuffer* self, GtkTextTag* p0,const GtkTextIter* p1,const GtkTextIter* p2,void* data)
790
typedef sigc::slot< void,const Glib::RefPtr<TextBuffer::Tag>&,const TextBuffer::iterator&,const TextBuffer::iterator& > SlotType;
792
// Do not try to call a signal on a disassociated wrapper.
793
if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
795
#ifdef GLIBMM_EXCEPTIONS_ENABLED
798
#endif //GLIBMM_EXCEPTIONS_ENABLED
799
if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
800
(*static_cast<SlotType*>(slot))(Glib::wrap(p0, true)
804
#ifdef GLIBMM_EXCEPTIONS_ENABLED
808
Glib::exception_handlers_invoke();
810
#endif //GLIBMM_EXCEPTIONS_ENABLED
814
static const Glib::SignalProxyInfo TextBuffer_signal_apply_tag_info =
817
(GCallback) &TextBuffer_signal_apply_tag_callback,
818
(GCallback) &TextBuffer_signal_apply_tag_callback
822
static void TextBuffer_signal_remove_tag_callback(GtkTextBuffer* self, GtkTextTag* p0,const GtkTextIter* p1,const GtkTextIter* p2,void* data)
825
typedef sigc::slot< void,const Glib::RefPtr<TextBuffer::Tag>&,const TextBuffer::iterator&,const TextBuffer::iterator& > SlotType;
827
// Do not try to call a signal on a disassociated wrapper.
828
if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
830
#ifdef GLIBMM_EXCEPTIONS_ENABLED
833
#endif //GLIBMM_EXCEPTIONS_ENABLED
834
if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
835
(*static_cast<SlotType*>(slot))(Glib::wrap(p0, true)
839
#ifdef GLIBMM_EXCEPTIONS_ENABLED
843
Glib::exception_handlers_invoke();
845
#endif //GLIBMM_EXCEPTIONS_ENABLED
849
static const Glib::SignalProxyInfo TextBuffer_signal_remove_tag_info =
852
(GCallback) &TextBuffer_signal_remove_tag_callback,
853
(GCallback) &TextBuffer_signal_remove_tag_callback
857
static const Glib::SignalProxyInfo TextBuffer_signal_begin_user_action_info =
860
(GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
861
(GCallback) &Glib::SignalProxyNormal::slot0_void_callback
865
static const Glib::SignalProxyInfo TextBuffer_signal_end_user_action_info =
868
(GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
869
(GCallback) &Glib::SignalProxyNormal::slot0_void_callback
873
static void TextBuffer_signal_paste_done_callback(GtkTextBuffer* self, GtkClipboard* p0,void* data)
876
typedef sigc::slot< void,const Glib::RefPtr<Gtk::Clipboard>& > SlotType;
878
// Do not try to call a signal on a disassociated wrapper.
879
if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
881
#ifdef GLIBMM_EXCEPTIONS_ENABLED
884
#endif //GLIBMM_EXCEPTIONS_ENABLED
885
if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
886
(*static_cast<SlotType*>(slot))(Glib::wrap(p0, true)
888
#ifdef GLIBMM_EXCEPTIONS_ENABLED
892
Glib::exception_handlers_invoke();
894
#endif //GLIBMM_EXCEPTIONS_ENABLED
898
static const Glib::SignalProxyInfo TextBuffer_signal_paste_done_info =
901
(GCallback) &TextBuffer_signal_paste_done_callback,
902
(GCallback) &TextBuffer_signal_paste_done_callback
906
} // anonymous namespace
912
Glib::RefPtr<Gtk::TextBuffer> wrap(GtkTextBuffer* object, bool take_copy)
914
return Glib::RefPtr<Gtk::TextBuffer>( dynamic_cast<Gtk::TextBuffer*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
915
//We use dynamic_cast<> in case of multiple inheritance.
918
} /* namespace Glib */
925
/* The *_Class implementation: */
927
const Glib::Class& TextBuffer_Class::init()
929
if(!gtype_) // create the GType if necessary
931
// Glib::Class has to know the class init function to clone custom types.
932
class_init_func_ = &TextBuffer_Class::class_init_function;
934
// This is actually just optimized away, apparently with no harm.
935
// Make sure that the parent type has been created.
936
//CppClassParent::CppObjectType::get_type();
938
// Create the wrapper type, with the same class/instance size as the base type.
939
register_derived_type(gtk_text_buffer_get_type());
941
// Add derived versions of interfaces, if the C type implements any interfaces:
949
void TextBuffer_Class::class_init_function(void* g_class, void* class_data)
951
BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
952
CppClassParent::class_init_function(klass, class_data);
955
klass->insert_text = &insert_text_callback;
956
klass->insert_pixbuf = &insert_pixbuf_callback;
957
klass->insert_child_anchor = &insert_child_anchor_callback;
958
klass->delete_range = &delete_range_callback;
959
klass->changed = &changed_callback;
960
klass->modified_changed = &modified_changed_callback;
961
klass->mark_set = &mark_set_callback;
962
klass->mark_deleted = &mark_deleted_callback;
963
klass->apply_tag = &apply_tag_callback;
964
klass->remove_tag = &remove_tag_callback;
965
klass->begin_user_action = &begin_user_action_callback;
966
klass->end_user_action = &end_user_action_callback;
967
klass->paste_done = &paste_done_callback;
971
void TextBuffer_Class::insert_text_callback(GtkTextBuffer* self, GtkTextIter* p0, const gchar* p1, gint p2)
973
Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
974
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
976
// Non-gtkmmproc-generated custom classes implicitly call the default
977
// Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
978
// generated classes can use this optimisation, which avoids the unnecessary
979
// parameter conversions if there is no possibility of the virtual function
981
if(obj_base && obj_base->is_derived_())
983
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
984
if(obj) // This can be NULL during destruction.
986
#ifdef GLIBMM_EXCEPTIONS_ENABLED
987
try // Trap C++ exceptions which would normally be lost because this is a C callback.
989
#endif //GLIBMM_EXCEPTIONS_ENABLED
990
// Call the virtual member method, which derived classes might override.
991
obj->on_insert(Glib::wrap(p0)
992
, Glib::ustring(p1, p1 + p2)
996
#ifdef GLIBMM_EXCEPTIONS_ENABLED
1000
Glib::exception_handlers_invoke();
1002
#endif //GLIBMM_EXCEPTIONS_ENABLED
1006
BaseClassType *const base = static_cast<BaseClassType*>(
1007
g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
1010
// Call the original underlying C function:
1011
if(base && base->insert_text)
1012
(*base->insert_text)(self, p0, p1, p2);
1014
void TextBuffer_Class::insert_pixbuf_callback(GtkTextBuffer* self, GtkTextIter* p0, GdkPixbuf* p1)
1016
Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
1017
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
1019
// Non-gtkmmproc-generated custom classes implicitly call the default
1020
// Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
1021
// generated classes can use this optimisation, which avoids the unnecessary
1022
// parameter conversions if there is no possibility of the virtual function
1023
// being overridden:
1024
if(obj_base && obj_base->is_derived_())
1026
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
1027
if(obj) // This can be NULL during destruction.
1029
#ifdef GLIBMM_EXCEPTIONS_ENABLED
1030
try // Trap C++ exceptions which would normally be lost because this is a C callback.
1032
#endif //GLIBMM_EXCEPTIONS_ENABLED
1033
// Call the virtual member method, which derived classes might override.
1034
obj->on_insert_pixbuf(Glib::wrap(p0)
1035
, Glib::wrap(p1, true)
1038
#ifdef GLIBMM_EXCEPTIONS_ENABLED
1042
Glib::exception_handlers_invoke();
1044
#endif //GLIBMM_EXCEPTIONS_ENABLED
1048
BaseClassType *const base = static_cast<BaseClassType*>(
1049
g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
1052
// Call the original underlying C function:
1053
if(base && base->insert_pixbuf)
1054
(*base->insert_pixbuf)(self, p0, p1);
1056
void TextBuffer_Class::insert_child_anchor_callback(GtkTextBuffer* self, GtkTextIter* p0, GtkTextChildAnchor* p1)
1058
Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
1059
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
1061
// Non-gtkmmproc-generated custom classes implicitly call the default
1062
// Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
1063
// generated classes can use this optimisation, which avoids the unnecessary
1064
// parameter conversions if there is no possibility of the virtual function
1065
// being overridden:
1066
if(obj_base && obj_base->is_derived_())
1068
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
1069
if(obj) // This can be NULL during destruction.
1071
#ifdef GLIBMM_EXCEPTIONS_ENABLED
1072
try // Trap C++ exceptions which would normally be lost because this is a C callback.
1074
#endif //GLIBMM_EXCEPTIONS_ENABLED
1075
// Call the virtual member method, which derived classes might override.
1076
obj->on_insert_child_anchor(Glib::wrap(p0)
1077
, Glib::wrap(p1, true)
1080
#ifdef GLIBMM_EXCEPTIONS_ENABLED
1084
Glib::exception_handlers_invoke();
1086
#endif //GLIBMM_EXCEPTIONS_ENABLED
1090
BaseClassType *const base = static_cast<BaseClassType*>(
1091
g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
1094
// Call the original underlying C function:
1095
if(base && base->insert_child_anchor)
1096
(*base->insert_child_anchor)(self, p0, p1);
1098
void TextBuffer_Class::delete_range_callback(GtkTextBuffer* self, GtkTextIter* p0, GtkTextIter* p1)
1100
Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
1101
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
1103
// Non-gtkmmproc-generated custom classes implicitly call the default
1104
// Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
1105
// generated classes can use this optimisation, which avoids the unnecessary
1106
// parameter conversions if there is no possibility of the virtual function
1107
// being overridden:
1108
if(obj_base && obj_base->is_derived_())
1110
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
1111
if(obj) // This can be NULL during destruction.
1113
#ifdef GLIBMM_EXCEPTIONS_ENABLED
1114
try // Trap C++ exceptions which would normally be lost because this is a C callback.
1116
#endif //GLIBMM_EXCEPTIONS_ENABLED
1117
// Call the virtual member method, which derived classes might override.
1118
obj->on_erase(Glib::wrap(p0)
1122
#ifdef GLIBMM_EXCEPTIONS_ENABLED
1126
Glib::exception_handlers_invoke();
1128
#endif //GLIBMM_EXCEPTIONS_ENABLED
1132
BaseClassType *const base = static_cast<BaseClassType*>(
1133
g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
1136
// Call the original underlying C function:
1137
if(base && base->delete_range)
1138
(*base->delete_range)(self, p0, p1);
1140
void TextBuffer_Class::changed_callback(GtkTextBuffer* self)
1142
Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
1143
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
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_base && obj_base->is_derived_())
1152
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
1153
if(obj) // This can be NULL during destruction.
1155
#ifdef GLIBMM_EXCEPTIONS_ENABLED
1156
try // Trap C++ exceptions which would normally be lost because this is a C callback.
1158
#endif //GLIBMM_EXCEPTIONS_ENABLED
1159
// Call the virtual member method, which derived classes might override.
1162
#ifdef GLIBMM_EXCEPTIONS_ENABLED
1166
Glib::exception_handlers_invoke();
1168
#endif //GLIBMM_EXCEPTIONS_ENABLED
1172
BaseClassType *const base = static_cast<BaseClassType*>(
1173
g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
1176
// Call the original underlying C function:
1177
if(base && base->changed)
1178
(*base->changed)(self);
1180
void TextBuffer_Class::modified_changed_callback(GtkTextBuffer* self)
1182
Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
1183
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
1185
// Non-gtkmmproc-generated custom classes implicitly call the default
1186
// Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
1187
// generated classes can use this optimisation, which avoids the unnecessary
1188
// parameter conversions if there is no possibility of the virtual function
1189
// being overridden:
1190
if(obj_base && obj_base->is_derived_())
1192
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
1193
if(obj) // This can be NULL during destruction.
1195
#ifdef GLIBMM_EXCEPTIONS_ENABLED
1196
try // Trap C++ exceptions which would normally be lost because this is a C callback.
1198
#endif //GLIBMM_EXCEPTIONS_ENABLED
1199
// Call the virtual member method, which derived classes might override.
1200
obj->on_modified_changed();
1202
#ifdef GLIBMM_EXCEPTIONS_ENABLED
1206
Glib::exception_handlers_invoke();
1208
#endif //GLIBMM_EXCEPTIONS_ENABLED
1212
BaseClassType *const base = static_cast<BaseClassType*>(
1213
g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
1216
// Call the original underlying C function:
1217
if(base && base->modified_changed)
1218
(*base->modified_changed)(self);
1220
void TextBuffer_Class::mark_set_callback(GtkTextBuffer* self, const GtkTextIter* p0, GtkTextMark* p1)
1222
Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
1223
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
1225
// Non-gtkmmproc-generated custom classes implicitly call the default
1226
// Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
1227
// generated classes can use this optimisation, which avoids the unnecessary
1228
// parameter conversions if there is no possibility of the virtual function
1229
// being overridden:
1230
if(obj_base && obj_base->is_derived_())
1232
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
1233
if(obj) // This can be NULL during destruction.
1235
#ifdef GLIBMM_EXCEPTIONS_ENABLED
1236
try // Trap C++ exceptions which would normally be lost because this is a C callback.
1238
#endif //GLIBMM_EXCEPTIONS_ENABLED
1239
// Call the virtual member method, which derived classes might override.
1240
obj->on_mark_set(Glib::wrap(p0)
1241
, Glib::wrap(p1, true)
1244
#ifdef GLIBMM_EXCEPTIONS_ENABLED
1248
Glib::exception_handlers_invoke();
1250
#endif //GLIBMM_EXCEPTIONS_ENABLED
1254
BaseClassType *const base = static_cast<BaseClassType*>(
1255
g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
1258
// Call the original underlying C function:
1259
if(base && base->mark_set)
1260
(*base->mark_set)(self, p0, p1);
1262
void TextBuffer_Class::mark_deleted_callback(GtkTextBuffer* self, GtkTextMark* p0)
1264
Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
1265
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
1267
// Non-gtkmmproc-generated custom classes implicitly call the default
1268
// Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
1269
// generated classes can use this optimisation, which avoids the unnecessary
1270
// parameter conversions if there is no possibility of the virtual function
1271
// being overridden:
1272
if(obj_base && obj_base->is_derived_())
1274
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
1275
if(obj) // This can be NULL during destruction.
1277
#ifdef GLIBMM_EXCEPTIONS_ENABLED
1278
try // Trap C++ exceptions which would normally be lost because this is a C callback.
1280
#endif //GLIBMM_EXCEPTIONS_ENABLED
1281
// Call the virtual member method, which derived classes might override.
1282
obj->on_mark_deleted(Glib::wrap(p0, true)
1285
#ifdef GLIBMM_EXCEPTIONS_ENABLED
1289
Glib::exception_handlers_invoke();
1291
#endif //GLIBMM_EXCEPTIONS_ENABLED
1295
BaseClassType *const base = static_cast<BaseClassType*>(
1296
g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
1299
// Call the original underlying C function:
1300
if(base && base->mark_deleted)
1301
(*base->mark_deleted)(self, p0);
1303
void TextBuffer_Class::apply_tag_callback(GtkTextBuffer* self, GtkTextTag* p0, const GtkTextIter* p1, const GtkTextIter* p2)
1305
Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
1306
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
1308
// Non-gtkmmproc-generated custom classes implicitly call the default
1309
// Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
1310
// generated classes can use this optimisation, which avoids the unnecessary
1311
// parameter conversions if there is no possibility of the virtual function
1312
// being overridden:
1313
if(obj_base && obj_base->is_derived_())
1315
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
1316
if(obj) // This can be NULL during destruction.
1318
#ifdef GLIBMM_EXCEPTIONS_ENABLED
1319
try // Trap C++ exceptions which would normally be lost because this is a C callback.
1321
#endif //GLIBMM_EXCEPTIONS_ENABLED
1322
// Call the virtual member method, which derived classes might override.
1323
obj->on_apply_tag(Glib::wrap(p0, true)
1328
#ifdef GLIBMM_EXCEPTIONS_ENABLED
1332
Glib::exception_handlers_invoke();
1334
#endif //GLIBMM_EXCEPTIONS_ENABLED
1338
BaseClassType *const base = static_cast<BaseClassType*>(
1339
g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
1342
// Call the original underlying C function:
1343
if(base && base->apply_tag)
1344
(*base->apply_tag)(self, p0, p1, p2);
1346
void TextBuffer_Class::remove_tag_callback(GtkTextBuffer* self, GtkTextTag* p0, const GtkTextIter* p1, const GtkTextIter* p2)
1348
Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
1349
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
1351
// Non-gtkmmproc-generated custom classes implicitly call the default
1352
// Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
1353
// generated classes can use this optimisation, which avoids the unnecessary
1354
// parameter conversions if there is no possibility of the virtual function
1355
// being overridden:
1356
if(obj_base && obj_base->is_derived_())
1358
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
1359
if(obj) // This can be NULL during destruction.
1361
#ifdef GLIBMM_EXCEPTIONS_ENABLED
1362
try // Trap C++ exceptions which would normally be lost because this is a C callback.
1364
#endif //GLIBMM_EXCEPTIONS_ENABLED
1365
// Call the virtual member method, which derived classes might override.
1366
obj->on_remove_tag(Glib::wrap(p0, true)
1371
#ifdef GLIBMM_EXCEPTIONS_ENABLED
1375
Glib::exception_handlers_invoke();
1377
#endif //GLIBMM_EXCEPTIONS_ENABLED
1381
BaseClassType *const base = static_cast<BaseClassType*>(
1382
g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
1385
// Call the original underlying C function:
1386
if(base && base->remove_tag)
1387
(*base->remove_tag)(self, p0, p1, p2);
1389
void TextBuffer_Class::begin_user_action_callback(GtkTextBuffer* self)
1391
Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
1392
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
1394
// Non-gtkmmproc-generated custom classes implicitly call the default
1395
// Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
1396
// generated classes can use this optimisation, which avoids the unnecessary
1397
// parameter conversions if there is no possibility of the virtual function
1398
// being overridden:
1399
if(obj_base && obj_base->is_derived_())
1401
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
1402
if(obj) // This can be NULL during destruction.
1404
#ifdef GLIBMM_EXCEPTIONS_ENABLED
1405
try // Trap C++ exceptions which would normally be lost because this is a C callback.
1407
#endif //GLIBMM_EXCEPTIONS_ENABLED
1408
// Call the virtual member method, which derived classes might override.
1409
obj->on_begin_user_action();
1411
#ifdef GLIBMM_EXCEPTIONS_ENABLED
1415
Glib::exception_handlers_invoke();
1417
#endif //GLIBMM_EXCEPTIONS_ENABLED
1421
BaseClassType *const base = static_cast<BaseClassType*>(
1422
g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
1425
// Call the original underlying C function:
1426
if(base && base->begin_user_action)
1427
(*base->begin_user_action)(self);
1429
void TextBuffer_Class::end_user_action_callback(GtkTextBuffer* self)
1431
Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
1432
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
1434
// Non-gtkmmproc-generated custom classes implicitly call the default
1435
// Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
1436
// generated classes can use this optimisation, which avoids the unnecessary
1437
// parameter conversions if there is no possibility of the virtual function
1438
// being overridden:
1439
if(obj_base && obj_base->is_derived_())
1441
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
1442
if(obj) // This can be NULL during destruction.
1444
#ifdef GLIBMM_EXCEPTIONS_ENABLED
1445
try // Trap C++ exceptions which would normally be lost because this is a C callback.
1447
#endif //GLIBMM_EXCEPTIONS_ENABLED
1448
// Call the virtual member method, which derived classes might override.
1449
obj->on_end_user_action();
1451
#ifdef GLIBMM_EXCEPTIONS_ENABLED
1455
Glib::exception_handlers_invoke();
1457
#endif //GLIBMM_EXCEPTIONS_ENABLED
1461
BaseClassType *const base = static_cast<BaseClassType*>(
1462
g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
1465
// Call the original underlying C function:
1466
if(base && base->end_user_action)
1467
(*base->end_user_action)(self);
1469
void TextBuffer_Class::paste_done_callback(GtkTextBuffer* self, GtkClipboard* p0)
1471
Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
1472
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
1474
// Non-gtkmmproc-generated custom classes implicitly call the default
1475
// Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
1476
// generated classes can use this optimisation, which avoids the unnecessary
1477
// parameter conversions if there is no possibility of the virtual function
1478
// being overridden:
1479
if(obj_base && obj_base->is_derived_())
1481
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
1482
if(obj) // This can be NULL during destruction.
1484
#ifdef GLIBMM_EXCEPTIONS_ENABLED
1485
try // Trap C++ exceptions which would normally be lost because this is a C callback.
1487
#endif //GLIBMM_EXCEPTIONS_ENABLED
1488
// Call the virtual member method, which derived classes might override.
1489
obj->on_paste_done(Glib::wrap(p0, true)
1492
#ifdef GLIBMM_EXCEPTIONS_ENABLED
1496
Glib::exception_handlers_invoke();
1498
#endif //GLIBMM_EXCEPTIONS_ENABLED
1502
BaseClassType *const base = static_cast<BaseClassType*>(
1503
g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
1506
// Call the original underlying C function:
1507
if(base && base->paste_done)
1508
(*base->paste_done)(self, p0);
1512
Glib::ObjectBase* TextBuffer_Class::wrap_new(GObject* object)
1514
return new TextBuffer((GtkTextBuffer*)object);
1518
/* The implementation: */
1520
GtkTextBuffer* TextBuffer::gobj_copy()
1526
TextBuffer::TextBuffer(const Glib::ConstructParams& construct_params)
1528
Glib::Object(construct_params)
1533
TextBuffer::TextBuffer(GtkTextBuffer* castitem)
1535
Glib::Object((GObject*)(castitem))
1539
TextBuffer::~TextBuffer()
1543
TextBuffer::CppClassType TextBuffer::textbuffer_class_; // initialize static member
1545
GType TextBuffer::get_type()
1547
return textbuffer_class_.init().get_type();
1551
GType TextBuffer::get_base_type()
1553
return gtk_text_buffer_get_type();
1557
TextBuffer::TextBuffer()
1559
// Mark this class as non-derived to allow C++ vfuncs to be skipped.
1560
Glib::ObjectBase(0),
1561
Glib::Object(Glib::ConstructParams(textbuffer_class_.init()))
1567
Glib::RefPtr<TextBuffer> TextBuffer::create()
1569
return Glib::RefPtr<TextBuffer>( new TextBuffer() );
1571
Glib::RefPtr<TextBuffer> TextBuffer::create(const Glib::RefPtr<TagTable>& tag_table)
1573
return Glib::RefPtr<TextBuffer>( new TextBuffer(tag_table) );
1575
int TextBuffer::get_line_count() const
1577
return gtk_text_buffer_get_line_count(const_cast<GtkTextBuffer*>(gobj()));
1580
int TextBuffer::get_char_count() const
1582
return gtk_text_buffer_get_char_count(const_cast<GtkTextBuffer*>(gobj()));
1585
Glib::RefPtr<TextBuffer::TagTable> TextBuffer::get_tag_table()
1588
Glib::RefPtr<TextBuffer::TagTable> retvalue = Glib::wrap(gtk_text_buffer_get_tag_table(gobj()));
1590
retvalue->reference(); //The function does not do a ref for us.
1595
Glib::RefPtr<const TextBuffer::TagTable> TextBuffer::get_tag_table() const
1597
return const_cast<TextBuffer*>(this)->get_tag_table();
1600
Glib::ustring TextBuffer::get_text(const iterator& start, const iterator& end, bool include_hidden_chars) const
1602
return Glib::convert_return_gchar_ptr_to_ustring(gtk_text_buffer_get_text(const_cast<GtkTextBuffer*>(gobj()), (start).gobj(), (end).gobj(), static_cast<int>(include_hidden_chars)));
1605
Glib::ustring TextBuffer::get_slice(const iterator& start, const iterator& end, bool include_hidden_chars) const
1607
return Glib::convert_return_gchar_ptr_to_ustring(gtk_text_buffer_get_slice(const_cast<GtkTextBuffer*>(gobj()), (start).gobj(), (end).gobj(), static_cast<int>(include_hidden_chars)));
1610
void TextBuffer::add_mark(const Glib::RefPtr<TextBuffer::Mark>& mark, const iterator& where)
1612
gtk_text_buffer_add_mark(gobj(), Glib::unwrap(mark), (where).gobj());
1615
Glib::RefPtr<TextBuffer::Mark> TextBuffer::create_mark(const Glib::ustring& mark_name, const iterator& where, bool left_gravity)
1618
Glib::RefPtr<TextBuffer::Mark> retvalue = Glib::wrap(gtk_text_buffer_create_mark(gobj(), mark_name.c_str(), (where).gobj(), static_cast<int>(left_gravity)));
1620
retvalue->reference(); //The function does not do a ref for us.
1625
void TextBuffer::move_mark(const Glib::RefPtr<Mark>& mark, const iterator& where)
1627
gtk_text_buffer_move_mark(gobj(), Glib::unwrap(mark), (where).gobj());
1630
void TextBuffer::delete_mark(const Glib::RefPtr<Mark>& mark)
1632
gtk_text_buffer_delete_mark(gobj(), Glib::unwrap(mark));
1635
Glib::RefPtr<TextBuffer::Mark> TextBuffer::get_mark(const Glib::ustring& name)
1638
Glib::RefPtr<TextBuffer::Mark> retvalue = Glib::wrap(gtk_text_buffer_get_mark(gobj(), name.c_str()));
1640
retvalue->reference(); //The function does not do a ref for us.
1645
Glib::RefPtr<const TextBuffer::Mark> TextBuffer::get_mark(const Glib::ustring& name) const
1647
return const_cast<TextBuffer*>(this)->get_mark(name);
1650
void TextBuffer::move_mark_by_name(const Glib::ustring& name, const iterator& where)
1652
gtk_text_buffer_move_mark_by_name(gobj(), name.c_str(), (where).gobj());
1655
void TextBuffer::delete_mark_by_name(const Glib::ustring& name)
1657
gtk_text_buffer_delete_mark_by_name(gobj(), name.c_str());
1660
Glib::RefPtr<TextBuffer::Mark> TextBuffer::get_insert()
1663
Glib::RefPtr<TextBuffer::Mark> retvalue = Glib::wrap(gtk_text_buffer_get_insert(gobj()));
1665
retvalue->reference(); //The function does not do a ref for us.
1670
Glib::RefPtr<TextBuffer::Mark> TextBuffer::get_selection_bound()
1673
Glib::RefPtr<TextBuffer::Mark> retvalue = Glib::wrap(gtk_text_buffer_get_selection_bound(gobj()));
1675
retvalue->reference(); //The function does not do a ref for us.
1680
void TextBuffer::place_cursor(const iterator& where)
1682
gtk_text_buffer_place_cursor(gobj(), (where).gobj());
1685
void TextBuffer::apply_tag(const Glib::RefPtr<Tag>& tag, const iterator& start, const iterator& end)
1687
gtk_text_buffer_apply_tag(gobj(), Glib::unwrap(tag), (start).gobj(), (end).gobj());
1690
void TextBuffer::remove_tag(const Glib::RefPtr<Tag>& tag, const iterator& start, const iterator& end)
1692
gtk_text_buffer_remove_tag(gobj(), Glib::unwrap(tag), (start).gobj(), (end).gobj());
1695
void TextBuffer::apply_tag_by_name(const Glib::ustring& name, const iterator& start, const iterator& end)
1697
gtk_text_buffer_apply_tag_by_name(gobj(), name.c_str(), (start).gobj(), (end).gobj());
1700
void TextBuffer::remove_tag_by_name(const Glib::ustring& name, const iterator& start, const iterator& end)
1702
gtk_text_buffer_remove_tag_by_name(gobj(), name.c_str(), (start).gobj(), (end).gobj());
1705
void TextBuffer::remove_all_tags(const iterator& start, const iterator& end)
1707
gtk_text_buffer_remove_all_tags(gobj(), (start).gobj(), (end).gobj());
1710
bool TextBuffer::get_modified() const
1712
return gtk_text_buffer_get_modified(const_cast<GtkTextBuffer*>(gobj()));
1715
void TextBuffer::set_modified(bool setting)
1717
gtk_text_buffer_set_modified(gobj(), static_cast<int>(setting));
1720
bool TextBuffer::get_has_selection() const
1722
return gtk_text_buffer_get_has_selection(const_cast<GtkTextBuffer*>(gobj()));
1725
void TextBuffer::add_selection_clipboard(const Glib::RefPtr<Clipboard>& clipboard)
1727
gtk_text_buffer_add_selection_clipboard(gobj(), Glib::unwrap(clipboard));
1730
void TextBuffer::remove_selection_clipboard(const Glib::RefPtr<Clipboard>& clipboard)
1732
gtk_text_buffer_remove_selection_clipboard(gobj(), Glib::unwrap(clipboard));
1735
void TextBuffer::cut_clipboard(const Glib::RefPtr<Clipboard>& clipboard, bool default_editable)
1737
gtk_text_buffer_cut_clipboard(gobj(), Glib::unwrap(clipboard), static_cast<int>(default_editable));
1740
void TextBuffer::copy_clipboard(const Glib::RefPtr<Clipboard>& clipboard)
1742
gtk_text_buffer_copy_clipboard(gobj(), Glib::unwrap(clipboard));
1745
bool TextBuffer::get_selection_bounds(iterator& start, iterator& end) const
1747
return gtk_text_buffer_get_selection_bounds(const_cast<GtkTextBuffer*>(gobj()), (start).gobj(), (end).gobj());
1750
bool TextBuffer::erase_selection(bool interactive, bool default_editable)
1752
return gtk_text_buffer_delete_selection(gobj(), static_cast<int>(interactive), static_cast<int>(default_editable));
1755
void TextBuffer::select_range(const iterator& ins, const iterator& bound)
1757
gtk_text_buffer_select_range(gobj(), (ins).gobj(), (bound).gobj());
1760
void TextBuffer::begin_user_action()
1762
gtk_text_buffer_begin_user_action(gobj());
1765
void TextBuffer::end_user_action()
1767
gtk_text_buffer_end_user_action(gobj());
1770
Glib::RefPtr<TargetList> TextBuffer::get_copy_target_list() const
1773
Glib::RefPtr<TargetList> retvalue = Glib::wrap(gtk_text_buffer_get_copy_target_list(const_cast<GtkTextBuffer*>(gobj())));
1775
retvalue->reference(); //The function does not do a ref for us.
1780
Glib::RefPtr<TargetList> TextBuffer::get_paste_target_list() const
1783
Glib::RefPtr<TargetList> retvalue = Glib::wrap(gtk_text_buffer_get_paste_target_list(const_cast<GtkTextBuffer*>(gobj())));
1785
retvalue->reference(); //The function does not do a ref for us.
1790
Glib::ustring TextBuffer::register_serialize_tagset(const Glib::ustring& tagset_name)
1792
return Gdk::AtomString::to_cpp_type(gtk_text_buffer_register_serialize_tagset(gobj(), tagset_name.c_str()));
1795
Glib::ustring TextBuffer::register_deserialize_tagset(const Glib::ustring& tagset_name)
1797
return Gdk::AtomString::to_cpp_type(gtk_text_buffer_register_deserialize_tagset(gobj(), tagset_name.c_str()));
1800
void TextBuffer::unregister_serialize_format(const Glib::ustring& format)
1802
gtk_text_buffer_unregister_serialize_format(gobj(), Gdk::AtomString::to_c_type(format));
1805
void TextBuffer::unregister_deserialize_format(const Glib::ustring& format)
1807
gtk_text_buffer_unregister_deserialize_format(gobj(), Gdk::AtomString::to_c_type(format));
1810
void TextBuffer::set_can_create_tags(const Glib::ustring& format, bool can_create_tags)
1812
gtk_text_buffer_deserialize_set_can_create_tags(gobj(), Gdk::AtomString::to_c_type(format), static_cast<int>(can_create_tags));
1815
bool TextBuffer::get_can_create_tags(const Glib::ustring& format) const
1817
return gtk_text_buffer_deserialize_get_can_create_tags(const_cast<GtkTextBuffer*>(gobj()), Gdk::AtomString::to_c_type(format));
1821
Glib::SignalProxy3< void,const TextBuffer::iterator&,const Glib::ustring&,int > TextBuffer::signal_insert()
1823
return Glib::SignalProxy3< void,const TextBuffer::iterator&,const Glib::ustring&,int >(this, &TextBuffer_signal_insert_info);
1827
Glib::SignalProxy2< void,const TextBuffer::iterator&,const Glib::RefPtr<Gdk::Pixbuf>& > TextBuffer::signal_insert_pixbuf()
1829
return Glib::SignalProxy2< void,const TextBuffer::iterator&,const Glib::RefPtr<Gdk::Pixbuf>& >(this, &TextBuffer_signal_insert_pixbuf_info);
1833
Glib::SignalProxy2< void,const TextBuffer::iterator&,const Glib::RefPtr<ChildAnchor>& > TextBuffer::signal_insert_child_anchor()
1835
return Glib::SignalProxy2< void,const TextBuffer::iterator&,const Glib::RefPtr<ChildAnchor>& >(this, &TextBuffer_signal_insert_child_anchor_info);
1839
Glib::SignalProxy2< void,const TextBuffer::iterator&,const TextBuffer::iterator& > TextBuffer::signal_erase()
1841
return Glib::SignalProxy2< void,const TextBuffer::iterator&,const TextBuffer::iterator& >(this, &TextBuffer_signal_erase_info);
1845
Glib::SignalProxy0< void > TextBuffer::signal_changed()
1847
return Glib::SignalProxy0< void >(this, &TextBuffer_signal_changed_info);
1851
Glib::SignalProxy0< void > TextBuffer::signal_modified_changed()
1853
return Glib::SignalProxy0< void >(this, &TextBuffer_signal_modified_changed_info);
1857
Glib::SignalProxy2< void,const TextBuffer::iterator&,const Glib::RefPtr<TextBuffer::Mark>& > TextBuffer::signal_mark_set()
1859
return Glib::SignalProxy2< void,const TextBuffer::iterator&,const Glib::RefPtr<TextBuffer::Mark>& >(this, &TextBuffer_signal_mark_set_info);
1863
Glib::SignalProxy1< void,const Glib::RefPtr<TextBuffer::Mark>& > TextBuffer::signal_mark_deleted()
1865
return Glib::SignalProxy1< void,const Glib::RefPtr<TextBuffer::Mark>& >(this, &TextBuffer_signal_mark_deleted_info);
1869
Glib::SignalProxy3< void,const Glib::RefPtr<TextBuffer::Tag>&,const TextBuffer::iterator&,const TextBuffer::iterator& > TextBuffer::signal_apply_tag()
1871
return Glib::SignalProxy3< void,const Glib::RefPtr<TextBuffer::Tag>&,const TextBuffer::iterator&,const TextBuffer::iterator& >(this, &TextBuffer_signal_apply_tag_info);
1875
Glib::SignalProxy3< void,const Glib::RefPtr<TextBuffer::Tag>&,const TextBuffer::iterator&,const TextBuffer::iterator& > TextBuffer::signal_remove_tag()
1877
return Glib::SignalProxy3< void,const Glib::RefPtr<TextBuffer::Tag>&,const TextBuffer::iterator&,const TextBuffer::iterator& >(this, &TextBuffer_signal_remove_tag_info);
1881
Glib::SignalProxy0< void > TextBuffer::signal_begin_user_action()
1883
return Glib::SignalProxy0< void >(this, &TextBuffer_signal_begin_user_action_info);
1887
Glib::SignalProxy0< void > TextBuffer::signal_end_user_action()
1889
return Glib::SignalProxy0< void >(this, &TextBuffer_signal_end_user_action_info);
1893
Glib::SignalProxy1< void,const Glib::RefPtr<Gtk::Clipboard>& > TextBuffer::signal_paste_done()
1895
return Glib::SignalProxy1< void,const Glib::RefPtr<Gtk::Clipboard>& >(this, &TextBuffer_signal_paste_done_info);
1899
#ifdef GLIBMM_PROPERTIES_ENABLED
1900
Glib::PropertyProxy_ReadOnly< Glib::RefPtr<TextBuffer::TagTable> > TextBuffer::property_tag_table() const
1902
return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<TextBuffer::TagTable> >(this, "tag-table");
1904
#endif //GLIBMM_PROPERTIES_ENABLED
1906
#ifdef GLIBMM_PROPERTIES_ENABLED
1907
Glib::PropertyProxy<Glib::ustring> TextBuffer::property_text()
1909
return Glib::PropertyProxy<Glib::ustring>(this, "text");
1911
#endif //GLIBMM_PROPERTIES_ENABLED
1913
#ifdef GLIBMM_PROPERTIES_ENABLED
1914
Glib::PropertyProxy_ReadOnly<Glib::ustring> TextBuffer::property_text() const
1916
return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "text");
1918
#endif //GLIBMM_PROPERTIES_ENABLED
1920
#ifdef GLIBMM_PROPERTIES_ENABLED
1921
Glib::PropertyProxy_ReadOnly<bool> TextBuffer::property_has_selection() const
1923
return Glib::PropertyProxy_ReadOnly<bool>(this, "has-selection");
1925
#endif //GLIBMM_PROPERTIES_ENABLED
1927
#ifdef GLIBMM_PROPERTIES_ENABLED
1928
Glib::PropertyProxy_ReadOnly<int> TextBuffer::property_cursor_position() const
1930
return Glib::PropertyProxy_ReadOnly<int>(this, "cursor-position");
1932
#endif //GLIBMM_PROPERTIES_ENABLED
1935
void Gtk::TextBuffer::on_insert(const TextBuffer::iterator& pos, const Glib::ustring& text, int bytes)
1937
BaseClassType *const base = static_cast<BaseClassType*>(
1938
g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
1941
if(base && base->insert_text)
1942
(*base->insert_text)(gobj(),const_cast<GtkTextIter*>((pos).gobj()),text.c_str(),bytes);
1944
void Gtk::TextBuffer::on_insert_pixbuf(const TextBuffer::iterator& pos, const Glib::RefPtr<Gdk::Pixbuf>& pixbuf)
1946
BaseClassType *const base = static_cast<BaseClassType*>(
1947
g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
1950
if(base && base->insert_pixbuf)
1951
(*base->insert_pixbuf)(gobj(),const_cast<GtkTextIter*>((pos).gobj()),Glib::unwrap(pixbuf));
1953
void Gtk::TextBuffer::on_insert_child_anchor(const TextBuffer::iterator& pos, const Glib::RefPtr<ChildAnchor>& anchor)
1955
BaseClassType *const base = static_cast<BaseClassType*>(
1956
g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
1959
if(base && base->insert_child_anchor)
1960
(*base->insert_child_anchor)(gobj(),const_cast<GtkTextIter*>((pos).gobj()),Glib::unwrap(anchor));
1962
void Gtk::TextBuffer::on_erase(const TextBuffer::iterator& start, const TextBuffer::iterator& end)
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).
1968
if(base && base->delete_range)
1969
(*base->delete_range)(gobj(),const_cast<GtkTextIter*>((start).gobj()),const_cast<GtkTextIter*>((end).gobj()));
1971
void Gtk::TextBuffer::on_changed()
1973
BaseClassType *const base = static_cast<BaseClassType*>(
1974
g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
1977
if(base && base->changed)
1978
(*base->changed)(gobj());
1980
void Gtk::TextBuffer::on_modified_changed()
1982
BaseClassType *const base = static_cast<BaseClassType*>(
1983
g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
1986
if(base && base->modified_changed)
1987
(*base->modified_changed)(gobj());
1989
void Gtk::TextBuffer::on_mark_set(const TextBuffer::iterator& location, const Glib::RefPtr<TextBuffer::Mark>& mark)
1991
BaseClassType *const base = static_cast<BaseClassType*>(
1992
g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
1995
if(base && base->mark_set)
1996
(*base->mark_set)(gobj(),(location).gobj(),Glib::unwrap(mark));
1998
void Gtk::TextBuffer::on_mark_deleted(const Glib::RefPtr<TextBuffer::Mark>& mark)
2000
BaseClassType *const base = static_cast<BaseClassType*>(
2001
g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
2004
if(base && base->mark_deleted)
2005
(*base->mark_deleted)(gobj(),Glib::unwrap(mark));
2007
void Gtk::TextBuffer::on_apply_tag(const Glib::RefPtr<TextBuffer::Tag>& tag, const TextBuffer::iterator& range_begin, const TextBuffer::iterator& range_end)
2009
BaseClassType *const base = static_cast<BaseClassType*>(
2010
g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
2013
if(base && base->apply_tag)
2014
(*base->apply_tag)(gobj(),Glib::unwrap(tag),(range_begin).gobj(),(range_end).gobj());
2016
void Gtk::TextBuffer::on_remove_tag(const Glib::RefPtr<TextBuffer::Tag>& tag, const TextBuffer::iterator& range_begin, const TextBuffer::iterator& range_end)
2018
BaseClassType *const base = static_cast<BaseClassType*>(
2019
g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
2022
if(base && base->remove_tag)
2023
(*base->remove_tag)(gobj(),Glib::unwrap(tag),(range_begin).gobj(),(range_end).gobj());
2025
void Gtk::TextBuffer::on_begin_user_action()
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).
2031
if(base && base->begin_user_action)
2032
(*base->begin_user_action)(gobj());
2034
void Gtk::TextBuffer::on_end_user_action()
2036
BaseClassType *const base = static_cast<BaseClassType*>(
2037
g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
2040
if(base && base->end_user_action)
2041
(*base->end_user_action)(gobj());
2043
void Gtk::TextBuffer::on_paste_done(const Glib::RefPtr<Gtk::Clipboard>& clipboard)
2045
BaseClassType *const base = static_cast<BaseClassType*>(
2046
g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
2049
if(base && base->paste_done)
2050
(*base->paste_done)(gobj(),Glib::unwrap(clipboard));