Collects the tags in a GtkTextBuffer.
You may wish to begin by reading the text widget conceptual overview, which gives an overview of all the objects and data types related to the text widget and how they work together.
# GtkTextTagTables as GtkBuildable
The GtkTextTagTable implementation of the GtkBuildable interface supports adding tags by specifying "tag" as the "type" attribute of a <child> element.
An example of a UI definition fragment specifying tags: xml <object class="GtkTextTagTable"> <child type="tag"> <object class="GtkTextTag"/> </child> </object>
function "+"
(Widget : access Gtk_Text_Tag_Table_Record'Class)
return Gtk.Buildable.Gtk_Buildable
function "-"
(Interf : Gtk.Buildable.Gtk_Buildable)
return Gtk_Text_Tag_Table
function Add
(Table : not null access Gtk_Text_Tag_Table_Record;
Tag : not null access Gtk.Text_Tag.Gtk_Text_Tag_Record'Class)
return Boolean
Add a tag to the table. The tag is assigned the highest priority in the table. Tag must not be in a tag table already, and may not have the same name as an already-added tag.
a GtkTextTag
True on success.
type Cb_GObject_Gtk_Text_Tag_Boolean_Void is not null access procedure
(Self : access Glib.Object.GObject_Record'Class;
Tag : not null access Gtk.Text_Tag.Gtk_Text_Tag_Record'Class;
Size_Changed : Boolean);
type Cb_GObject_Gtk_Text_Tag_Void is not null access procedure
(Self : access Glib.Object.GObject_Record'Class;
Tag : not null access Gtk.Text_Tag.Gtk_Text_Tag_Record'Class);
type Cb_Gtk_Text_Tag_Table_Gtk_Text_Tag_Boolean_Void is not null access procedure
(Self : access Gtk_Text_Tag_Table_Record'Class;
Tag : not null access Gtk.Text_Tag.Gtk_Text_Tag_Record'Class;
Size_Changed : Boolean);
type Cb_Gtk_Text_Tag_Table_Gtk_Text_Tag_Void is not null access procedure
(Self : access Gtk_Text_Tag_Table_Record'Class;
Tag : not null access Gtk.Text_Tag.Gtk_Text_Tag_Record'Class);
procedure Foreach
(Table : not null access Gtk_Text_Tag_Table_Record;
Func : Gtk_Text_Tag_Table_Foreach)
Calls Func on each tag in Table, with user data Data. Note that the table may not be modified while iterating over it (you can't add/remove tags).
a function to call on each tag
function Get_Size
(Table : not null access Gtk_Text_Tag_Table_Record) return Glib.Gint
Returns the size of the table (number of tags)
number of tags in Table
function Get_Type return Glib.GType
procedure Gtk_New (Table : out Gtk_Text_Tag_Table)
Creates a new GtkTextTagTable. The table contains no tags by default. Initialize does nothing if the object was already created with another call to Initialize* or G_New.
type Gtk_Text_Tag_Table is access all Gtk_Text_Tag_Table_Record'Class;
type Gtk_Text_Tag_Table_Foreach is access procedure
(Tag : not null access Gtk.Text_Tag.Gtk_Text_Tag_Record'Class);
A function used with Gtk.Text_Tag_Table.Foreach, to iterate over every GtkTextTag inside a GtkTextTagTable.
the GtkTextTag
function Gtk_Text_Tag_Table_New return Gtk_Text_Tag_Table
Creates a new GtkTextTagTable. The table contains no tags by default.
type Gtk_Text_Tag_Table_Record is new GObject_Record with null record;
package Implements_Gtk_Buildable is new Glib.Types.Implements
(Gtk.Buildable.Gtk_Buildable, Gtk_Text_Tag_Table_Record, Gtk_Text_Tag_Table);
procedure Initialize
(Table : not null access Gtk_Text_Tag_Table_Record'Class)
Creates a new GtkTextTagTable. The table contains no tags by default. Initialize does nothing if the object was already created with another call to Initialize* or G_New.
function Lookup
(Table : not null access Gtk_Text_Tag_Table_Record;
Name : UTF8_String) return Gtk.Text_Tag.Gtk_Text_Tag
Look up a named tag.
name of a tag
The tag. Has transfer-ownership='none'.
procedure On_Tag_Added
(Self : not null access Gtk_Text_Tag_Table_Record;
Call : Cb_GObject_Gtk_Text_Tag_Void;
Slot : not null access Glib.Object.GObject_Record'Class;
After : Boolean := False)
Emitted every time a new tag is added in the GtkTextTagTable.
procedure On_Tag_Added
(Self : not null access Gtk_Text_Tag_Table_Record;
Call : Cb_Gtk_Text_Tag_Table_Gtk_Text_Tag_Void;
After : Boolean := False)
Emitted every time a new tag is added in the GtkTextTagTable.
procedure On_Tag_Changed
(Self : not null access Gtk_Text_Tag_Table_Record;
Call : Cb_GObject_Gtk_Text_Tag_Boolean_Void;
Slot : not null access Glib.Object.GObject_Record'Class;
After : Boolean := False)
Emitted every time a tag in the GtkTextTagTable changes.
Callback parameters: -- @param Tag the changed tag. -- @param Size_Changed whether the change affects the GtkTextView -- layout.
procedure On_Tag_Changed
(Self : not null access Gtk_Text_Tag_Table_Record;
Call : Cb_Gtk_Text_Tag_Table_Gtk_Text_Tag_Boolean_Void;
After : Boolean := False)
Emitted every time a tag in the GtkTextTagTable changes.
Callback parameters: -- @param Tag the changed tag. -- @param Size_Changed whether the change affects the GtkTextView -- layout.
procedure On_Tag_Removed
(Self : not null access Gtk_Text_Tag_Table_Record;
Call : Cb_GObject_Gtk_Text_Tag_Void;
Slot : not null access Glib.Object.GObject_Record'Class;
After : Boolean := False)
Emitted every time a tag is removed from the GtkTextTagTable.
The Tag is still valid by the time the signal is emitted, but it is not associated with a tag table any more.
procedure On_Tag_Removed
(Self : not null access Gtk_Text_Tag_Table_Record;
Call : Cb_Gtk_Text_Tag_Table_Gtk_Text_Tag_Void;
After : Boolean := False)
Emitted every time a tag is removed from the GtkTextTagTable.
The Tag is still valid by the time the signal is emitted, but it is not associated with a tag table any more.
procedure Remove
(Table : not null access Gtk_Text_Tag_Table_Record;
Tag : not null access Gtk.Text_Tag.Gtk_Text_Tag_Record'Class)
Remove a tag from the table. If a GtkTextBuffer has Table as its tag table, the tag is removed from the buffer. The table's reference to the tag is removed, so the tag will end up destroyed if you don't have a reference to it.
a GtkTextTag
Signal_Tag_Added : constant Glib.Signal_Name := "tag-added";
Emitted every time a new tag is added in the GtkTextTagTable.
Signal_Tag_Changed : constant Glib.Signal_Name := "tag-changed";
Emitted every time a tag in the GtkTextTagTable changes.
Callback parameters: -- @param Tag the changed tag. -- @param Size_Changed whether the change affects the GtkTextView -- layout.
Signal_Tag_Removed : constant Glib.Signal_Name := "tag-removed";
Emitted every time a tag is removed from the GtkTextTagTable.
The Tag is still valid by the time the signal is emitted, but it is not associated with a tag table any more.