Methods
|
|
__getFormattedParts
__insertCB
getParaType
insertInWidget
processStructure
walk
|
|
__getFormattedParts
|
__getFormattedParts ( self, text )
Returns parsed sub-paragraphs and their formatting instructions.
Returns a list of tuples consisting of (format , text) where
format is one of self.CHARACTER_FORMATS.
|
|
__insertCB
|
__insertCB (
self,
text,
paraType,
level,
data,
)
Callback used by self.walk() to insert text into a widget.
|
|
getParaType
|
getParaType ( self, text )
|
|
insertInWidget
|
insertInWidget (
self,
widget,
where,
)
Insert the StructuredText content at where in the widget .
This method walks through the structure of the text document
and inserts the components into the widget at the index
identified by where .
|
|
processStructure
|
processStructure (
self,
structure,
callback,
data,
level=0,
)
Iterate/recurse over the structure of the DOM.
|
|
walk
|
walk (
self,
callback,
level=0,
data=None,
)
Traverse the DOM for the StructuredText.
Arguments
- callback
Callable object to execute with each node.
Should match the signature callback(text, paraType, level,
data) where text is the actual string of the node, paraType
is the paragraph type, level is the indention nesting level,
and data is the data argument to this method.
- level
The starting indention nesting level of the text.
- data
Data to be provided to the callback.
|
|