Class: Gtk::TextTagTable

Inherits:
Object
  • Object
show all
Defined in:
(unknown)

Instance Method Summary collapse

Instance Method Details

#add(tag) ⇒ TrueClass

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.

Parameters:

Returns:

  • (TrueClass)

    true on success.

#foreach(func, data) ⇒ nil

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).

Parameters:

  • func (Gtk::TextTagTableForeach)

    a function to call on each tag

  • data (GObject)

    user data

Returns:

  • (nil)

#lookup(name) ⇒ Gtk::TextTag

Look up a named tag. name is in the table.

Parameters:

  • name (String)

    name of a tag

Returns:

#newGtk::TextTagTable

Creates a new Gtk::TextTagTable. The table contains no tags by default.

Returns:

#remove(tag) ⇒ nil

Remove a tag from the table. If a Gtk::TextBuffer 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.

Parameters:

Returns:

  • (nil)

#sizeInteger

Returns the size of the table (number of tags)

Returns:

  • (Integer)

    number of tags in table