Debian Codegraph @

gtk/src/texttagtable.hg

raw
1 /* Copyright (C) 1998-2002 The gtkmm Development Team
2 *
3 * This library is free software; you can redistribute it and/or
4 * modify it under the terms of the GNU Lesser General Public
5 * License as published by the Free Software Foundation; either
6 * version 2.1 of the License, or (at your option) any later version.
7 *
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public
14 * License along with this library; if not, see <https://www.gnu.org/licenses/>.
15 */
16
17 #include <glibmm/object.h>
18 #include <gtkmm/texttag.h>
19
20 _DEFS(gtkmm,gtk)
21 _PINCLUDE(glibmm/private/object_p.h)
22
23 namespace Gtk
24 {
25
26 class GTKMM_API TextTag;
27
28 /** Typedefed as Gtk::TextBuffer::TagTable. A Collection of @link Gtk::TextTag Gtk::TextBuffer::Tags@endlink that can be used together.
29 *
30 * A tag table defines a set of @link Gtk::TextTag Gtk::TextBuffer::Tags@endlink that can be used together. Each buffer has one tag
31 * table associated with it; only tags from that tag table can be used with the buffer. A single tag table can be shared between
32 * multiple buffers, however.
33 *
34 * @ingroup TextView
35 */
36 class GTKMM_API TextTagTable : public Glib::Object
37 {
38 _CLASS_GOBJECT(TextTagTable, GtkTextTagTable, GTK_TEXT_TAG_TABLE, Glib::Object, GObject, , , GTKMM_API)
39 protected:
40
41 _CTOR_DEFAULT
42
43 public:
44 _WRAP_CREATE()
45
46 _WRAP_METHOD(void add(const Glib::RefPtr<TextTag>& tag), gtk_text_tag_table_add)
47 _WRAP_METHOD(void remove(const Glib::RefPtr<TextTag>& tag), gtk_text_tag_table_remove)
48 _WRAP_METHOD(Glib::RefPtr<TextTag> lookup(const Glib::ustring& name), gtk_text_tag_table_lookup, refreturn)
49 _WRAP_METHOD(Glib::RefPtr<const TextTag> lookup(const Glib::ustring& name) const, gtk_text_tag_table_lookup, refreturn, constversion)
50
51 typedef sigc::slot<void, const Glib::RefPtr<TextTag>&> SlotForEach;
52 void foreach(const SlotForEach& slot);
53 _IGNORE(gtk_text_tag_table_foreach)
54
55 _WRAP_METHOD(int get_size() const, gtk_text_tag_table_get_size)
56
57 _CONVERSION(`GtkTextTag*',`const Glib::RefPtr<TextTag>&',`Glib::wrap($3, true)')
58 _WRAP_SIGNAL(void tag_changed(const Glib::RefPtr<TextTag>& tag, bool size_changed), "tag_changed")
59
60 _WRAP_SIGNAL(void tag_added(const Glib::RefPtr<TextTag>& tag), "tag_added")
61 _WRAP_SIGNAL(void tag_removed(const Glib::RefPtr<TextTag>& tag), "tag_removed")
62
63 };
64
65 } //namespace Gtk