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


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 List of all members.

Signal Prototypes

Public Types

Public Member Functions

Constructors
Accessors
Methods
Signal Proxies

Protected Member Functions

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:
table A pointer to a GtkTextTagTable.
owns_reference Set 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

void Xfc::Gtk::TextTagTable::add TextTag tag  ) 
 

Add a tag to the table.

Parameters:
tag A 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.

void Xfc::Gtk::TextTagTable::foreach const ForeachSlot each  ) 
 

Calls each on each tag in table.

Parameters:
each The callback slot to call on each tag.

int Xfc::Gtk::TextTagTable::get_size  )  const
 

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:
name The name of a tag.
Returns:
The tag, or null if none by that name is in the table.

void Xfc::Gtk::TextTagTable::remove TextTag tag  ) 
 

Remove a tag from the table.

Parameters:
tag A 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

const TagAddedSignalType Xfc::Gtk::TextTagTable::tag_added_signal [static, protected]
 

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.

const TagChangedSignalType Xfc::Gtk::TextTagTable::tag_changed_signal [static, protected]
 

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.

const TagRemovedSignalType Xfc::Gtk::TextTagTable::tag_removed_signal [static, protected]
 

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 4.3