This package contains a bundled copy of the upstream TextLand project. Over time it will be updated with subsequent releases. Eventually it will be replaced by a dependency on API-stable TextLand release.
See also
TextLand upstream project: https://github.com/zyga/textland/
Bases: builtins.tuple
Cell(char, attributes)
Alias for field number 1
Alias for field number 0
Raises ValueError if the value is not present.
Bases: builtins.object
Context for simple text drawing
Draw a border around the edges of the current cli. Each parameter specifies the margin to use for a specific side of the border.
Move paint offset by the specified delta
Move paint offset to the specified spot
Print the specified text
Multi-line strings are supported. The offset and clipping area is respected. Painting beyond the clipping area is ignored
The offset is automatically adjusted to point to the end of the string.
Bases: builtins.tuple
Event(kind, data)
Alias for field number 1
Raises ValueError if the value is not present.
Alias for field number 0
Bases: builtins.object
Interface for all applications.
Applications are simple objects that react to events by repainting their buffer. Each application has exactly one full-screen buffer.
Send an event to the controller.
Parameters: | event – Event that the controller should handle |
---|
This method is called whenever the application should react to an event. The application may raise StopIteration to ask the display to exit.
Bases: builtins.object
Abstract display system.
Run forever, feeding events to the controller the controller can raise StopIteration to “quit”
Bases: builtins.tuple
KeyboardData(key,)
Raises ValueError if the value is not present.
Alias for field number 0
Bases: builtins.tuple
MouseData(x, y, buttons)
Alias for field number 2
Raises ValueError if the value is not present.
Alias for field number 0
Alias for field number 1
Bases: builtins.tuple
Rect(x1, y1, x2, y2)
Raises ValueError if the value is not present.
Alias for field number 0
Alias for field number 2
Alias for field number 1
Alias for field number 3
Bases: builtins.tuple
Size(width, height)
Alias for field number 1
Raises ValueError if the value is not present.
Alias for field number 0
Bases: plainbox.vendor.textland.display.AbstractDisplay
A display that records all images and replays pre-recorded events
Inject an event.
Events are served in FIFO mode.
Run forever, feeding events to the controller the controller can raise StopIteration to “quit”
Bases: builtins.object
Unpack packed attributes into (fg, bg, style)
Bases: builtins.object
A rectangular, mutable text image.
The image supports NORMAL, REVERSE and UNDERLINE as per-cell attributes, the 8 colors described in the ANSI standard and the BOLD video attribute to render the foreground colors as bright (aka light or intensified).
Get a cell from (x, y)
Parameters: |
|
---|---|
Returns: | Cell(c, pa) |
Put character c with attributes pa into cell at (x, y)
Parameters: |
|
---|
Get a ITextDisplay according to TEXTLAND_DISPLAY environment variable