hsh :: content :: text :: TextLineRegion :: Class TextLineRegion
[hide private]
[frames] | no frames]

Class TextLineRegion

object --+
         |
        TextLineRegion

Details about a region within a TextLine. Each TextLine is broken into regions which are substrings of that specific line. Regions may not overlap, and all characters in the line are a part of a region. Users of the region may attach arbitrary data to the region in the form of attributes, to record information such as origin of the Text, error conditions or rendering instructions.

Regions are not created directly and do not provide an interface to modify their text, use methods of TextLine for those purposes.

Instance Methods [hide private]
 
__init__(self, line, length)
Create a new region for the given line.
 
_pindex(self)
Find the index inside the parent array where this region starts.
 
__str__(self)
str(x)
 
set_attrs(self, tlr)
Given another TextLineRegion, copy its attributes to this one.
 
__len__(self)
 
delete(self)
 
get_line(self)
 
__setslice__(self, i, j, seq)
 
__setitem__(self, key, val)
 
__getitem__(self, key)
 
append(self, val)
 
extend(self, vals)
 
insert(self, ind, val)

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, line, length)
(Constructor)

 

Create a new region for the given line. This constructor should not be called directly, use TextLine's interface instead.

Overrides: object.__init__

__str__(self)
(Informal representation operator)

 

str(x)

Overrides: object.__str__
(inherited documentation)