gtkmm: Gtk::TextTagTable Class Reference

Typedefed as Gtk::TextBuffer::TagTable. More...

#include <gtkmm/texttagtable.h>

Inheritance diagram for Gtk::TextTagTable:

Public Types

typedef sigc::slot< void(const Glib::RefPtr< TextTag >&)> SlotForEach
 
- Public Types inherited from Glib::Object
typedef void(*)(gpointer data DestroyNotify)
 
- Public Types inherited from sigc::trackable
typedef internal::func_destroy_notify func_destroy_notify
 
- Public Types inherited from sigc::notifiable
typedef internal::func_destroy_notify func_destroy_notify
 

Public Member Functions

 TextTagTable (TextTagTable&& src) noexcept
 
TextTagTableoperator= (TextTagTable&& src) noexcept
 
 ~TextTagTable () noexcept override
 
GtkTextTagTable* gobj ()
 Provides access to the underlying C GObject. More...

 
const GtkTextTagTable* gobj () const
 Provides access to the underlying C GObject. More...

 
GtkTextTagTable* gobj_copy ()
 Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. More...

 
bool add (const Glib::RefPtr< TextTag >& tag)
 Add a tag to the table. More...

 
void remove (const Glib::RefPtr< TextTag >& tag)
 Remove a tag from the table. More...

 
Glib::RefPtr< TextTaglookup (const Glib::ustring& name)
 Look up a named tag. More...

 
Glib::RefPtr< const TextTaglookup (const Glib::ustring& name) const
 Look up a named tag. More...

 
void foreach (const SlotForEach& slot)
 
int get_size () const
 Returns the size of the table (number of tags) More...

 
Glib::SignalProxy< void(const Glib::RefPtr< TextTag >&, bool)> signal_tag_changed ()
 
Glib::SignalProxy< void(const Glib::RefPtr< TextTag >&)> signal_tag_added ()
 
Glib::SignalProxy< void(const Glib::RefPtr< TextTag >&)> signal_tag_removed ()
 
- Public Member Functions inherited from Glib::Object
 Object (const Object &)=delete
 
Objectoperator= (const Object &)=delete
 
 Object (Object &&src) noexcept
 
Objectoperator= (Object &&src) noexcept
 
void * get_data (const QueryQuark &key)
 
void set_data (const Quark &key, void *data)
 
void set_data (const Quark &key, void *data, DestroyNotify notify)
 
void remove_data (const QueryQuark &quark)
 
void * steal_data (const QueryQuark &quark)
 
Glib::RefPtr< Glib::Objectwrap (GObject *object, bool take_copy=false)
 
- Public Member Functions inherited from Glib::ObjectBase
 ObjectBase (const ObjectBase &)=delete
 
ObjectBaseoperator= (const ObjectBase &)=delete
 
void set_property_value (const Glib::ustring &property_name, const Glib::ValueBase &value)
 
void get_property_value (const Glib::ustring &property_name, Glib::ValueBase &value) const
 
void set_property (const Glib::ustring &property_name, const PropertyType &value)
 
void get_property (const Glib::ustring &property_name, PropertyType &value) const
 
PropertyType get_property (const Glib::ustring &property_name) const
 
sigc::connection connect_property_changed (const Glib::ustring &property_name, const sigc::slot< void()> &slot)
 
sigc::connection connect_property_changed (const Glib::ustring &property_name, sigc::slot< void()> &&slot)
 
void freeze_notify ()
 
void thaw_notify ()
 
virtual void reference () const
 
virtual void unreference () const
 
GObject * gobj ()
 
const GObject * gobj () const
 
GObject * gobj_copy () const
 
- Public Member Functions inherited from sigc::trackable
 trackable () noexcept
 
 trackable (const trackable &src) noexcept
 
 trackable (trackable &&src) noexcept
 
 ~trackable ()
 
void add_destroy_notify_callback (notifiable *data, func_destroy_notify func) const
 
void notify_callbacks ()
 
trackableoperator= (const trackable &src)
 
trackableoperator= (trackable &&src) noexcept
 
void remove_destroy_notify_callback (notifiable *data) const
 
- Public Member Functions inherited from Gtk::Buildable
 Buildable (Buildable&& src) noexcept
 
Buildableoperator= (Buildable&& src) noexcept
 
 ~Buildable () noexcept override
 
GtkBuildable* gobj ()
 Provides access to the underlying C GObject. More...

 
const GtkBuildable* gobj () const
 Provides access to the underlying C GObject. More...

 
Glib::ustring get_buildable_id () const
 Gets the ID of the buildable object. More...

 
- Public Member Functions inherited from Glib::Interface
 Interface ()
 
 Interface (Interface &&src) noexcept
 
Interfaceoperator= (Interface &&src) noexcept
 
 Interface (const Glib::Interface_Class &interface_class)
 
 Interface (GObject *castitem)
 
 ~Interface () noexcept override
 
 Interface (const Interface &)=delete
 
Interfaceoperator= (const Interface &)=delete
 
GObject * gobj ()
 
const GObject * gobj () const
 

Static Public Member Functions

static GType get_type ()
 Get the GType for this class, for use with the underlying GObject type system. More...

 
static Glib::RefPtr< TextTagTablecreate ()
 
