| 1 |
------------------------------------------------------------------------------- |
| 2 |
-- Copyright 2020,2021 Thomas E. Dickey -- |
| 3 |
-- Copyright 1998-2006,2007 Free Software Foundation, Inc. -- |
| 4 |
-- -- |
| 5 |
-- Permission is hereby granted, free of charge, to any person obtaining a -- |
| 6 |
-- copy of this software and associated documentation files (the -- |
| 7 |
-- "Software"), to deal in the Software without restriction, including -- |
| 8 |
-- without limitation the rights to use, copy, modify, merge, publish, -- |
| 9 |
-- distribute, distribute with modifications, sublicense, and/or sell copies -- |
| 10 |
-- of the Software, and to permit persons to whom the Software is furnished -- |
| 11 |
-- to do so, subject to the following conditions: -- |
| 12 |
-- -- |
| 13 |
-- The above copyright notice and this permission notice shall be included -- |
| 14 |
-- in all copies or substantial portions of the Software. -- |
| 15 |
-- -- |
| 16 |
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -- |
| 17 |
-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -- |
| 18 |
-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -- |
| 19 |
-- NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -- |
| 20 |
-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -- |
| 21 |
-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -- |
| 22 |
-- USE OR OTHER DEALINGS IN THE SOFTWARE. -- |
| 23 |
-- -- |
| 24 |
-- Except as contained in this notice, the name(s) of the above copyright -- |
| 25 |
-- holders shall not be used in advertising or otherwise to promote the -- |
| 26 |
-- sale, use or other dealings in this Software without prior written -- |
| 27 |
-- authorization. -- |
| 28 |
------------------------------------------------------------------------------- |
| 29 |
-- $Id: README-first,v 1.11 2021/06/17 21:20:30 tom Exp $ |
| 30 |
------------------------------------------------------------------------------- |
| 31 |
C++ interface to ncurses routines |
| 32 |
----------------------------------------------------------------------- |
| 33 |
|
| 34 |
This directory contains the source code for several C++ classes which |
| 35 |
ease the use of writing ncurses-based programs. The code was originally |
| 36 |
derived from the libg++ CursesWindow class, but rewritten for ncurses. |
| 37 |
|
| 38 |
The classes simplify the use of window specific functions by |
| 39 |
encapsulating them in the window object. Function overloading is |
| 40 |
used in order to narrow the interface. For example, you do not have the |
| 41 |
distinction between `printw' and `mvprintw' anymore. |
| 42 |
|
| 43 |
A second benefit is the removal of all #defines which are included in |
| 44 |
the curses.h file. This is a steady cause of trouble because many |
| 45 |
common identifiers are used. Instead now all #defines are inline |
| 46 |
functions, which also allows strict type checking of arguments. |
| 47 |
|
| 48 |
The next enhancement is color support. It was originally provided by a |
| 49 |
derived class. This caused some trouble if you think about Panels or |
| 50 |
Menus and Forms with colors. We decided to put color support into the |
| 51 |
base class so that any derived class may use color support also. |
| 52 |
The implementation chosen here is directed to unrestricted use |
| 53 |
of mixes of color and monochrome windows. The original NCursesColorWindow |
| 54 |
class is maintained for compatibility reasons. |
| 55 |
|
| 56 |
The last point to mention is the support of other packages that are |
| 57 |
distributed with the ncurses package: the panels library, the menu library |
| 58 |
and the form library. This support is provided by the NCursesPanel class, |
| 59 |
which is also derived from the NCursesWindow class and the NCursesMenu |
| 60 |
and NCursesForm classes which are derived from NCursesPanel. This allows |
| 61 |
building interfaces with windows. |
| 62 |
|
| 63 |
Please see the example program for a quick introduction. |
| 64 |
|
| 65 |
Note that at this point, there is no documentation for these classes. |
| 66 |
Hopefully some will be written in the not too distant future. For now, |
| 67 |
to find out how to use the classes, read the code and the example program. |
| 68 |
|
| 69 |
Suggestions for enhancements and contributions of code (and docs) are |
| 70 |
welcome. Please let us know which functionality you miss. |
| 71 |
|
| 72 |
Original author: |
| 73 |
Eric Newton <[email protected]> for FSF's libg++ |
| 74 |
|
| 75 |
Authors of first ncurses based release (NCursesWindow, NCursesPanel): |
| 76 |
Ulrich Drepper <[email protected]> |
| 77 |
and Anatoly Ivasyuk <[email protected]> |
| 78 |
|
| 79 |
Authors of this release: |
| 80 |
Juergen Pfeifer |
| 81 |
Thomas E. Dickey |