![]() |
![]() |
A new iterator is created with Pango::AttrList::get_iter(). Once the iterator is created, it can be advanced through the style changes in the text using Pango::AttrIter::next(). At each style change, the range of the current style segment and the attributes currently in effect can be queried.
Public Types | |
typedef int | difference_type |
typedef std::forward_iterator_tag | iterator_category |
Public Member Functions | |
AttrIter (const AttrIter& src) | |
AttrIter (PangoAttrIterator* castitem, bool take_copy=true) | |
Attribute | get_attribute (AttrType type) const |
Find the current attribute of a particular type at the iterator location. | |
SListHandle_Attribute | get_attrs () const |
Gets a list all attributes a the current position of the iterator. | |
SListHandle_Attribute | get_extra_attrs () const |
Gets a list of non-font attributes at the the current iterator position. | |
FontDescription | get_font_desc () const |
Get the font description used at the current iterator position. | |
Language | get_language () const |
Gets the language tag used at current iterator position. | |
void | get_range (int& start, int& end) const |
Get the range of the current segment. | |
const PangoAttrIterator* | gobj () const |
PangoAttrIterator* | gobj () |
bool | next () |
The same as operator++(). | |
operator bool () const | |
Check whether the iterator is valid. | |
const AttrIter | operator++ (int) |
AttrIter& | operator++ () |
Advance the iterator until the next change of style. | |
AttrIter& | operator= (const AttrIter& src) |
~AttrIter () | |
Protected Member Functions | |
AttrIter () | |
Protected Attributes | |
PangoAttrIterator* | gobject_ |
Related Functions | |
(Note that these are not member functions.) | |
Pango::AttrIter | wrap (PangoAttrIterator* object, bool take_copy=false) |
typedef int Pango::AttrIter::difference_type |
typedef std::forward_iterator_tag Pango::AttrIter::iterator_category |
Pango::AttrIter::AttrIter | ( | ) | [protected] |
Pango::AttrIter::AttrIter | ( | PangoAttrIterator * | castitem, | |
bool | take_copy = true | |||
) | [explicit] |
Pango::AttrIter::AttrIter | ( | const AttrIter& | src | ) |
Pango::AttrIter::~AttrIter | ( | ) |
Find the current attribute of a particular type at the iterator location.
When multiple attributes of the same type overlap, the attribute whose range starts closest to the current location is used.
type | The type of attribute to find. |
0
if no attribute of that type applies to the current location. SListHandle_Attribute Pango::AttrIter::get_attrs | ( | ) | const |
Gets a list all attributes a the current position of the iterator.
SListHandle_Attribute Pango::AttrIter::get_extra_attrs | ( | ) | const |
Gets a list of non-font attributes at the the current iterator position.
Only the highest priority value of each attribute will be added to this list.
FontDescription Pango::AttrIter::get_font_desc | ( | ) | const |
Get the font description used at the current iterator position.
Language Pango::AttrIter::get_language | ( | ) | const |
Gets the language tag used at current iterator position.
void Pango::AttrIter::get_range | ( | int & | start, | |
int & | end | |||
) | const |
Get the range of the current segment.
start | Location to store the start of the range. | |
end | Location to store the end of the range. |
const PangoAttrIterator* Pango::AttrIter::gobj | ( | ) | const [inline] |
PangoAttrIterator* Pango::AttrIter::gobj | ( | ) | [inline] |
bool Pango::AttrIter::next | ( | ) |
Pango::AttrIter::operator bool | ( | ) | const |
Check whether the iterator is valid.
true
if the iterator is valid. const AttrIter Pango::AttrIter::operator++ | ( | int | ) |
AttrIter& Pango::AttrIter::operator++ | ( | ) |
Advance the iterator until the next change of style.
The iterator becomes invalid if the end of the list is reached.
Pango::AttrIter wrap | ( | PangoAttrIterator * | object, | |
bool | take_copy = false | |||
) | [related] |
PangoAttrIterator* Pango::AttrIter::gobject_ [protected] |