mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-10-28 15:41:36 +01:00
* new version (2.07) of ncrt and associated files committed
This commit is contained in:
parent
64691d0256
commit
36f8ca87d0
@ -32,6 +32,10 @@
|
|||||||
2.06 | 01/11/00 | kjw | 1) Oops! 2.04 change went back to stdscr vs. ActiveWn.
|
2.06 | 01/11/00 | kjw | 1) Oops! 2.04 change went back to stdscr vs. ActiveWn.
|
||||||
| Keypressed works correctly with windows again.
|
| Keypressed works correctly with windows again.
|
||||||
| 2) ClrEol works correctly now with color.
|
| 2) ClrEol works correctly now with color.
|
||||||
|
2.07 | 01/31/00 | kjw | 1) Added NCRT_VERSION constants.
|
||||||
|
| 2) Added prev_textattr to detect a change in
|
||||||
|
| TextAttr value so current color gets updated.
|
||||||
|
| 3) See ocrt.pp
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -59,6 +63,11 @@ Procedure Window(x,y,x1,y1 : integer);
|
|||||||
|
|
||||||
Const
|
Const
|
||||||
|
|
||||||
|
NCRT_VERSION_MAJOR = 2;
|
||||||
|
NCRT_VERSION_MINOR = 7;
|
||||||
|
NCRT_VERSION_PATCH = 0;
|
||||||
|
NCRT_VERSION = '2.07.00';
|
||||||
|
|
||||||
{ CRT modes }
|
{ CRT modes }
|
||||||
BW40 = 0; { 40x25 B/W on Color Adapter }
|
BW40 = 0; { 40x25 B/W on Color Adapter }
|
||||||
CO40 = 1; { 40x25 Color on Color Adapter }
|
CO40 = 1; { 40x25 Color on Color Adapter }
|
||||||
@ -165,6 +174,7 @@ Var
|
|||||||
MaxRows, { set at startup to terminal values }
|
MaxRows, { set at startup to terminal values }
|
||||||
MaxCols : longint; { for columns and rows }
|
MaxCols : longint; { for columns and rows }
|
||||||
tios : TermIOS; { saves the term settings at startup }
|
tios : TermIOS; { saves the term settings at startup }
|
||||||
|
prev_textattr : integer; { detect change in TextAttr }
|
||||||
|
|
||||||
{==========================================================================
|
{==========================================================================
|
||||||
This code chunk is from the FPC source tree in rtl/inc/textrec.inc.
|
This code chunk is from the FPC source tree in rtl/inc/textrec.inc.
|
||||||
@ -335,6 +345,7 @@ End;
|
|||||||
Procedure nWinColor(win : pWindow; att : integer);
|
Procedure nWinColor(win : pWindow; att : integer);
|
||||||
Begin
|
Begin
|
||||||
wattr_set(win,CursesAtts(att));
|
wattr_set(win,CursesAtts(att));
|
||||||
|
prev_textattr := att;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
{ clear the specified window }
|
{ clear the specified window }
|
||||||
@ -523,6 +534,8 @@ End;
|
|||||||
{ write a string to a window at the current cursor position }
|
{ write a string to a window at the current cursor position }
|
||||||
Procedure nWrite(win : pWindow; s : string);
|
Procedure nWrite(win : pWindow; s : string);
|
||||||
Begin
|
Begin
|
||||||
|
If TextAttr <> prev_textattr Then
|
||||||
|
nWinColor(win,TextAttr);
|
||||||
waddstr(win,StrPCopy(ps,s));
|
waddstr(win,StrPCopy(ps,s));
|
||||||
If doRefresh Then wrefresh(win);
|
If doRefresh Then wrefresh(win);
|
||||||
End;
|
End;
|
||||||
@ -742,6 +755,7 @@ End;
|
|||||||
function Keypressed : boolean;
|
function Keypressed : boolean;
|
||||||
var
|
var
|
||||||
l : longint;
|
l : longint;
|
||||||
|
fd : fdSet;
|
||||||
Begin
|
Begin
|
||||||
Keypressed := FALSE;
|
Keypressed := FALSE;
|
||||||
nodelay(ActiveWn,bool(TRUE));
|
nodelay(ActiveWn,bool(TRUE));
|
||||||
|
|||||||
@ -24,6 +24,7 @@ Unit nCrt;
|
|||||||
2.04 | 01/04/00 | kjw | See ncrt.inc
|
2.04 | 01/04/00 | kjw | See ncrt.inc
|
||||||
2.05 | 01/06/00 | kjw | See ncrt.inc, ocrt.pp
|
2.05 | 01/06/00 | kjw | See ncrt.inc, ocrt.pp
|
||||||
2.06 | 01/11/00 | kjw | See ncrt.inc.
|
2.06 | 01/11/00 | kjw | See ncrt.inc.
|
||||||
|
2.07 | 01/31/00 | kjw | See ncrt.inc, ocrt.pp
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
}
|
}
|
||||||
Interface
|
Interface
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -63,6 +63,9 @@ Unit oCrt;
|
|||||||
| 3) nSEdit was not handling tec.firsttime correctly
|
| 3) nSEdit was not handling tec.firsttime correctly
|
||||||
| when a tec.special was processed.
|
| when a tec.special was processed.
|
||||||
2.06 | 01/11/00 | kjw | See ncrt.inc.
|
2.06 | 01/11/00 | kjw | See ncrt.inc.
|
||||||
|
2.07 | 01/31/00 | kjw | 1) See ncrt.inc.
|
||||||
|
| 2) Added getcolor, getframecolor, getheadercolor
|
||||||
|
| methods to tnWindow.
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
}
|
}
|
||||||
Interface
|
Interface
|
||||||
@ -176,6 +179,9 @@ Type
|
|||||||
Function GetHeader : string;
|
Function GetHeader : string;
|
||||||
Procedure PutHeader(hdr : string; hcolor : integer; hpos : tnJustify);
|
Procedure PutHeader(hdr : string; hcolor : integer; hpos : tnJustify);
|
||||||
Procedure SetColor(att : integer);
|
Procedure SetColor(att : integer);
|
||||||
|
Function GetColor : integer;
|
||||||
|
Function GetFrameColor : integer;
|
||||||
|
Function GetHeaderColor : integer;
|
||||||
Procedure PutFrame(att : integer);
|
Procedure PutFrame(att : integer);
|
||||||
Procedure Move(x,y : integer);
|
Procedure Move(x,y : integer);
|
||||||
Procedure Scroll(ln : integer; dir : tnUpDown);
|
Procedure Scroll(ln : integer; dir : tnUpDown);
|
||||||
@ -433,6 +439,24 @@ Begin
|
|||||||
If visible Then wrefresh(wn);
|
If visible Then wrefresh(wn);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
{ get the writeable window color }
|
||||||
|
Function tnWindow.GetColor : integer;
|
||||||
|
Begin
|
||||||
|
GetColor := wincolor;
|
||||||
|
End;
|
||||||
|
|
||||||
|
{ get the frame color }
|
||||||
|
Function tnWindow.GetFrameColor : integer;
|
||||||
|
Begin
|
||||||
|
GetFrameColor := framecolor;
|
||||||
|
End;
|
||||||
|
|
||||||
|
{ get the header color }
|
||||||
|
Function tnWindow.GetHeaderColor : integer;
|
||||||
|
Begin
|
||||||
|
GetHeaderColor := hdrcolor;
|
||||||
|
End;
|
||||||
|
|
||||||
{ frame an un-framed window, or update the frame color of a framed window }
|
{ frame an un-framed window, or update the frame color of a framed window }
|
||||||
Procedure tnWindow.PutFrame(att : integer);
|
Procedure tnWindow.PutFrame(att : integer);
|
||||||
Var
|
Var
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user