class documentation

class vt(uio.IOBase):

Constructor: vt(view_manager)

View In Hierarchy

A virtual terminal that renders text output to the display.

Method __init__ Initialize the virtual terminal for a view manager.
Method dryBuffer Clear the output buffer and enable input.
Method end_batch End batch mode and render if needed
Method get_screen_size Return the terminal dimensions.
Method rd Read one character from the terminal input buffer.
Method rd_raw Read one raw character from the terminal input buffer.
Method start_batch Start batch mode - accumulate writes without rendering
Method update Update method to be called periodically to handle pending renders
Method wr Write text to the terminal, handling ANSI escape sequences.
Instance Variable char_height Undocumented
Instance Variable char_width Undocumented
Instance Variable cursor_visible Undocumented
Instance Variable cursor_x Undocumented
Instance Variable cursor_y Undocumented
Instance Variable draw Undocumented
Instance Variable input_enabled Undocumented
Instance Variable input_manager Undocumented
Instance Variable outputBuffer Undocumented
Instance Variable screen_height Undocumented
Instance Variable screen_width Undocumented
Instance Variable scroll_bottom Undocumented
Instance Variable scroll_top Undocumented
Instance Variable storage Undocumented
Instance Variable terminal_buffer Undocumented
Instance Variable view_manager Undocumented
Method _convert_key_to_terminal Convert a Picoware button code to a terminal escape sequence.
Method _handle_escape_sequence Handle an ANSI/VT100 escape sequence.
Method _print_char Print a character to the terminal buffer.
Method _render_terminal Render the terminal buffer to the display using C module
Method _scroll_up Scroll terminal content up by one line
Method _updateInternalBuffer Poll input and fill the output buffer with terminal sequences.
Instance Variable _batch_mode Undocumented
Instance Variable _comment_color Undocumented
Instance Variable _last_render_time Undocumented
Instance Variable _needs_render Undocumented
Instance Variable _render_enabled Undocumented
Instance Variable _render_throttle_ms Undocumented
Instance Variable _string_color Undocumented
Instance Variable _syntax_map Undocumented
def __init__(self, view_manager):

Initialize the virtual terminal for a view manager.

Parameters
view_manager:ViewManagerThe view manager for draw and input access.
def dryBuffer(self):

Clear the output buffer and enable input.

def end_batch(self):

End batch mode and render if needed

def get_screen_size(self):

Return the terminal dimensions.

Returns
listThe screen height and width.
def rd(self):

Read one character from the terminal input buffer.

Returns
strThe next buffered character.
def rd_raw(self):

Read one raw character from the terminal input buffer.

Returns
strThe next buffered character.
def start_batch(self):

Start batch mode - accumulate writes without rendering

def update(self):

Update method to be called periodically to handle pending renders

def wr(self, text_input):

Write text to the terminal, handling ANSI escape sequences.

Parameters
text_input:strThe text to write.
Returns
intThe number of characters written.
char_height =

Undocumented

char_width =

Undocumented

cursor_visible: bool =

Undocumented

cursor_x =

Undocumented

cursor_y =

Undocumented

draw =

Undocumented

input_enabled: bool =

Undocumented

input_manager =

Undocumented

outputBuffer =

Undocumented

screen_height =

Undocumented

screen_width =

Undocumented

scroll_bottom =

Undocumented

scroll_top: int =

Undocumented

storage =

Undocumented

terminal_buffer: list =

Undocumented

view_manager =

Undocumented

def _convert_key_to_terminal(self, key):

Convert a Picoware button code to a terminal escape sequence.

Parameters
key:intThe button code.
Returns
bytes or NoneThe terminal sequence, or None if unmapped.
def _handle_escape_sequence(self, sequence):

Handle an ANSI/VT100 escape sequence.

Parameters
sequence:strThe escape sequence to handle.
def _print_char(self, char_code):

Print a character to the terminal buffer.

Parameters
char_code:intThe character code to print.
def _render_terminal(self):

Render the terminal buffer to the display using C module

def _scroll_up(self):

Scroll terminal content up by one line

def _updateInternalBuffer(self):

Poll input and fill the output buffer with terminal sequences.

_batch_mode: bool =

Undocumented

_comment_color =

Undocumented

_last_render_time =

Undocumented

_needs_render: bool =

Undocumented

_render_enabled: bool =

Undocumented

_render_throttle_ms: int =

Undocumented

_string_color =

Undocumented

_syntax_map =

Undocumented