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

Class MutableText

object --+        
         |        
      list --+    
             |    
          Text --+
                 |
                MutableText

MutableText is a representation of Text suitable for being displayed to the user, with additional interesting annotated information. It is presented as an array of TextLines. Each TextLine except the last must be terminated with a newline.

Instance Methods [hide private]
 
_chk_slice(self, i, j, seq)
 
__setslice__(self, i, j, seq)
x[i:j]=y
 
__setitem__(self, key, val)
x[i]=y
 
append(self, val)
append object to end
 
extend(self, vals)
extend list by appending elements from the iterable
 
insert(self, ind, val)
insert object before index
 
append_region(self, text, attrs=None)
Append a new region to the MutableText, initializing it with the provided content.

Inherited from Text: __str__, end, max_line_length

Inherited from list: __add__, __contains__, __delitem__, __delslice__, __eq__, __ge__, __getattribute__, __getitem__, __getslice__, __gt__, __iadd__, __imul__, __init__, __iter__, __le__, __len__, __lt__, __mul__, __ne__, __new__, __repr__, __reversed__, __rmul__, __sizeof__, count, index, pop, remove, reverse, sort

Inherited from object: __delattr__, __format__, __reduce__, __reduce_ex__, __setattr__, __subclasshook__

Static Methods [hide private]
 
_chk_elem(elem)
Class Variables [hide private]

Inherited from list: __hash__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__setslice__(self, i, j, seq)
(Slice assignment operator)

 

x[i:j]=y

Use of negative indices is not supported.

Overrides: list.__setslice__
(inherited documentation)

__setitem__(self, key, val)
(Index assignment operator)

 

x[i]=y

Overrides: list.__setitem__
(inherited documentation)

append(self, val)

 

append object to end

Overrides: list.append
(inherited documentation)

extend(self, vals)

 

extend list by appending elements from the iterable

Overrides: list.extend
(inherited documentation)

insert(self, ind, val)

 

insert object before index

Overrides: list.insert
(inherited documentation)

append_region(self, text, attrs=None)

 

Append a new region to the MutableText, initializing it with the provided content. It is added to the final TextLine or a new TextLine is created as needed.