ECS 36B Lecture Notes - Lecture 10: Ncurses

54 views2 pages
Verified Note

Document Summary

It"s a terminal handling library typically used under unix and windows. Allows you to write to any location on the screen. Treats the terminal like a 2d array of characters which you write to. Have to modify the cmakelists. txt file to include for curses functionality. Echo() -- whatever you type appears on screen. Moves the cursor to position (row, column) All of the write functions will translate your input to a virtual screen. Refresh() -- allows the virtual screen to be displayed on the actual screen. Stdscr represents the entire screen and often times it is better to split this into different parts depending on desired functionality. In a game, may want one area for user input, one to display actions, and one to display stats. Newwin command creates a new virtual screen window. Subwin and derwin commands use the parent window. Writing functions take the same arguments as stdscr except for the extra slot to specify window.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers