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+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers