UI module

visible_lines

procedure · 1 overloadsince 0.31.0Source

The visible rows of an editor as (first line, last line, line height), from its last layout.

visible_lines :: (
    ui: *UI_State,
    edit: *Text_Edit,
    node: *Node,
    options: Editor_Options
) -> (first: int, last: int, line_height: float)

The visible rows of an editor as (first line, last line, line height), from its last layout.

Parameters

ui: *UI_State
the UI whose text system measures the lines.
edit: *Text_Edit
the text being edited.
node: *Node
the editor's node, whose height says how much fits.
options: Editor_Options
the editor's font and size.

Returns

first: int
last: int
line_height: float

See also