Previous: Characters, Up: Components of a Curses Interface   [Contents][Index]

2.4 Windows

Curses uses the concept of a window to visually organize the terminal. A window is a rectangular area on the terminal. A terminal always has one default window which is the size of the physical screen. This may be further subdivided into other windows. The default window is called the standard screen.

Each window has a set of associated visual properties: the default rendition of characters added to it and whether it scrolls when text reaches the bottom of the screen, for example.

Each window forms a coordinate system for the display of characters. The top-left character location in the window is the origin, (0, 0). x coordinates increase as one moves right and y coordinates increase as one moves down. Because the origin begins at zero, the largest allowable x value will be the number of columns minus one.