]> ncurses.scripts.mit.edu Git - ncurses.git/blob - c++/README-first
ncurses 4.1
[ncurses.git] / c++ / README-first
1                   C++ interface to ncurses routines
2 -----------------------------------------------------------------------
3
4 This directory contains the source code for three C++ classes which
5 ease the use of writing ncurses-based programs.  The code is derived
6 from the libg++ CursesWindow class but enhanced for ncurses.
7
8 The classes simplify the use of window specific functions by
9 encapsulating them in the window object.  Function overloading is
10 used in order to narrow the interface.  E.g. you don't have the
11 distinction between `printw' and `mvprintw' anymore.
12
13 A second benefit is the removal of all #defines which are included in
14 the curses.h file.  This is a steady cause of trouble because many
15 common identifiers are used.  Instead now all #defines are inline
16 functions which also allows strict type checking of arguments.
17
18 The next enhancement is color support, which is provided by a derived
19 class.  The implementation chosen here is directed to unrestricted use
20 of mixes of color and monochrome windows.  This is done through virtual
21 functions and means that you can write all of your code as if a color
22 window is the destination.  If the destination window is monochrome these
23 functions calls have no effect.
24
25         NOTE: This implementation of the color support was topic of
26         some discussion.  The introduction of virtual functions
27         introduced some overhead.  Please let us know what you think
28         about this: is it worth being able to write color supporting
29         functions.
30
31 The last point to mention is the support of another package Zeyd
32 distributes with his ncurses package: the panels library.  This support
33 is provided by the NCursesPanel class, which is also derived from the
34 NCursesWindow class.  This allows building interfaces with windows.
35 Please see the example program for a quick introduction.
36
37 Note that at this point, there is no documentation for these classes.
38 Hopefully some will be written in the not too distant future.  For now,
39 to find out how to use the classes, read the code and the example program.
40
41 Suggestions for enhancements and contributions of code (and docs) are
42 welcome.  Please let us know which functionality you miss.
43
44         ATTENTION LINUX USERS:  There is currently some discussion of
45         replacing the BSD curses in the Linux libc with ncurses.  If
46         this is done we could perhaps include these classes in the Linux
47         libg++ replacing the original CursesWindow class (and renaming it
48         to CursesWindow).  This could be done because NCursesWindow can
49         be made easily to a superset of the CursesWindow class.
50
51
52 Original author:
53      Eric Newton         <newton@rocky.oswego.edu> for FSF's libg++
54
55 Authors of this release:
56      Ulrich Drepper      <drepper@ira.uka.de>
57  and Anatoly Ivasyuk     <anatoly@nick.csh.rit.edu>