Return a layout structure for text.
Parameters: |
|
---|
Layout structure is a list of line layouts, one per output line. Line layouts are lists than may contain the following tuples:
The offset in the last two tuples is used to determine the attribute used for the inserted spaces or text respectively. The attribute used will be the same as the attribute at that text offset. If the offset is None when inserting spaces then no attribute will be used.
Return True if align is a supported align mode.
Return True if wrap is a supported wrap mode.
Convert the layout segs to an aligned layout.
Calculate the segments of text to display given width screen columns to display them.
text - unicode text or byte string to display width - number of available screen columns wrap - wrapping mode used
Returns a layout structure without aligmnent applied.
Return a layout structure for text.
Return a minimal maxcol value that would result in the same number of lines for layout. layout must be a layout structure returned by self.layout().
Return True if align is ‘left’, ‘center’ or ‘right’.
Return True if wrap is ‘any’, ‘space’ or ‘clip’.