Main Page
Widgets
Namespaces
Book
Inheritance diagram for Gtk::TextTag:
[legend]List of all members.
Detailed Description
Typedefed as Gtk::TextBuffer::Tag.
Text in a buffer can be marked with tags. A tag is an attribute that can be applied to some range of text. For example, a tag might be called "bold" and might make the text inside the tag bold. However, the tag concept is more general than that; tags don't have to affect appearance. They can instead affect the behavior of mouse and key presses, "lock" a range of text so the user can't edit it, or countless other things. One tag can be applied to any number of text ranges in any number of Gtk::TextBuffers.
Each tag is stored in a Gtk::TextBuffer::TagTable, and Tags should be in the Gtk::TextBuffer::TagTable for a given Gtk::TextBuffer before using them with that buffer.
Tags can have names, which is convenient sometimes (for example, you can name your tag that makes things bold "bold"), but they can also be anonymous (which is convenient if you're creating tags on-the-fly).
Gtk::TextBuffer::create_tag() is the best way to create tags. See the demo for numerous examples.
Constructor & Destructor Documentation
virtual Gtk::TextTag::~TextTag |
( |
|
) |
[virtual] |
|
Gtk::TextTag::TextTag |
( |
|
) |
[protected] |
|
Gtk::TextTag::TextTag |
( |
const Glib::ustring& |
name |
) |
[explicit, protected] |
|
Member Function Documentation
|
Emits the "event" signal on the Gtk::TextTag.
- Parameters:
-
| event_object | Object that received the event, such as a widget. |
| event | The event. |
| iter | Location where the event was received. |
- Returns:
- Result of signal emission (whether the event was handled).
|
int Gtk::TextTag::get_priority |
( |
|
) |
const |
|
|
Get the tag priority.
- Returns:
- The tag's priority.
|
const GtkTextTag* Gtk::TextTag::gobj |
( |
|
) |
const [inline] |
|
|
Provides access to the underlying C GObject.
Reimplemented from Glib::ObjectBase. |
GtkTextTag* Gtk::TextTag::gobj |
( |
|
) |
[inline] |
|
|
Provides access to the underlying C GObject.
Reimplemented from Glib::ObjectBase. |
GtkTextTag* Gtk::TextTag::gobj_copy |
( |
|
) |
|
|
|
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
|
void Gtk::TextTag::set_priority |
( |
int |
priority |
) |
|
|
|
Sets the priority of a Gtk::TextTag.
Valid priorities are start at 0 and go to one less than Gtk::TextTagTable::get_size(). Each tag in a table has a unique priority; setting the priority of one tag shifts the priorities of all the other tags in the table to maintain a unique priority for each tag. Higher priority tags "win" if two tags both set the same text attribute. When adding a tag to a tag table, it will be assigned the highest priority in the table by default; so normally the precedence of a set of tags is the order in which they were added to the table, or created with Gtk::TextBuffer::create_tag(), which adds the tag to the buffer's table automatically. - Parameters:
-
| priority | The new priority. |
|
Friends And Related Function Documentation
|
- Parameters:
-
| object | The C instance |
| take_copy | False 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.
|
The documentation for this class was generated from the following file:
Generated for gtkmm 2.4 by
Doxygen 1.4.6 © 1997-2001