shellui.core package

shellui.core.handler module

class shellui.core.handler.CursorController(collection, position: int = 0, style: str = '> %(widget)s')

Bases: object

property current: BaseElementInterface
get_element_by_position(position: int | Self) BaseElementInterface
move(step: int, rule: Callable[[BaseElementInterface], bool])
property position
class shellui.core.handler.EventManager(parent: object)

Bases: object

Manages creation and calling of events

call_events(*args, **kwargs) List[Any]
set_events(*args, **kwargs)
class shellui.core.handler.FlagsController(parent: BaseElementInterface)

Bases: dict

get_flag(key: str) bool
set_flag(key: str, value: Any) None
class shellui.core.handler.KeyboardHandler(parent: BaseElementInterface = None)

Bases: object

add_keyboard_event(function: ~typing.Callable, _lambda: ~typing.Callable = <function KeyboardHandler.<lambda>>) KeyboardEvent
key_pressed(key) List[Any]

shellui.core.terminal module

class shellui.core.terminal.Terminal

Bases: object

Manages interface for working with text-based user interface.

close()

Closes the curses window and restores the terminal to its original state.

Return type:

None

draw() None

Clears screen and draws buffer contents to the screen.

Return type:

None

read() int

Reads character entered by user.

Returns:

Key char

Return type:

int

set_buffer(buffer: Buffer) None

Sets rendering buffer.

Parameters:

buffer (Buffer) – Rendering buffer

Return type:

None