![]() |
![]() |
The attributes are, in general, allowed to overlap in an arbitrary fashion, however, if the attributes are manipulated only through Pango::AttrList::change(), the overlap between properties will meet stricter criteria.
Since the Pango::AttrList structure is stored as a linear list, it is not suitable for storing attributes for large amounts of text. In general, you should not use a single Pango::AttrList for more than one paragraph of text.
When obtaining an AttrList, you should check that it is valid. For instance, if(attrlist).
Public Member Functions | ||||
AttrList (const Glib::ustring& markup_text, gunichar accel_marker, Glib::ustring& text, gunichar& accel_char) | ||||
Constructs an attribute list by parsing a marked-up text (see markup format). | ||||
AttrList (const Glib::ustring& markup_text, gunichar accel_marker=0) | ||||
Constructs an attribute list by parsing a marked-up text (see markup format). | ||||
AttrList (const AttrList& other) | ||||
AttrList (PangoAttrList* gobject, bool make_a_copy=true) | ||||
AttrList () | ||||
void | change (Attribute& attr) | |||
AttrIter | get_iter () | |||
Create a iterator initialized to the beginning of the list. | ||||
const PangoAttrList* | gobj () const | |||
Provides access to the underlying C instance. | ||||
PangoAttrList* | gobj () | |||
Provides access to the underlying C instance. | ||||
PangoAttrList* | gobj_copy () const | |||
Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs. | ||||
void | insert (Attribute& attr) | |||
void | insert_before (Attribute& attr) | |||
operator bool () | ||||
Tests whether the AttrList is valid. | ||||
AttrList& | operator= (const AttrList& other) | |||
void | splice (AttrList& other, int pos, int len) | |||
This function splices attribute list other into list . | ||||
void | swap (AttrList& other) | |||
~AttrList () | ||||
Protected Attributes | ||||
PangoAttrList* | gobject_ | |||
Related Functions | ||||
(Note that these are not member functions.) | ||||
void | swap (AttrList& lhs, AttrList& rhs) | |||
| ||||
Pango::AttrList | wrap (PangoAttrList* object, bool take_copy=false) | |||
|
Pango::AttrList::AttrList | ( | ) |
Pango::AttrList::AttrList | ( | PangoAttrList * | gobject, | |
bool | make_a_copy = true | |||
) | [explicit] |
Pango::AttrList::AttrList | ( | const AttrList& | other | ) |
Pango::AttrList::~AttrList | ( | ) |
Pango::AttrList::AttrList | ( | const Glib::ustring & | markup_text, | |
gunichar | accel_marker = 0 | |||
) | [explicit] |
Constructs an attribute list by parsing a marked-up text (see markup format).
If accel_marker is nonzero, the given character will mark the character following it as an accelerator. For example, the accel marker might be an ampersand or underscore. All characters marked as an accelerator will receive a Pango::UNDERLINE_LOW attribute. Two accel_marker characters following each other produce a single literal accel_marker character.
markup_text | Markup to parse (see markup format). | |
accel_marker | Character that precedes an accelerator, or 0 for none. |
Pango::AttrList::AttrList | ( | const Glib::ustring & | markup_text, | |
gunichar | accel_marker, | |||
Glib::ustring & | text, | |||
gunichar & | accel_char | |||
) |
Constructs an attribute list by parsing a marked-up text (see markup format).
text is set to the plaintext string. If accel_marker is nonzero, the given character will mark the character following it as an accelerator. For example, the accel marker might be an ampersand or underscore. All characters marked as an accelerator will receive a Pango::UNDERLINE_LOW attribute. The first character so marked will be returned in accel_char. Two accel_marker characters following each other produce a single literal accel_marker character.
markup_text | Markup to parse (see markup format). | |
accel_marker | Character that precedes an accelerator, or 0 for none. | |
text | Return location for text with tags stripped. | |
accel_char | Return location for accelerator char. |
void Pango::AttrList::change | ( | Attribute& | attr | ) |
AttrIter Pango::AttrList::get_iter | ( | ) |
Create a iterator initialized to the beginning of the list.
const PangoAttrList* Pango::AttrList::gobj | ( | ) | const [inline] |
Provides access to the underlying C instance.
PangoAttrList* Pango::AttrList::gobj | ( | ) | [inline] |
Provides access to the underlying C instance.
PangoAttrList* Pango::AttrList::gobj_copy | ( | ) | const |
Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs.
void Pango::AttrList::insert | ( | Attribute& | attr | ) |
void Pango::AttrList::insert_before | ( | Attribute& | attr | ) |
Pango::AttrList::operator bool | ( | ) |
Tests whether the AttrList is valid.
void Pango::AttrList::splice | ( | AttrList& | other, | |
int | pos, | |||
int | len | |||
) |
This function splices attribute list other into list .
This operation is equivalent to stretching every attribute that applies at position pos in list by an amount len , and then calling pango_attr_list_change() with a copy of each attribute in other in sequence (offset in position by pos ).
This operation proves useful for, for instance, inserting a preedit string in the middle of an edit buffer.
other | Another Pango::AttrList. | |
pos | The position in list at which to insert other . | |
len | The length of the spliced segment. (Note that this must be specified since the attributes in other may only be present at some subsection of this range). |
void Pango::AttrList::swap | ( | AttrList& | other | ) |
lhs | The left-hand side |
rhs | The right-hand side |
Pango::AttrList wrap | ( | PangoAttrList * | object, | |
bool | take_copy = false | |||
) | [related] |
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. |
PangoAttrList* Pango::AttrList::gobject_ [protected] |