Set one line, truncated to the frame width in code points.
A row outside the frame is ignored rather than an error: a caller drawing a list longer than the terminal should not have to check every write.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(frame_t), | intent(inout) | :: | this | |||
| integer(kind=default_int), | intent(in) | :: | row |
One-based row. |
||
| character(len=*), | intent(in) | :: | text |
Text for the row. |
subroutine frame_set_line(this, row, text) !! Set one line, truncated to the frame width in code points. !! !! A row outside the frame is ignored rather than an error: a caller !! drawing a list longer than the terminal should not have to check !! every write. class(frame_t), intent(inout) :: this integer(default_int), intent(in) :: row !! One-based row. character(len=*), intent(in) :: text !! Text for the row. if (row < 1_default_int .or. row > this%rows) return this%current(row) = truncate_to_width(text, this%cols) end subroutine frame_set_line