2.5 cursor operation
==================
2.5.1 cursor description
---------------
* In the curses library, the cursor is divided into the physical cursor and the logical cursor. The physical cursor has only one, while the logical cursor belongs to the curses window. Each window has only one physical cursor, but may have multiple logical curses.
* The physical cursor position will change after processing the input function, but you can use the _ leave flag in the WINDOW structure to locate it again.
* If the _ leave flag is set, after the input is complete, the logical cursor moves to the last written area in the window pointed by the physical cursor.
* If the _ leave flag is not set, after the input operation is complete, the physical cursor will return to the location where the logical cursor points to the window
* _ Leave flag controlled by leaveok () function
2.5.2 cursor movement function
-------------------
/** @ Brief move the logic cursor to the specified position @ param x coordinate, indicating the number of rows in the position after moving @ param y coordinate, number of columns in the moving position */int move (int x, int y ); /** @ brief move the physical cursor to the specified position @ param last_x move the row position where the cursor is located @ param last_y move the column position where the cursor is located @ param new_x move the row where the cursor is located position @ param new_y the position of the cursor column after moving @ note mvcur () it takes effect immediately without waiting for screen refresh */void mvcur (int last_x, int last_y, int new_x, int new_y ); /** @ brief set the state of the physical cursor @ param visibility the state of the physical cursor 0 hide 1 normal 2 highlighted */int curs_set (int visiblility)
This article is from the "dark day" blog, please be sure to keep this source http://darksun.blog.51cto.com/3874064/1286703