Most Vermont Views window output functions respect the window's options. The virtual cursor automatically stays within the buffer until the buffer is filled with character output. When the buffer has been filled and the maximum rows have been scrolled, the virtual cursor rests in the first column of the row just below the end of the buffer.
The Vermont Views system provides a low level virtual cursor adjust function, cs_adj(), to check if the virtual cursor is within the buffer area of the window and, if it is not, to adjust its position. The function call is as follows:
|
When you call cs_adj() for a window whose virtual cursor is beyond the end of a row, the cursor position is adjusted so that it is in the first column of the next row. If the virtual cursor is beyond the end of the last row of the window, it is placed in the first column of the next row and a 0 is returned to signify that the window buffer is filled.
This function is useful if you are writing your own functions to do window output, and you will be maintaining the virtual cursor position yourself. It is also useful if you are using video output functions that do not respect window options.