awsc.termui.screen.Character

class awsc.termui.screen.Character

Represents a single character cell on the screen. Each cell has a character value, a color, and a boldness flag.

Attributes:
valuestr

The character to display in the cell.

colorawsc.termui.color.Color

A callable which takes a string and returns a string. Designed with the Color object in mind, but can be replaced with any callable. Called when the cell is reset or changed to color the display character.

boldbool

Whether the character should be displayed in bold.

outstr

The calculated output of the cell. Contains a control code to color the character, then the character, then a reset control code.

dirtybool

Whether the character output needs recalculating.

Methods

clear()

Resets the character cell to a space character.

nullcolor(x, **kwargs)

A null color object which does not add any control codes to the output.

output()

Calculates the output of the character cell if required, and returns its output.

__init__()

Initializes a Character object.

Methods

__init__()

Initializes a Character object.

clear()

Resets the character cell to a space character.

nullcolor(x, **kwargs)

A null color object which does not add any control codes to the output.

output()

Calculates the output of the character cell if required, and returns its output.