geometor.seer_navigator.renderers

Grid rendering widgets for the Seer Navigator.

Submodules

Classes

BaseGrid

Base widget class for rendering the colored grid.

SolidGrid

Base widget class for rendering the colored grid.

CharGrid

Renders each grid cell as a single Unicode square character (default: '■'),

BlockGrid

first row cells are made of 3 characters - half vertical and full

TinyGrid

Renders the grid using the Unicode upper half block character '▀'.

Package Contents

class geometor.seer_navigator.renderers.BaseGrid(grid, **kwargs)

Bases: textual.widgets.Static

Base widget class for rendering the colored grid.

grid
rows
cols
get_color(cell_value: int) → textual.color.Color

Gets a Textual Color object for the given cell value.

class geometor.seer_navigator.renderers.SolidGrid(grid, **kwargs)

Bases: geometor.seer_navigator.renderers.base_grid.BaseGrid

Base widget class for rendering the colored grid.

render()

Get a rich renderable for the widget’s content.

Returns:

A rich renderable.

class geometor.seer_navigator.renderers.CharGrid(grid, **kwargs)

Bases: geometor.seer_navigator.renderers.base_grid.BaseGrid

Renders each grid cell as a single Unicode square character (default: ‘■’), styled with the cell’s fill color.

You can switch the character to something else (e.g. ‘⬛’, ‘◼’, ‘▣’) if desired.

SQUARE_CHAR = '■'
render()

Get a rich renderable for the widget’s content.

Returns:

A rich renderable.

class geometor.seer_navigator.renderers.BlockGrid(grid, **kwargs)

Bases: geometor.seer_navigator.renderers.base_grid.BaseGrid

first row cells are made of 3 characters - half vertical and full next row made of top and bottom half - 1 space, 1 half block “ ██” “ ▄▄” “ ▀▀”

render()

Get a rich renderable for the widget’s content.

Returns:

A rich renderable.

class geometor.seer_navigator.renderers.TinyGrid(grid, **kwargs)

Bases: geometor.seer_navigator.renderers.base_grid.BaseGrid

Renders the grid using the Unicode upper half block character ‘▀’. Each character represents two rows: - Foreground color = top row cell color - Background color = bottom row cell color If there’s an odd number of rows, the last row uses black for the background.

HALF_BLOCK_CHAR = '▀'
render() → rich.text.Text

Get a rich renderable for the widget’s content.

Returns:

A rich renderable.