- Static Public Member Functions inherited from Gtk::Buildable
static void add_interface (GType gtype_implementer)
 
static GType get_type ()
 Get the GType for this class, for use with the underlying GObject type system. More...

 

Protected Member Functions

 TextTagTable ()
 
- Protected Member Functions inherited from Glib::Object
 Object ()
 
 Object (const Glib::ConstructParams &construct_params)
 
 Object (GObject *castitem)
 
 ~Object () noexcept override
 
- Protected Member Functions inherited from Glib::ObjectBase
 ObjectBase ()
 
 ObjectBase (const char *custom_type_name)
 
 ObjectBase (const std::type_info &custom_type_info)
 
 ObjectBase (ObjectBase &&src) noexcept
 
ObjectBaseoperator= (ObjectBase &&src) noexcept
 
virtual ~ObjectBase () noexcept=0
 
void initialize (GObject *castitem)
 
void initialize_move (GObject *castitem, Glib::ObjectBase *previous_wrapper)
 
- Protected Member Functions inherited from Gtk::Buildable
 Buildable ()
 You should derive from this class to use it. More...

 

Related Functions

(Note that these are not member functions.)

Glib::RefPtr< Gtk::TextTagTablewrap (GtkTextTagTable* object, bool take_copy=false)
 A Glib::wrap() method for this object. More...

 

Detailed Description

Typedefed as Gtk::TextBuffer::TagTable.

A Collection of Gtk::TextBuffer::Tags that can be used together.

A tag table defines a set of Gtk::TextBuffer::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.

Member Typedef Documentation

typedef sigc::slot<void(const Glib::RefPtr<TextTag>&)> Gtk::TextTagTable::SlotForEach

Constructor & Destructor Documentation

Gtk::TextTagTable::TextTagTable ( TextTagTable&&  src)
noexcept
Gtk::TextTagTable::~TextTagTable ( )
overridenoexcept
Gtk::TextTagTable::TextTagTable ( )
protected

Member Function Documentation

bool Gtk::TextTagTable::add ( const Glib::RefPtr< TextTag >&  tag)

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
tagA Gtk::TextTag.
Returns
true on success.
static Glib::RefPtr<TextTagTable> Gtk::TextTagTable::create ( )
static
void Gtk::TextTagTable::foreach ( const SlotForEach slot)
int Gtk::TextTagTable::get_size ( ) const

Returns the size of the table (number of tags)

Returns
Number of tags in table.
static GType Gtk::TextTagTable::get_type ( )
static

Get the GType for this class, for use with the underlying GObject type system.

GtkTextTagTable* Gtk::TextTagTable::gobj ( )
inline

Provides access to the underlying C GObject.

const GtkTextTagTable* Gtk::TextTagTable::gobj ( ) const
inline

Provides access to the underlying C GObject.

GtkTextTagTable* Gtk::TextTagTable::gobj_copy ( )

Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.

Glib::RefPtr<TextTag> Gtk::TextTagTable::lookup ( const Glib::ustring name)

Look up a named tag.

Parameters
nameName of a tag.
Returns
The tag, or nullptr if none by that name is in the table.
Glib::RefPtr<const TextTag> Gtk::TextTagTable::lookup ( const Glib::ustring name) const

Look up a named tag.

Parameters
nameName of a tag.
Returns
The tag, or nullptr if none by that name is in the table.
TextTagTable& Gtk::TextTagTable::operator= ( TextTagTable&&  src)
noexcept
void Gtk::TextTagTable::remove ( const Glib::RefPtr< TextTag >&  tag)

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
tagA Gtk::TextTag.
Glib::SignalProxy<void(const Glib::RefPtr<TextTag>&)> Gtk::TextTagTable::signal_tag_added ( )
Slot Prototype:
void on_my_tag_added(const Glib::RefPtr<TextTag>& tag)

Flags: Run Last

Emitted every time a new tag is added in the Gtk::TextTagTable.

Parameters
tagThe added tag.
Glib::SignalProxy<void(const Glib::RefPtr<TextTag>&, bool)> Gtk::TextTagTable::signal_tag_changed ( )
Slot Prototype:
void on_my_tag_changed(const Glib::RefPtr<TextTag>& tag, bool size_changed)

Flags: Run Last

Emitted every time a tag in the Gtk::TextTagTable changes.

Parameters
tagThe changed tag.
size_changedWhether the change affects the Gtk::TextView layout.
Glib::SignalProxy<void(const Glib::RefPtr<TextTag>&)> Gtk::TextTagTable::signal_tag_removed ( )
Slot Prototype:
void on_my_tag_removed(const Glib::RefPtr<TextTag>& tag)

Flags: Run Last

Emitted every time a tag is removed from the Gtk::TextTagTable.

The tag is still valid by the time the signal is emitted, but it is not associated with a tag table any more.

Parameters
tagThe removed tag.

Friends And Related Function Documentation

Glib::RefPtr< Gtk::TextTagTable > wrap ( GtkTextTagTable *  object,
bool  take_copy = false 
)
related

A Glib::wrap() method for this object.

Parameters
objectThe C instance.
take_copyFalse if the result should take ownership of the C instance. True if it should take a new copy or ref.
Returns
A C++ instance that wraps this C instance.