Function libnotcurses_sys::ncplane_puttext[][src]

pub unsafe extern "C" fn ncplane_puttext(
    n: *mut ncplane,
    y: c_int,
    align: ncalign_e,
    text: *const c_char,
    bytes: *mut size_t
) -> c_int
Expand description

Write the specified text to the plane, breaking lines sensibly, beginning at the specified line. Returns the number of columns written. When breaking a line, the line will be cleared to the end of the plane (the last line will not be so cleared). The number of bytes written from the input is written to ‘*bytes’ if it is not NULL. Cleared columns are included in the return value, but not included in the number of bytes written. Leaves the cursor at the end of output. A partial write will be accomplished as far as it can; determine whether the write completed by inspecting ‘*bytes’. Can output to multiple rows even in the absence of scrolling, but not more rows than are available. With scrolling enabled, arbitrary amounts of data can be emitted. All provided whitespace is preserved – ncplane_puttext() followed by an appropriate ncplane_contents() will read back the original output.

If ‘y’ is -1, the first row of output is taken relative to the current cursor: it will be left-, right-, or center-aligned in whatever remains of the row. On subsequent rows – or if ‘y’ is not -1 – the entire row can be used, and alignment works normally.

A newline at any point will move the cursor to the next row.