snakia.core.tui.widgets

Classes

BoxWidget(width, height[, char])

ContainerWidget(children)

HorizontalSplitWidget(children[, splitter_char])

TextWidget(text[, char])

VerticalSplitWidget(children[, splitter_char])

class snakia.core.tui.widgets.BoxWidget(width, height, char=CanvasChar('█'))[source]

Bases: Widget

__init__(width, height, char=CanvasChar('█'))[source]
async_state(default_value)
Return type:

AsyncBindable[TypeVar(T)]

on_render()[source]
Return type:

Canvas

render()
Return type:

Canvas

state(default_value)
Return type:

Bindable[TypeVar(T)]

class snakia.core.tui.widgets.ContainerWidget(children)[source]

Bases: Widget

__init__(children)[source]
async_state(default_value)
Return type:

AsyncBindable[TypeVar(T)]

abstract on_render()
Return type:

Canvas

render()
Return type:

Canvas

state(default_value)
Return type:

Bindable[TypeVar(T)]

class snakia.core.tui.widgets.HorizontalSplitWidget(children, splitter_char='|')[source]

Bases: ContainerWidget

__init__(children, splitter_char='|')[source]
async_state(default_value)
Return type:

AsyncBindable[TypeVar(T)]

on_render()[source]
Return type:

Canvas

render()
Return type:

Canvas

state(default_value)
Return type:

Bindable[TypeVar(T)]

class snakia.core.tui.widgets.TextWidget(text, char=CanvasChar(' '))[source]

Bases: Widget

__init__(text, char=CanvasChar(' '))[source]
async_state(default_value)
Return type:

AsyncBindable[TypeVar(T)]

on_render()[source]
Return type:

Canvas

render()
Return type:

Canvas

state(default_value)
Return type:

Bindable[TypeVar(T)]

class snakia.core.tui.widgets.VerticalSplitWidget(children, splitter_char='-')[source]

Bases: ContainerWidget

__init__(children, splitter_char='-')[source]
async_state(default_value)
Return type:

AsyncBindable[TypeVar(T)]

on_render()[source]
Return type:

Canvas

render()
Return type:

Canvas

state(default_value)
Return type:

Bindable[TypeVar(T)]

Modules

box

container

horizontal_split

text

vertical_split