In the Curses library, there are
two types of cursors:
|The cursor location within each window. A window's data structure keeps track of the location of its logical cursor. Each window has a logical cursor.
|The display cursor. The workstation uses this cursor to write to the display. There is only one physical cursor per display.
You can only add to or erase
characters at the current cursor location in a window. The following
subroutines are provided for controlling the cursor:
|Moves the logical cursor associated with the stdscr.
|Moves the logical cursor associated with a user-defined window.
|Places the beginning coordinates of the window in integer variables y and x.
|Places the size of the window in integer variables y and x.
|Returns the current coordinates of the virtual screen cursor.
|Returns the position of the logical cursor associated with a specified window.
|Controls physical cursor placement after a call to the wrefresh subroutine.
|Moves the physical cursor.
|Sets the virtual screen cursor to the specified coordinate.
After a call to the refresh or wrefresh subroutine, curses places the physical cursor at the last updated character position in the window. To leave the physical cursor where it is and not move it after a refresh, call the leaveok subroutine with the Window parameter set to the desired window and the Flag parameter set to TRUE.
Chapter 2, The Curses Library
Understanding Terminals with curses