euporie.core.layout.scroll.WindowRenderInfo

class euporie.core.layout.scroll.WindowRenderInfo(window: Window, ui_content: UIContent, horizontal_scroll: int, vertical_scroll: int, window_width: int, window_height: int, configured_scroll_offsets: ScrollOffsets, visible_line_to_row_col: dict[int, tuple[int, int]], rowcol_to_yx: dict[tuple[int, int], tuple[int, int]], x_offset: int, y_offset: int, wrap_lines: bool)

Render information for the last render time of this control. It stores mapping information between the input buffers (in case of a BufferControl) and the actual render position on the output screen.

(Could be used for implementation of the Vi ‘H’ and ‘L’ key bindings as well as implementing mouse support.)

Parameters:
  • ui_content – The original UIContent instance that contains the whole input, without clipping. (ui_content)

  • horizontal_scroll – The horizontal scroll of the Window instance.

  • vertical_scroll – The vertical scroll of the Window instance.

  • window_width – The width of the window that displays the content, without the margins.

  • window_height – The height of the window that displays the content.

  • configured_scroll_offsets – The scroll offsets as configured for the Window instance.

  • visible_line_to_row_col – Mapping that maps the row numbers on the displayed screen (starting from zero for the first visible line) to (row, col) tuples pointing to the row and column of the UIContent.

  • rowcol_to_yx – Mapping that maps (row, column) tuples representing coordinates of the UIContent to (y, x) absolute coordinates at the rendered screen.