Class for formatting a TextBlock onto a TCL text control.
def __init__(self, textctl):
def _addState(self, attr, range):
Adds a pair of text positions to the state. Range is a tuple containing two
row/column tuples for the beginning and end of a range.
Provides the necessary override of
spug.nml.StdFormatter.StdFormatter._commit(). Counts the number of newlines
(to maintain the current line number)
Overrides
spug.nml.StdFormatter.StdFormatter._commit() to implement indentation.
Restores the previous state.
Returns the current text position as a row/column tuple.
Pushes the current state and creates a new current state consisting of the
current state merged with attr.
Formats the given text block into the text control.
Formats a definition item.
Formats a definition list.
Formats an entire document.
Formats plain old text.
Formats text with a special attribute attr.
Formats an unordered list.
_commit(self, data)
def _commit(self, data):
_makeLine(self, line)
def _makeLine(self, line):
_popState(self)
def _popState(self):
_pos(self)
def _pos(self):
_pushState(self, attr)
def _pushState(self, attr):
configTag(self, state)
def configTag(self, state):
format(self, text)
def format(self, text):
formatAll(self, text)
def formatAll(self, text):
formatDI(self, text)
def formatDI(self, text):
formatDL(self, text)
def formatDL(self, text):
formatDoc(self, text)
def formatDoc(self, text):
formatText(self, text)
def formatText(self, text):
formatTextAttr(self, text, attr)
def formatTextAttr(self, text, attr):
formatUL(self, text)
def formatUL(self, text):