Struct pango::AttrIterator [−][src]
pub struct AttrIterator(_);
Expand description
The AttrIterator
structure is used to represent an
iterator through a AttrList
. A new iterator is created
with AttrList::iterator()
. Once the iterator
is created, it can be advanced through the style changes
in the text using next()
. At each
style change, the range of the current style segment and the
attributes currently in effect can be queried.
Implementations
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.
Returns
the current attribute of the given type,
or None
if no attribute of that type applies to the
current location.
Gets a list of all attributes at the current position of the iterator.
Returns
a list of
all attributes for the current range.
To free this value, call pango_attribute_destroy()
on
each value and g_slist_free()
on the list.
Get the range of the current segment. Note that the
stored return values are signed, not unsigned like
the values in Attribute
. To deal with this API
oversight, stored return values that wouldn’t fit into
a signed integer are clamped to G_MAXINT
.
Returns
start
location to store the start of the range
end
location to store the end of the range
Get the font and other attributes at the current iterator position.
desc
a FontDescription
to fill in with the current values.
The family name in this structure will be set using
pango_font_description_set_family_static()
using values from
an attribute in the AttrList
associated with the iterator,
so if you plan to keep it around, you must call:
<literal>
pango_font_description_set_family (desc, pango_font_description_get_family (desc))</literal>
.
language
if non-None
, location to store language tag for item, or None
if none is found.
extra_attrs
if non-None
,
location in which to store a list of non-font
attributes at the the current position; only the highest priority
value of each attribute will be added to this list. In order
to free this value, you must call pango_attribute_destroy()
on
each member.
Trait Implementations
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Returns the type identifier of Self
.
Auto Trait Implementations
impl RefUnwindSafe for AttrIterator
impl !Send for AttrIterator
impl !Sync for AttrIterator
impl Unpin for AttrIterator
impl UnwindSafe for AttrIterator
Blanket Implementations
Mutably borrows from an owned value. Read more
impl<'a, T, C> FromValueOptional<'a> for T where
C: ValueTypeChecker<Error = ValueTypeMismatchOrNoneError>,
T: FromValue<'a, Checker = C>,