nCrt is a partial replacement for the standard FPC crt unit. The FPC unit
works well mostly only with the VT100 terminal type and the Linux console.
nCrt uses the ncurses
library for all it's screen manipulation, so the big gain is in terminal
independence. Although not intended as a drop-in replacement for crt, nCrt
includes most of the procedures and functions from crt, as
well as many more functions to ease up screen control when writing programs
with FPC on Linux. For the most part, it should not be necessary to use crt
or ncurses directly, as nCrt handles multiple windows, cursor control and
colors. A Linux version of the old inline FWrite() is included which writes a string to the
screen with x,y positioning, color, and a defined clear-to-col, without moving
the cursor. Screens can also be built incrementally, then put to the screen
with a single call. Michael's
ncurses unit is
Version 1.01, Nov 22,1999 - Released to ftp.
Version 1.02, Nov 26,1999 - Added new function nKeyPressed(). This is like keypressed but uses a timeout value and no cpu cycles.
Version 1.03, Dec 01,1999 - Added global variable nIsActive. This is set to true when StartCurses() returns succesfully. Any nCrt function that accesses the ncurses library will simply exit if nIsActive is FALSE.
Version 1.04, Dec 03,1999 - Added procedures nHLine, nVLine, nWriteAC, and some more ACS functions. These add new capabilities for, and correct some problems when using the line drawing characters.
Version 1.10, Dec 12,1999 - This version has had much rework done to make it more robust, more efficient, and easier to use. The main addition to this version is a window object using BP7 style OOP. All of the procedural style code is still available, but the window object makes working with multiple windows much simpler. Also included in this version is the addition of a string editor which uses the cursor keys and can trap for the function keys and other extended keys. The demo program, ncrt_demo, has been updated to show the OOP windowing functions and also another demo program, edit_demo, has been added to show a very simple wysiwyg screen editor using the OOP functions.
Version 1.11, Dec 12,1999 - Added Special property to tEC object. This allows a list of any normal characters to trigger SEdit() to exit when specified.
Version 2.15, July 25, 2000 - Added nMaxRows and nMaxCols consts which are initialzed at unit startup. These are the maximum rows and columns values of the full screen window. Added the tnMenu object. This is an OOP wrapper for the ncurses menu library. Currently, it is fully functional, providing single or multiple row/col, framed or unframed menus with colors, positioned anywhere on the screen, and with full cursor navigation using the keypad arrows, etc., or using control keys for dumb terminals. This is the first level of menuing functionality, with more to be added later.
Version 2.16, August 28, 2000 - Lot's of small internal
adjustments. Added nTermName. Added some new methods to the tnMenu object. Added
tnWindow.Resize method. Added new procedures for reading character and color
info from the screen including nGrabScreen and nPopScreen for saving and
restoring portions or all of a screen. See screen_demo.pp for examples of
use. The edit_demo program has been enhanced some with more menuing work and
it now reads and writes text files and includes full navigation with
scrolling and paging through the entire file in memory.
Note: Some modifications to update ncurses.pp were required so make sure you use the ncurses.pp included with nCrt.
Version 2.16.01, October 09, 2000 - Bug fix. Keypressed function was echoing the character typed. Amazing it went this long undetected!
Version 2.16.02, December 08, 2000 - Added nkTab const. nShowMessage now sets and restores textattr.
Version 2.16.03, February 09, 2001 - Bug fix. nClreol was not handling TextAttr completely.
Version 2.16.04, February 15, 2001 - Bug fix. Added patch to update WindMin and WindMax in Window() procedure. Thanks to Santucco for submitting the patch!
Version 2.16.05, May 13, 2002 - Updates for stricter 1.06 compiler.
Version 2.17.00, March 07, 2003 - Added some minor language support. Added overloaded versions of tnWindow.Align() for using optional offsets. Based on ideas from Rainer Hantsch. Thanks Rainer!
Back to Cncware Free Pascal Library