MultiText¶
-
class
plie.
MultiText
(texts=(), bullet_choice='', justify='left', bounds=None)[source]¶ Bases:
plie.text.Text
MultiText displays sequences of text, including bulleted lists.
MultiText can be used for lists of text, menus, and other things that involve multiple distinct elements of vertically arranged text.
Parameters: - texts – sequence of text strings to display (preferably immutable)
- bullet_choice – a string that will be used as the bullet for each list item
- justify – which justification to use for the list items
- bounds – bounding box specifying size in cells (x,y), usually set by Renderer
-
__str__
()[source]¶ creates a printable string of this instance
Individual texts in in the MultiText instance are prefixed with self.bullet_choice, multiline texts have subsequent lines indented to where they start at an equal indent to the first line
Returns: a printable string of the contents of this instance
-
as_cells
()[source]¶ Translates the internal state into a cell space based format for transferring
Returns: a dictionary cell space representation of all the contained text objects
-
update
(bounds=None, texts=None, specific_text=(), bullet_choice=None)[source]¶ For changing internal state
Parameters: - bounds – update the bounds, either a tuple or a Bounds object
- texts – update the entire list of texts
- specific_text – a tuple of format (new_text_string, index)
- bullet_choice – update the bullet_choice
Returns: nothing, but updates the internal state