Xfce Foundation Classes
Main Page  | IndexNamespace List  |  Alphabetical List  |  Class List  |  File List


Public Types | Public Member Functions | Static Protected Attributes
Xfc::Gtk::TextTagTable Class Reference

A GtkTextTagTable C++ wrapper class. More...

#include <xfc/gtk/texttag.hh>

Inheritance diagram for Xfc::Gtk::TextTagTable:
Xfc::G::Object Xfc::G::TypeInstance Xfc::Trackable Xfc::Gtk::SourceTagTable

List of all members.

Public Types

Public Member Functions

Static Protected Attributes

Constructors


Detailed Description

A GtkTextTagTable C++ wrapper class.

TextTags are stored in a TexTagTable. A tag table defines a set of tags that can be used together. Each buffer has one tag table associated with it; only tags from that tag table can be used with the buffer. A single tag table can be shared between multiple buffers, however.

Note: dynamically allocated objects must either be unreferenced or assigned to a smart pointer. Stack objects are automatically unreferenced when they go out of scope.

See also: the TextView Widget HOWTO and example.


Member Typedef Documentation

typedef sigc::slot<void, TextTag&> Xfc::Gtk::TextTagTable::ForeachSlot

Signature of the callback slot to be called on each tag in the table.

Example: Method signature for ForeachSlot.

< void method(TextTag& tag);
<
< // tag: A text tag.
<

Constructor & Destructor Documentation

Xfc::Gtk::TextTagTable::TextTagTable ( GtkTextTagTable *  table,
bool  owns_reference = true 
) [explicit, protected]

Construct a new TextTagTable from an existing GtkTextTagTable.

Parameters:
tableA pointer to a GtkTextTagTable.
owns_referenceSet false if the initial reference count is floating, set true if it's not.

The table can be a newly created GtkTextTagTable or an existing GtkTextTagTable (see G::Object::Object).

Xfc::Gtk::TextTagTable::TextTagTable ( )

Construct a new TextTagTable with a reference count of 1 that the caller owns.

The table contains no tags by default.


Member Function Documentation

Add a tag to the table.

Parameters:
tagA TextTag.

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.

Calls each on each tag in table.

Parameters:
eachThe callback slot to call on each tag.

Returns the size of the table (number of tags)

Returns:
The number of tags in the table.
TextTag* Xfc::Gtk::TextTagTable::lookup ( const String name)

Look up a named tag.

Parameters:
nameThe name of a tag.
Returns:
The tag, or null if none by that name is in the table.

Remove a tag from the table.

Parameters:
tagA TextTag.

This will remove the table's reference to the tag, so be careful - the tag will end up destroyed if you don't have a reference to it.


Member Data Documentation

Tag added signal (see signal_tag_added()).

Calls a slot with the signature:

< void function(TextTag& tag);
< // tag: The tag being added to the table.
<

Tag changed signal (see signal_tag_changed()).

Calls a slot with the signature:

< void function(TextTag& tag, bool size_changed);
< // tag: The tag whose property was changed.
< // size_changed: true if the changed property resulted in a change to the text display size.
<

Tag removed signal (see signal_tag_removed()).

Calls a slot with the signature:

< void function(TextTag& tag);
< // tag: The tag being removed to the table.
<

The documentation for this class was generated from the following file:
Xfce Foundation Classes
Copyright © 2004-2005 The XFC Development Team XFC