home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_400 / 414_02 / doc / overview.man < prev    next >
Encoding:
Text File  |  1992-11-14  |  3.1 KB  |  61 lines

  1. /*man-start*********************************************************************
  2.  
  3.  
  4.  
  5.             Curses Overview
  6.  
  7.  
  8.  
  9. The X/Open Curses Interface Definition describes a set of C-Language
  10.  
  11. functions that provide screen-handling and updating, which are
  12.  
  13. collectively known as the curses library.
  14.  
  15.  
  16.  
  17. The curses library permits manipulation of data structures called
  18.  
  19. windows which may be thought of as two-dimensional arrays of
  20.  
  21. characters representing all or part of a terminal's screen.  The
  22.  
  23. windows are manipulated using a procedural interface described
  24.  
  25. elsewhere.  The curses package maintains a record of what characters
  26.  
  27. are on the screen.  At the most basic level, manipulation is done with
  28.  
  29. the routines move() and addch() which are used to "move" the curses
  30.  
  31. around and add characters to the default window, stdscr, which
  32.  
  33. represents the whole screen.
  34.  
  35.  
  36.  
  37. An application may use these routines to add data to the window in any
  38.  
  39. convenient order.  Once all data have been added, the routine
  40.  
  41. refresh() is called.  The package then determines what changes have
  42.  
  43. been made which affect the screen.  The screen contents are then
  44.  
  45. changed to reflect those characters now in the window. using a
  46.  
  47. sequence of operations optimised for the type of terminal in use. 
  48.  
  49.  
  50.  
  51. At a higher level routines combining the actions of move() and addch()
  52.  
  53. are defined, as are routines to add whole strings and to perform
  54.  
  55. format conversions in the manner of printf(). 
  56.  
  57.  
  58.  
  59. Interfaces are alse defined to erase the entire window and to specify
  60.  
  61. the attributes of individual characters in the winodw.  Attributes
  62.  
  63. such as inverse video, underline and blink can be used on a
  64.  
  65. per-character basis. 
  66.  
  67.  
  68.  
  69. New windows can be created by allowing the application to build
  70.  
  71. several images of the screen and display the appropriate one very
  72.  
  73. quickly.  New windows are created using the routine newwin().  For
  74.  
  75. each routine that manipulates the default window, stdscr, there is a
  76.  
  77. corresponding routine prefixed with w to manipulate the contents of a
  78.  
  79. specified window; for example, move() and wmove().  In fact, move(...)
  80.  
  81. is functionally equivalent to wmove( stdscr, ...).  This is similar to
  82.  
  83. the interface offered by printf(...) and fprintf(stdout, ...). 
  84.  
  85.  
  86.  
  87. Windows do not have to correspond to the entire screen.  It is
  88.  
  89. possible to create smaller windows, and also to indicate that the
  90.  
  91. window is only partially visible on the screen.  Furthermore, large
  92.  
  93. windows or pads, which are bigger than the actual screen size, may be
  94.  
  95. created. 
  96.  
  97.  
  98.  
  99. The routine newterm() may be called to "open" additional terminals by
  100.  
  101. large applications wishing to manipulate several terminals at once.
  102.  
  103. The set_term() function is used to select the terminal whose screen is
  104.  
  105. to be updated by the next refresh(). 
  106.  
  107.  
  108.  
  109. Interfaces are also defined to allow input character manipulation and
  110.  
  111. to disable and enable many input attributes: character echo, single
  112.  
  113. character input with or without signal processing (cbreak or raw
  114.  
  115. modes), carriage returns mapping to newlines, screen scrolling, etc. 
  116.  
  117.  
  118.  
  119. **man-end**********************************************************************/
  120.  
  121.