2
// Generated by gtkmmproc -- DO NOT MODIFY!
3
#ifndef _GTKMM_TEXTTAGTABLE_H
4
#define _GTKMM_TEXTTAGTABLE_H
12
* Copyright (C) 1998-2002 The gtkmm Development Team
14
* This library is free software; you can redistribute it and/or
15
* modify it under the terms of the GNU Library General Public
16
* License as published by the Free Software Foundation; either
17
* version 2 of the License, or (at your option) any later version.
19
* This library is distributed in the hope that it will be useful,
20
* but WITHOUT ANY WARRANTY; without even the implied warranty of
21
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22
* Library General Public License for more details.
24
* You should have received a copy of the GNU Library General Public
25
* License along with this library; if not, write to the Free
26
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
29
#include <gtkmm/object.h>
30
#include <gtkmm/texttag.h>
33
#ifndef DOXYGEN_SHOULD_SKIP_THIS
34
typedef struct _GtkTextTagTable GtkTextTagTable;
35
typedef struct _GtkTextTagTableClass GtkTextTagTableClass;
36
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
40
{ class TextTagTable_Class; } // namespace Gtk
46
/** Typedefed as Gtk::TextBuffer::TagTable. A Collection of @link Gtk::TextTag Gtk::TextBuffer::Tags@endlink that can be used together.
48
* A tag table defines a set of @link Gtk::TextTag Gtk::TextBuffer::Tags@endlink that can be used together. Each buffer has one tag
49
* table associated with it; only tags from that tag table can be used with the buffer. A single tag table can be shared between
50
* multiple buffers, however.
55
class TextTagTable : public Glib::Object
58
#ifndef DOXYGEN_SHOULD_SKIP_THIS
61
typedef TextTagTable CppObjectType;
62
typedef TextTagTable_Class CppClassType;
63
typedef GtkTextTagTable BaseObjectType;
64
typedef GtkTextTagTableClass BaseClassType;
66
private: friend class TextTagTable_Class;
67
static CppClassType texttagtable_class_;
71
TextTagTable(const TextTagTable&);
72
TextTagTable& operator=(const TextTagTable&);
75
explicit TextTagTable(const Glib::ConstructParams& construct_params);
76
explicit TextTagTable(GtkTextTagTable* castitem);
78
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
81
virtual ~TextTagTable();
83
#ifndef DOXYGEN_SHOULD_SKIP_THIS
84
static GType get_type() G_GNUC_CONST;
85
static GType get_base_type() G_GNUC_CONST;
88
///Provides access to the underlying C GObject.
89
GtkTextTagTable* gobj() { return reinterpret_cast<GtkTextTagTable*>(gobject_); }
91
///Provides access to the underlying C GObject.
92
const GtkTextTagTable* gobj() const { return reinterpret_cast<GtkTextTagTable*>(gobject_); }
94
///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
95
GtkTextTagTable* gobj_copy();
105
static Glib::RefPtr<TextTagTable> create();
108
/** Add a tag to the table. The tag is assigned the highest priority
111
* @a tag must not be in a tag table already, and may not have
112
* the same name as an already-added tag.
113
* @param tag A Gtk::TextTag.
115
void add(const Glib::RefPtr<TextTag>& tag);
117
/** Remove a tag from the table. This will remove the table's
118
* reference to the tag, so be careful - the tag will end
119
* up destroyed if you don't have a reference to it.
120
* @param tag A Gtk::TextTag.
122
void remove(const Glib::RefPtr<TextTag>& tag);
124
/** Look up a named tag.
125
* @param name Name of a tag.
126
* @return The tag, or <tt>0</tt> if none by that name is in the table.
128
Glib::RefPtr<TextTag> lookup(const Glib::ustring& name);
130
/** Look up a named tag.
131
* @param name Name of a tag.
132
* @return The tag, or <tt>0</tt> if none by that name is in the table.
134
Glib::RefPtr<const TextTag> lookup(const Glib::ustring& name) const;
136
typedef sigc::slot<void, const Glib::RefPtr<TextTag>&> SlotForEach;
137
void foreach(const SlotForEach& slot);
140
/** Returns the size of the table (number of tags)
141
* @return Number of tags in @a table .
143
int get_size() const;
146
Glib::SignalProxy2< void,const Glib::RefPtr<TextTag>&,bool > signal_tag_changed();
149
Glib::SignalProxy1< void,const Glib::RefPtr<TextTag>& > signal_tag_added();
152
Glib::SignalProxy1< void,const Glib::RefPtr<TextTag>& > signal_tag_removed();
158
//C++ methods used to invoke GTK+ virtual functions:
161
//GTK+ Virtual Functions (override these to change behaviour):
163
//Default Signal Handlers::
164
virtual void on_tag_changed(const Glib::RefPtr<TextTag>& tag, bool size_changed);
165
virtual void on_tag_added(const Glib::RefPtr<TextTag>& tag);
166
virtual void on_tag_removed(const Glib::RefPtr<TextTag>& tag);
171
} /* namespace Gtk */
176
/** @relates Gtk::TextTagTable
177
* @param object The C instance
178
* @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
179
* @result A C++ instance that wraps this C instance.
181
Glib::RefPtr<Gtk::TextTagTable> wrap(GtkTextTagTable* object, bool take_copy = false);
185
#endif /* _GTKMM_TEXTTAGTABLE_H */