Class pyglet.text.runlist.OverriddenRunIterator

AbstractRunIterator --+
                      |
                     OverriddenRunIterator
Iterator over a RunIterator, with a value temporarily replacing a given range.

Methods

  __init__(self, base_iterator, start, end, value)
Create a derived iterator.
iterator ranges(self, start, end)
Iterate over a subrange of the run list.
object __getitem__(self, index)
Get the value at a given index.

Method Details

__init__

(Constructor) __init__(self, base_iterator, start, end, value)
Create a derived iterator.
Parameters:
start : int
Start of range to override
end : int
End of range to override, exclusive
value : object
Value to replace over the range

ranges

ranges(self, start, end)

Iterate over a subrange of the run list.

See the class documentation for examples of valid usage.

Returns:
iterator: Iterator over (start, end, value) tuples.
Overrides:
AbstractRunIterator.ranges

__getitem__

(Indexing operator) __getitem__(self, index)

Get the value at a given index.

See the class documentation for examples of valid usage.

Returns: object
Overrides:
AbstractRunIterator.__getitem__