|
@@ -137,7 +137,7 @@ Unit oCrt;
|
|
| 08/18/2000 | kjw |
|
|
| 08/18/2000 | kjw |
|
|
| 1) Added nkXXX constants for all(?) extended keys.
|
|
| 1) Added nkXXX constants for all(?) extended keys.
|
|
| 2) Changed all uses of extended keys to use new nkXXX's.
|
|
| 2) Changed all uses of extended keys to use new nkXXX's.
|
|
- | 3) Edit overloaded to return a nkXXX in ch rather that a char.
|
|
|
|
|
|
+ | 3) Edit overloaded to return a nkXXX in ch rather that a AnsiChar.
|
|
| 4) Resize method added to tnWindow.
|
|
| 4) Resize method added to tnWindow.
|
|
| 5) AddChMap overloaded for preferred (easier) use with nkXXX's.
|
|
| 5) AddChMap overloaded for preferred (easier) use with nkXXX's.
|
|
| 08/24/2000 | kjw |
|
|
| 08/24/2000 | kjw |
|
|
@@ -292,8 +292,8 @@ Const
|
|
Type
|
|
Type
|
|
{*** structures to save a screen via nGrabScreen ***}
|
|
{*** structures to save a screen via nGrabScreen ***}
|
|
pnOneRow = pchtype;
|
|
pnOneRow = pchtype;
|
|
- { a buffer for a max of 256 chtype items accessed via pchar }
|
|
|
|
- tnOneRow = array [0..1023] of char;
|
|
|
|
|
|
+ { a buffer for a max of 256 chtype items accessed via PAnsiChar }
|
|
|
|
+ tnOneRow = array [0..1023] of AnsiChar;
|
|
{ a one way linked list of screen rows }
|
|
{ a one way linked list of screen rows }
|
|
pnRowBuf = ^tnRowBuf;
|
|
pnRowBuf = ^tnRowBuf;
|
|
tnRowBuf = Record
|
|
tnRowBuf = Record
|
|
@@ -345,12 +345,12 @@ Type
|
|
InsMode,
|
|
InsMode,
|
|
ExitMode,
|
|
ExitMode,
|
|
AppendMode : boolean;
|
|
AppendMode : boolean;
|
|
- Special : string;
|
|
|
|
- Picture : string;
|
|
|
|
|
|
+ Special : shortstring;
|
|
|
|
+ Picture : shortstring;
|
|
CtrlColor : integer;
|
|
CtrlColor : integer;
|
|
ChMap : nChMap;
|
|
ChMap : nChMap;
|
|
Constructor Init(ft,ih,im,em,ap : boolean;
|
|
Constructor Init(ft,ih,im,em,ap : boolean;
|
|
- s,p : string;
|
|
|
|
|
|
+ s,p : shortstring;
|
|
cc : integer;
|
|
cc : integer;
|
|
mp : nChMap);
|
|
mp : nChMap);
|
|
Destructor Done;
|
|
Destructor Done;
|
|
@@ -397,12 +397,12 @@ Type
|
|
Procedure GotoXY(x,y : integer);
|
|
Procedure GotoXY(x,y : integer);
|
|
Function WhereX : integer;
|
|
Function WhereX : integer;
|
|
Function WhereY : integer;
|
|
Function WhereY : integer;
|
|
- Function ReadKey : char;
|
|
|
|
|
|
+ Function ReadKey : AnsiChar;
|
|
Procedure WriteAC(x,y,att,c : longint);
|
|
Procedure WriteAC(x,y,att,c : longint);
|
|
- Procedure FWrite(x,y,att,z : integer; s : string);
|
|
|
|
|
|
+ Procedure FWrite(x,y,att,z : integer; s : shortstring);
|
|
Procedure DrawBox(LineStyle,x1,y1,x2,y2,att : Integer);
|
|
Procedure DrawBox(LineStyle,x1,y1,x2,y2,att : Integer);
|
|
- Function GetHeader : string;
|
|
|
|
- Procedure PutHeader(hdr : string; hcolor : integer; hpos : tnJustify);
|
|
|
|
|
|
+ Function GetHeader : shortstring;
|
|
|
|
+ Procedure PutHeader(hdr : shortstring; hcolor : integer; hpos : tnJustify);
|
|
Procedure SetColor(att : integer);
|
|
Procedure SetColor(att : integer);
|
|
Function GetColor : integer;
|
|
Function GetColor : integer;
|
|
Function GetFrameColor : integer;
|
|
Function GetFrameColor : integer;
|
|
@@ -417,19 +417,19 @@ Type
|
|
Function GetY : integer;
|
|
Function GetY : integer;
|
|
Function IsFramed : boolean;
|
|
Function IsFramed : boolean;
|
|
Function IsVisible : Boolean;
|
|
Function IsVisible : Boolean;
|
|
- Function Edit(x,y,att,z,CursPos:Integer;es:String;Var ch : integer) : String;
|
|
|
|
|
|
+ Function Edit(x,y,att,z,CursPos:Integer;es:shortstring;Var ch : integer) : shortstring;
|
|
Function Edit(x,y,att,z,CursPos:Integer;es:LongInt;Var ch : integer) : LongInt;
|
|
Function Edit(x,y,att,z,CursPos:Integer;es:LongInt;Var ch : integer) : LongInt;
|
|
Function Edit(x,y,att,z,CursPos:Integer;es:Real;Var ch : integer) : Real;
|
|
Function Edit(x,y,att,z,CursPos:Integer;es:Real;Var ch : integer) : Real;
|
|
- Function Edit(x,y,att,z,CursPos:Integer;es:String;Var ch : Char) : String;
|
|
|
|
- Function Edit(x,y,att,z,CursPos:Integer;es:LongInt;Var ch : Char) : LongInt;
|
|
|
|
- Function Edit(x,y,att,z,CursPos:Integer;es:Real;Var ch : Char) : Real;
|
|
|
|
- Function EditNumber(x,y,att,wid,decm : integer;bgd : string;initv,minv,maxv : real;var esc : boolean) : real;
|
|
|
|
- Function EditNumber(x,y,att,wid,decm : integer;bgd : string;initv,minv,maxv : longint;var esc : boolean) : longint;
|
|
|
|
- Function EditDate(x,y,att : integer;initv : string;var esc : boolean) : string;
|
|
|
|
|
|
+ Function Edit(x,y,att,z,CursPos:Integer;es:shortstring;Var ch : AnsiChar) : shortstring;
|
|
|
|
+ Function Edit(x,y,att,z,CursPos:Integer;es:LongInt;Var ch : AnsiChar) : LongInt;
|
|
|
|
+ Function Edit(x,y,att,z,CursPos:Integer;es:Real;Var ch : AnsiChar) : Real;
|
|
|
|
+ Function EditNumber(x,y,att,wid,decm : integer;bgd : shortstring;initv,minv,maxv : real;var esc : boolean) : real;
|
|
|
|
+ Function EditNumber(x,y,att,wid,decm : integer;bgd : shortstring;initv,minv,maxv : longint;var esc : boolean) : longint;
|
|
|
|
+ Function EditDate(x,y,att : integer;initv : shortstring;var esc : boolean) : shortstring;
|
|
End;
|
|
End;
|
|
|
|
|
|
pnMenuStr = ^tnMenuStr;
|
|
pnMenuStr = ^tnMenuStr;
|
|
- tnMenuStr = array [0..79] of char; { storage for menu item text }
|
|
|
|
|
|
+ tnMenuStr = array [0..79] of AnsiChar; { storage for menu item text }
|
|
pnMenu = ^tnMenu;
|
|
pnMenu = ^tnMenu;
|
|
tnMenu = Object
|
|
tnMenu = Object
|
|
Private
|
|
Private
|
|
@@ -454,7 +454,7 @@ Type
|
|
win : pnWindow;
|
|
win : pnWindow;
|
|
Procedure InitWin;
|
|
Procedure InitWin;
|
|
Procedure ClearItem(idx : integer);
|
|
Procedure ClearItem(idx : integer);
|
|
- Procedure AddItem(i : integer; s : string);
|
|
|
|
|
|
+ Procedure AddItem(i : integer; s : shortstring);
|
|
Function Selectable(idx : integer) : boolean;
|
|
Function Selectable(idx : integer) : boolean;
|
|
Function IsValid(idx : integer) : boolean;
|
|
Function IsValid(idx : integer) : boolean;
|
|
Public
|
|
Public
|
|
@@ -470,12 +470,12 @@ Type
|
|
Function Wind : pnWindow; { pointer to the window object }
|
|
Function Wind : pnWindow; { pointer to the window object }
|
|
Procedure Move(_x,_y : integer); { shortcut window move }
|
|
Procedure Move(_x,_y : integer); { shortcut window move }
|
|
Procedure Align(hpos,vpos : tnJustify);{ shortcut window align }
|
|
Procedure Align(hpos,vpos : tnJustify);{ shortcut window align }
|
|
- Procedure PutHeader(hdr : string; hcolor : integer; hpos : tnJustify);
|
|
|
|
|
|
+ Procedure PutHeader(hdr : shortstring; hcolor : integer; hpos : tnJustify);
|
|
Procedure Clear; { unpost and clear the menu item list }
|
|
Procedure Clear; { unpost and clear the menu item list }
|
|
- Function Add(s : string) : integer; { append a menu item }
|
|
|
|
- Procedure Insert(idx : integer; s : string); { insert a menu item }
|
|
|
|
|
|
+ Function Add(s : shortstring) : integer; { append a menu item }
|
|
|
|
+ Procedure Insert(idx : integer; s : shortstring); { insert a menu item }
|
|
Procedure Remove(idx : integer); { delete a menu item }
|
|
Procedure Remove(idx : integer); { delete a menu item }
|
|
- Procedure Change(idx : integer; s : string); { change an item }
|
|
|
|
|
|
+ Procedure Change(idx : integer; s : shortstring); { change an item }
|
|
Procedure Active(idx : integer; b : boolean); { toggle gray }
|
|
Procedure Active(idx : integer; b : boolean); { toggle gray }
|
|
Function IsActive(idx : integer) : boolean; { item active ? }
|
|
Function IsActive(idx : integer) : boolean; { item active ? }
|
|
Procedure Spin(b : boolean);{ toggle item looping }
|
|
Procedure Spin(b : boolean);{ toggle item looping }
|
|
@@ -486,8 +486,8 @@ Type
|
|
Function Rows(_r : integer) : integer; {get/set menu rows }
|
|
Function Rows(_r : integer) : integer; {get/set menu rows }
|
|
Function Cols(_c : integer) : integer; {get/set menu columns }
|
|
Function Cols(_c : integer) : integer; {get/set menu columns }
|
|
Function IsAssigned(idx : integer) : boolean; { valid & assigned }
|
|
Function IsAssigned(idx : integer) : boolean; { valid & assigned }
|
|
- Function GetMark : string; { return the item mark string }
|
|
|
|
- Procedure SetMark(ms : string); { set the mark string }
|
|
|
|
|
|
+ Function GetMark : shortstring; { return the item mark shortstring }
|
|
|
|
+ Procedure SetMark(ms : shortstring); { set the mark string }
|
|
Procedure Refresh;
|
|
Procedure Refresh;
|
|
Procedure SetColor(att : byte); { change text color }
|
|
Procedure SetColor(att : byte); { change text color }
|
|
Procedure SetCursorColor(att : byte); { change cursor color }
|
|
Procedure SetCursorColor(att : byte); { change cursor color }
|
|
@@ -516,11 +516,11 @@ Procedure nDelLine(win : pWindow);
|
|
Procedure nGotoXY(win : pWindow; x,y : integer);
|
|
Procedure nGotoXY(win : pWindow; x,y : integer);
|
|
Function nWhereX(win : pWindow) : integer;
|
|
Function nWhereX(win : pWindow) : integer;
|
|
Function nWhereY(win : pWindow) : integer;
|
|
Function nWhereY(win : pWindow) : integer;
|
|
- Function nReadkey(win : pWindow) : char;
|
|
|
|
- Function nReadln(win : pWindow) : string;
|
|
|
|
-Procedure nWrite(win : pWindow; s : string);
|
|
|
|
-Procedure nWriteln(win : pWindow; s : string);
|
|
|
|
-Procedure nWriteScr(win : pWindow; x,y,att : integer; s : string);
|
|
|
|
|
|
+ Function nReadkey(win : pWindow) : AnsiChar;
|
|
|
|
+ Function nReadln(win : pWindow) : shortstring;
|
|
|
|
+Procedure nWrite(win : pWindow; s : shortstring);
|
|
|
|
+Procedure nWriteln(win : pWindow; s : shortstring);
|
|
|
|
+Procedure nWriteScr(win : pWindow; x,y,att : integer; s : shortstring);
|
|
Procedure nRefresh(win : pWindow);
|
|
Procedure nRefresh(win : pWindow);
|
|
Procedure nScroll(win : pWindow; lines : integer; dir : tnUpDown);
|
|
Procedure nScroll(win : pWindow; lines : integer; dir : tnUpDown);
|
|
Procedure nDrawBox(win : pWindow; LineStyle,x1,y1,x2,y2,att : Integer);
|
|
Procedure nDrawBox(win : pWindow; LineStyle,x1,y1,x2,y2,att : Integer);
|
|
@@ -552,34 +552,34 @@ Procedure nVLine(win : pwindow; col,row,attr,y : integer);
|
|
Procedure nWriteAC(win : pwindow; x,y : integer; att,acs_char : longint);
|
|
Procedure nWriteAC(win : pwindow; x,y : integer; att,acs_char : longint);
|
|
Function nIsBold(att : integer) : boolean;
|
|
Function nIsBold(att : integer) : boolean;
|
|
Function nSetColorPair(att : integer) : integer;
|
|
Function nSetColorPair(att : integer) : integer;
|
|
-Procedure nFWrite(win : pwindow; col,row,attrib : integer; clear : integer; s : string);
|
|
|
|
-Procedure nFWrite(col,row,attrib : integer; clear : integer; s : string);
|
|
|
|
- Function nSEdit(win : pwindow; x,y,att,z,CursPos:Integer;es:String;Var ch : Char) : String;
|
|
|
|
- Function nEdit(win : pwindow; x,y,att,z,CursPos:Integer;es:String;Var ch : Char) : String;
|
|
|
|
- Function nEdit(win : pwindow; x,y,att,z,CursPos:Integer;es:LongInt;Var ch : Char) : LongInt;
|
|
|
|
- Function nEdit(win : pwindow; x,y,att,z,CursPos:Integer;es:Real;Var ch : Char) : Real;
|
|
|
|
- Function nEdit(x,y,att,z,CursPos:Integer;es:String;Var ch : Char) : String;
|
|
|
|
- Function nEdit(x,y,att,z,CursPos:Integer;es:LongInt;Var ch : Char) : LongInt;
|
|
|
|
- Function nEdit(x,y,att,z,CursPos:Integer;es:Real;Var ch : Char) : Real;
|
|
|
|
- Function nEdit(win : pwindow; x,y,att,z,CursPos:Integer;es:String;Var chv : integer) : String;
|
|
|
|
|
|
+Procedure nFWrite(win : pwindow; col,row,attrib : integer; clear : integer; s : shortstring);
|
|
|
|
+Procedure nFWrite(col,row,attrib : integer; clear : integer; s : shortstring);
|
|
|
|
+ Function nSEdit(win : pwindow; x,y,att,z,CursPos:Integer;es:shortstring;Var ch : AnsiChar) : shortstring;
|
|
|
|
+ Function nEdit(win : pwindow; x,y,att,z,CursPos:Integer;es:shortstring;Var ch : AnsiChar) : shortstring;
|
|
|
|
+ Function nEdit(win : pwindow; x,y,att,z,CursPos:Integer;es:LongInt;Var ch : AnsiChar) : LongInt;
|
|
|
|
+ Function nEdit(win : pwindow; x,y,att,z,CursPos:Integer;es:Real;Var ch : AnsiChar) : Real;
|
|
|
|
+ Function nEdit(x,y,att,z,CursPos:Integer;es:shortstring;Var ch : AnsiChar) : shortstring;
|
|
|
|
+ Function nEdit(x,y,att,z,CursPos:Integer;es:LongInt;Var ch : AnsiChar) : LongInt;
|
|
|
|
+ Function nEdit(x,y,att,z,CursPos:Integer;es:Real;Var ch : AnsiChar) : Real;
|
|
|
|
+ Function nEdit(win : pwindow; x,y,att,z,CursPos:Integer;es:shortstring;Var chv : integer) : shortstring;
|
|
Function nEdit(win : pwindow; x,y,att,z,CursPos:Integer;es:LongInt;Var ch : integer) : LongInt;
|
|
Function nEdit(win : pwindow; x,y,att,z,CursPos:Integer;es:LongInt;Var ch : integer) : LongInt;
|
|
Function nEdit(win : pwindow; x,y,att,z,CursPos:Integer;es:Real;Var ch : integer) : Real;
|
|
Function nEdit(win : pwindow; x,y,att,z,CursPos:Integer;es:Real;Var ch : integer) : Real;
|
|
- Function nEdit(x,y,att,z,CursPos:Integer;es:String;Var ch : integer) : String;
|
|
|
|
|
|
+ Function nEdit(x,y,att,z,CursPos:Integer;es:shortstring;Var ch : integer) : shortstring;
|
|
Function nEdit(x,y,att,z,CursPos:Integer;es:LongInt;Var ch : integer) : LongInt;
|
|
Function nEdit(x,y,att,z,CursPos:Integer;es:LongInt;Var ch : integer) : LongInt;
|
|
Function nEdit(x,y,att,z,CursPos:Integer;es:Real;Var ch : integer) : Real;
|
|
Function nEdit(x,y,att,z,CursPos:Integer;es:Real;Var ch : integer) : Real;
|
|
- Function nEditNumber(win : pwindow; x,y,att,wid,decm : integer;bgd : string;initv,minv,maxv : real;var esc : boolean) : real;
|
|
|
|
- Function nEditNumber(win : pwindow; x,y,att,wid,decm : integer;bgd : string;initv,minv,maxv : longint;var esc : boolean) : longint;
|
|
|
|
- Function nEditNumber(x,y,att,wid,decm : integer;bgd : string;initv,minv,maxv : real;var esc : boolean) : real;
|
|
|
|
- Function nEditNumber(x,y,att,wid,decm : integer;bgd : string;initv,minv,maxv : longint;var esc : boolean) : longint;
|
|
|
|
- Function nEditDate(win : pwindow; x,y,att : integer;initv : string;var esc : boolean) : string;
|
|
|
|
- Function nEditDate(x,y,att : integer;initv : string;var esc : boolean) : string;
|
|
|
|
-Procedure nMakeWindow(var win : tnWindow;x1,y1,x2,y2,ta,ba,ha : integer;hasframe : boolean;hdrpos : tnJustify;hdrtxt : string);
|
|
|
|
-Procedure nMakeWindow(var win : pnWindow;x1,y1,x2,y2,ta,ba,ha : integer;hasframe : boolean;hdrpos : tnJustify;hdrtxt : string);
|
|
|
|
-Procedure nMakeMenu(var mnu : tnMenu;x,y,_w,_r,_c,ta,ca,ga,ba,ha : integer;hasframe : boolean;hdrpos : tnJustify;hdrtxt : string);
|
|
|
|
-Procedure nMakeMenu(var mnu : pnMenu;x,y,_w,_r,_c,ta,ca,ga,ba,ha : integer;hasframe : boolean;hdrpos : tnJustify;hdrtxt : string);
|
|
|
|
- Function nShowMessage(msg : string;matt : byte;hdr : string;hatt : byte;ack : boolean) : pnWindow;
|
|
|
|
- Function nReadScr(win : pWindow; x,y,n : integer) : string;
|
|
|
|
- Function nReadScr(x,y,n : integer) : string;
|
|
|
|
|
|
+ Function nEditNumber(win : pwindow; x,y,att,wid,decm : integer;bgd : shortstring;initv,minv,maxv : real;var esc : boolean) : real;
|
|
|
|
+ Function nEditNumber(win : pwindow; x,y,att,wid,decm : integer;bgd : shortstring;initv,minv,maxv : longint;var esc : boolean) : longint;
|
|
|
|
+ Function nEditNumber(x,y,att,wid,decm : integer;bgd : shortstring;initv,minv,maxv : real;var esc : boolean) : real;
|
|
|
|
+ Function nEditNumber(x,y,att,wid,decm : integer;bgd : shortstring;initv,minv,maxv : longint;var esc : boolean) : longint;
|
|
|
|
+ Function nEditDate(win : pwindow; x,y,att : integer;initv : shortstring;var esc : boolean) : shortstring;
|
|
|
|
+ Function nEditDate(x,y,att : integer;initv : shortstring;var esc : boolean) : shortstring;
|
|
|
|
+Procedure nMakeWindow(var win : tnWindow;x1,y1,x2,y2,ta,ba,ha : integer;hasframe : boolean;hdrpos : tnJustify;hdrtxt : shortstring);
|
|
|
|
+Procedure nMakeWindow(var win : pnWindow;x1,y1,x2,y2,ta,ba,ha : integer;hasframe : boolean;hdrpos : tnJustify;hdrtxt : shortstring);
|
|
|
|
+Procedure nMakeMenu(var mnu : tnMenu;x,y,_w,_r,_c,ta,ca,ga,ba,ha : integer;hasframe : boolean;hdrpos : tnJustify;hdrtxt : shortstring);
|
|
|
|
+Procedure nMakeMenu(var mnu : pnMenu;x,y,_w,_r,_c,ta,ca,ga,ba,ha : integer;hasframe : boolean;hdrpos : tnJustify;hdrtxt : shortstring);
|
|
|
|
+ Function nShowMessage(msg : shortstring;matt : byte;hdr : shortstring;hatt : byte;ack : boolean) : pnWindow;
|
|
|
|
+ Function nReadScr(win : pWindow; x,y,n : integer) : shortstring;
|
|
|
|
+ Function nReadScr(x,y,n : integer) : shortstring;
|
|
Function nReadScrStr(win : pWindow; x,y,n : integer; buf : pchtype) : pchtype;
|
|
Function nReadScrStr(win : pWindow; x,y,n : integer; buf : pchtype) : pchtype;
|
|
Function nReadScrStr(x,y,n : integer; buf : pchtype) : pchtype;
|
|
Function nReadScrStr(x,y,n : integer; buf : pchtype) : pchtype;
|
|
Function nReadScrColor(win : pWindow; x,y : integer) : integer;
|
|
Function nReadScrColor(win : pWindow; x,y : integer) : integer;
|
|
@@ -593,7 +593,7 @@ Procedure nPopScreen(p : pnScreenBuf; x,y : integer; win : pWindow);
|
|
Procedure nPopScreen(p : pnScreenBuf; x,y : integer);
|
|
Procedure nPopScreen(p : pnScreenBuf; x,y : integer);
|
|
Procedure nPopScreen(p : pnScreenBuf);
|
|
Procedure nPopScreen(p : pnScreenBuf);
|
|
Procedure nReleaseScreen(p : pnScreenBuf);
|
|
Procedure nReleaseScreen(p : pnScreenBuf);
|
|
- Function nCheckPxPicture(var s, Pic : string; var CPos : integer) : word;
|
|
|
|
|
|
+ Function nCheckPxPicture(var s, Pic : shortstring; var CPos : integer) : word;
|
|
|
|
|
|
{$i ncrt.inc}
|
|
{$i ncrt.inc}
|
|
{$i pxpic.inc}
|
|
{$i pxpic.inc}
|
|
@@ -781,20 +781,20 @@ Begin
|
|
dorefresh := tmp_b;
|
|
dorefresh := tmp_b;
|
|
End;
|
|
End;
|
|
|
|
|
|
-{ return the window border header string }
|
|
|
|
-Function tnWindow.GetHeader : string;
|
|
|
|
|
|
+{ return the window border header shortstring }
|
|
|
|
+Function tnWindow.GetHeader : shortstring;
|
|
Begin
|
|
Begin
|
|
GetHeader := header;
|
|
GetHeader := header;
|
|
End;
|
|
End;
|
|
|
|
|
|
{----------------------------------------------------------------------
|
|
{----------------------------------------------------------------------
|
|
- put/replace a header string at the top of a bordered window
|
|
|
|
|
|
+ put/replace a header shortstring at the top of a bordered window
|
|
|
|
|
|
- hdr = header string (top line of window, only if hasframe = true)
|
|
|
|
|
|
+ hdr = header shortstring (top line of window, only if hasframe = true)
|
|
hcolor = header line color
|
|
hcolor = header line color
|
|
- hpos = justfication of header string, left, center, or right
|
|
|
|
|
|
+ hpos = justfication of header shortstring, left, center, or right
|
|
----------------------------------------------------------------------}
|
|
----------------------------------------------------------------------}
|
|
-Procedure tnWindow.PutHeader(hdr : string; hcolor : integer; hpos : tnJustify);
|
|
|
|
|
|
+Procedure tnWindow.PutHeader(hdr : shortstring; hcolor : integer; hpos : tnJustify);
|
|
Var
|
|
Var
|
|
cp,
|
|
cp,
|
|
hx,
|
|
hx,
|
|
@@ -951,7 +951,7 @@ Begin
|
|
WhereY := nWhereY(wn);
|
|
WhereY := nWhereY(wn);
|
|
End;
|
|
End;
|
|
|
|
|
|
-Function tnWindow.ReadKey : char;
|
|
|
|
|
|
+Function tnWindow.ReadKey : AnsiChar;
|
|
Begin
|
|
Begin
|
|
ReadKey := nReadKey(wn);
|
|
ReadKey := nReadKey(wn);
|
|
End;
|
|
End;
|
|
@@ -964,7 +964,7 @@ Begin
|
|
dorefresh := tmp_b;
|
|
dorefresh := tmp_b;
|
|
End;
|
|
End;
|
|
|
|
|
|
-Procedure tnWindow.FWrite(x,y,att,z : integer; s : string);
|
|
|
|
|
|
+Procedure tnWindow.FWrite(x,y,att,z : integer; s : shortstring);
|
|
Begin
|
|
Begin
|
|
tmp_b := dorefresh;
|
|
tmp_b := dorefresh;
|
|
dorefresh := visible;
|
|
dorefresh := visible;
|
|
@@ -1016,7 +1016,7 @@ Begin
|
|
IsVisible := visible;
|
|
IsVisible := visible;
|
|
End;
|
|
End;
|
|
|
|
|
|
-Function tnWindow.Edit(x,y,att,z,CursPos:Integer;es:String;Var ch : integer) : String;
|
|
|
|
|
|
+Function tnWindow.Edit(x,y,att,z,CursPos:Integer;es:shortstring;Var ch : integer) : shortstring;
|
|
var
|
|
var
|
|
tmp_ec : tnec;
|
|
tmp_ec : tnec;
|
|
Begin
|
|
Begin
|
|
@@ -1032,7 +1032,7 @@ Begin
|
|
nEC := tmp_ec;
|
|
nEC := tmp_ec;
|
|
End;
|
|
End;
|
|
|
|
|
|
-Function tnWindow.Edit(x,y,att,z,CursPos:Integer;es:String;Var ch : Char) : String;
|
|
|
|
|
|
+Function tnWindow.Edit(x,y,att,z,CursPos:Integer;es:shortstring;Var ch : AnsiChar) : shortstring;
|
|
var
|
|
var
|
|
i : integer;
|
|
i : integer;
|
|
Begin
|
|
Begin
|
|
@@ -1053,7 +1053,7 @@ Begin
|
|
nEC := tmp_ec;
|
|
nEC := tmp_ec;
|
|
End;
|
|
End;
|
|
|
|
|
|
-Function tnWindow.Edit(x,y,att,z,CursPos:Integer;es:LongInt;Var ch : Char) : LongInt;
|
|
|
|
|
|
+Function tnWindow.Edit(x,y,att,z,CursPos:Integer;es:LongInt;Var ch : AnsiChar) : LongInt;
|
|
var
|
|
var
|
|
i : integer;
|
|
i : integer;
|
|
Begin
|
|
Begin
|
|
@@ -1074,7 +1074,7 @@ Begin
|
|
nEC := tmp_ec;
|
|
nEC := tmp_ec;
|
|
End;
|
|
End;
|
|
|
|
|
|
-Function tnWindow.Edit(x,y,att,z,CursPos:Integer;es:Real;Var ch : Char) : Real;
|
|
|
|
|
|
+Function tnWindow.Edit(x,y,att,z,CursPos:Integer;es:Real;Var ch : AnsiChar) : Real;
|
|
var
|
|
var
|
|
i : integer;
|
|
i : integer;
|
|
Begin
|
|
Begin
|
|
@@ -1082,7 +1082,7 @@ Begin
|
|
ch := chr(abs(i));
|
|
ch := chr(abs(i));
|
|
End;
|
|
End;
|
|
|
|
|
|
-Function tnWindow.EditNumber(x,y,att,wid,decm : integer;bgd : string;initv,minv,maxv : real;var esc : boolean) : real;
|
|
|
|
|
|
+Function tnWindow.EditNumber(x,y,att,wid,decm : integer;bgd : shortstring;initv,minv,maxv : real;var esc : boolean) : real;
|
|
var
|
|
var
|
|
tmp_ec : tnec;
|
|
tmp_ec : tnec;
|
|
Begin
|
|
Begin
|
|
@@ -1094,7 +1094,7 @@ Begin
|
|
nEC := tmp_ec;
|
|
nEC := tmp_ec;
|
|
End;
|
|
End;
|
|
|
|
|
|
-Function tnWindow.EditNumber(x,y,att,wid,decm : integer;bgd : string;initv,minv,maxv : longint;var esc : boolean) : longint;
|
|
|
|
|
|
+Function tnWindow.EditNumber(x,y,att,wid,decm : integer;bgd : shortstring;initv,minv,maxv : longint;var esc : boolean) : longint;
|
|
var
|
|
var
|
|
tmp_ec : tnec;
|
|
tmp_ec : tnec;
|
|
Begin
|
|
Begin
|
|
@@ -1106,7 +1106,7 @@ Begin
|
|
nEC := tmp_ec;
|
|
nEC := tmp_ec;
|
|
End;
|
|
End;
|
|
|
|
|
|
-Function tnWindow.EditDate(x,y,att : integer;initv : string;var esc : boolean) : string;
|
|
|
|
|
|
+Function tnWindow.EditDate(x,y,att : integer;initv : shortstring;var esc : boolean) : shortstring;
|
|
var
|
|
var
|
|
tmp_ec : tnec;
|
|
tmp_ec : tnec;
|
|
Begin
|
|
Begin
|
|
@@ -1121,7 +1121,7 @@ End;
|
|
{--------------------------- tnEC -------------------------------}
|
|
{--------------------------- tnEC -------------------------------}
|
|
|
|
|
|
Constructor tnEC.Init(ft,ih,im,em,ap : boolean;
|
|
Constructor tnEC.Init(ft,ih,im,em,ap : boolean;
|
|
- s,p : string;
|
|
|
|
|
|
+ s,p : shortstring;
|
|
cc : integer;
|
|
cc : integer;
|
|
mp : nChMap);
|
|
mp : nChMap);
|
|
Begin
|
|
Begin
|
|
@@ -1275,17 +1275,17 @@ Begin
|
|
End;
|
|
End;
|
|
|
|
|
|
{---------------------------------
|
|
{---------------------------------
|
|
- read input string from a window
|
|
|
|
|
|
+ read input shortstring from a window
|
|
---------------------------------}
|
|
---------------------------------}
|
|
-Function nReadln(win : pWindow) : string;
|
|
|
|
|
|
+Function nReadln(win : pWindow) : shortstring;
|
|
Begin
|
|
Begin
|
|
wgetstr(win,ps);
|
|
wgetstr(win,ps);
|
|
nReadln := StrPas(ps);
|
|
nReadln := StrPas(ps);
|
|
End;
|
|
End;
|
|
|
|
|
|
-{ write a string to a window without refreshing screen }
|
|
|
|
|
|
+{ write a shortstring to a window without refreshing screen }
|
|
{ DON'T update PrevWn! }
|
|
{ DON'T update PrevWn! }
|
|
-Procedure nWriteScr(win : pWindow; x,y,att : integer; s : string);
|
|
|
|
|
|
+Procedure nWriteScr(win : pWindow; x,y,att : integer; s : shortstring);
|
|
Var
|
|
Var
|
|
tmp : pwindow;
|
|
tmp : pwindow;
|
|
Begin
|
|
Begin
|
|
@@ -1345,7 +1345,7 @@ End;
|
|
write a string to a window at the current cursor position
|
|
write a string to a window at the current cursor position
|
|
followed by a newline
|
|
followed by a newline
|
|
-----------------------------------------------------------}
|
|
-----------------------------------------------------------}
|
|
-Procedure nWriteln(win : pWindow; s : string);
|
|
|
|
|
|
+Procedure nWriteln(win : pWindow; s : shortstring);
|
|
Begin
|
|
Begin
|
|
waddstr(win,StrPCopy(ps,s+#10));
|
|
waddstr(win,StrPCopy(ps,s+#10));
|
|
If doRefresh Then wrefresh(win);
|
|
If doRefresh Then wrefresh(win);
|
|
@@ -1585,10 +1585,10 @@ End;
|
|
Clear = clear line up to x position
|
|
Clear = clear line up to x position
|
|
s = string to write
|
|
s = string to write
|
|
-------------------------------------------------------------------}
|
|
-------------------------------------------------------------------}
|
|
-Procedure nFWrite(win : pwindow; col,row,attrib : integer; clear : integer; s : string);
|
|
|
|
|
|
+Procedure nFWrite(win : pwindow; col,row,attrib : integer; clear : integer; s : shortstring);
|
|
var
|
|
var
|
|
- clr : array [0..255] of char;
|
|
|
|
- cs : string;
|
|
|
|
|
|
+ clr : array [0..255] of AnsiChar;
|
|
|
|
+ cs : shortstring;
|
|
sub : pWindow;
|
|
sub : pWindow;
|
|
x,y,
|
|
x,y,
|
|
mx,my,
|
|
mx,my,
|
|
@@ -1647,16 +1647,16 @@ Begin
|
|
End;
|
|
End;
|
|
|
|
|
|
{ overload - no pointer }
|
|
{ overload - no pointer }
|
|
-Procedure nFWrite(col,row,attrib : integer; clear : integer; s : string);
|
|
|
|
|
|
+Procedure nFWrite(col,row,attrib : integer; clear : integer; s : shortstring);
|
|
Begin
|
|
Begin
|
|
nFWrite(ActiveWn,col,row,attrib,clear,s);
|
|
nFWrite(ActiveWn,col,row,attrib,clear,s);
|
|
End;
|
|
End;
|
|
|
|
|
|
{ compatibility for the old function name }
|
|
{ compatibility for the old function name }
|
|
Function nSEdit(win : pwindow; x,y,att,z,CursPos:integer;
|
|
Function nSEdit(win : pwindow; x,y,att,z,CursPos:integer;
|
|
- es:string;var ch : char) : string;
|
|
|
|
|
|
+ es:shortstring;var ch : AnsiChar) : shortstring;
|
|
Var
|
|
Var
|
|
- s : string;
|
|
|
|
|
|
+ s : shortstring;
|
|
Begin
|
|
Begin
|
|
s := nEdit(win,x,y,att,z,CursPos,es,ch);
|
|
s := nEdit(win,x,y,att,z,CursPos,es,ch);
|
|
nSEdit := s;
|
|
nSEdit := s;
|
|
@@ -1669,10 +1669,10 @@ Function nEdit(win : pwindow; { window to work in }
|
|
att, { color attribute }
|
|
att, { color attribute }
|
|
z, { right-most column of edit region }
|
|
z, { right-most column of edit region }
|
|
CursPos:integer; { place cursor on this column at start }
|
|
CursPos:integer; { place cursor on this column at start }
|
|
- es:string; { initial value of string }
|
|
|
|
|
|
+ es:shortstring; { initial value of shortstring }
|
|
var chv : integer { ordinal value of character typed, }
|
|
var chv : integer { ordinal value of character typed, }
|
|
{ negative for extended keys }
|
|
{ negative for extended keys }
|
|
- ) : string;
|
|
|
|
|
|
+ ) : shortstring;
|
|
Var
|
|
Var
|
|
ZMode,
|
|
ZMode,
|
|
AppendMode,
|
|
AppendMode,
|
|
@@ -1683,9 +1683,9 @@ Var
|
|
pres,
|
|
pres,
|
|
Index : integer;
|
|
Index : integer;
|
|
ts,
|
|
ts,
|
|
- hes : string;
|
|
|
|
|
|
+ hes : shortstring;
|
|
isextended : boolean;
|
|
isextended : boolean;
|
|
- ch : char;
|
|
|
|
|
|
+ ch : AnsiChar;
|
|
|
|
|
|
{~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
|
|
{~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
|
|
Procedure NewString;
|
|
Procedure NewString;
|
|
@@ -1716,7 +1716,7 @@ End;
|
|
|
|
|
|
{~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
|
|
{~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
|
|
Procedure WriteChar;
|
|
Procedure WriteChar;
|
|
-var s : string;
|
|
|
|
|
|
+var s : shortstring;
|
|
Begin
|
|
Begin
|
|
ts := es;
|
|
ts := es;
|
|
If AppendMode Then Begin
|
|
If AppendMode Then Begin
|
|
@@ -2006,7 +2006,7 @@ begin
|
|
ch := ReadKey;
|
|
ch := ReadKey;
|
|
{ make it a function key }
|
|
{ make it a function key }
|
|
If ch in ['1'..'9'] Then Begin
|
|
If ch in ['1'..'9'] Then Begin
|
|
- ch := Char(Ord(ch)+10);
|
|
|
|
|
|
+ ch := AnsiChar(Ord(ch)+10);
|
|
chv := ord(ch) * (-1);
|
|
chv := ord(ch) * (-1);
|
|
End Else ch := #27;
|
|
End Else ch := #27;
|
|
SEditExit := true;
|
|
SEditExit := true;
|
|
@@ -2015,12 +2015,12 @@ begin
|
|
Exit;
|
|
Exit;
|
|
End;
|
|
End;
|
|
#16 : Begin
|
|
#16 : Begin
|
|
- { embed control characters in the string }
|
|
|
|
|
|
+ { embed control characters in the shortstring }
|
|
ch := UpCase(ReadKey);
|
|
ch := UpCase(ReadKey);
|
|
If ch in ['@','2','A'..'Z'] Then Begin
|
|
If ch in ['@','2','A'..'Z'] Then Begin
|
|
ctrl := true;
|
|
ctrl := true;
|
|
If ch = '2' Then ch := '@';
|
|
If ch = '2' Then ch := '@';
|
|
- ch := Char(Ord(ch)-64);
|
|
|
|
|
|
+ ch := AnsiChar(Ord(ch)-64);
|
|
chv := ord(ch);
|
|
chv := ord(ch);
|
|
End;
|
|
End;
|
|
End;
|
|
End;
|
|
@@ -2036,11 +2036,11 @@ end;
|
|
The maps are 4 character strings interpreted as 2 sets of character
|
|
The maps are 4 character strings interpreted as 2 sets of character
|
|
pairs that represent the following:
|
|
pairs that represent the following:
|
|
|
|
|
|
- 1st char - If it is #0 then it is an extended char. Use the 2nd
|
|
|
|
|
|
+ 1st AnsiChar - If it is #0 then it is an extended AnsiChar. Use the 2nd
|
|
character to identify.
|
|
character to identify.
|
|
- 2nd char - Only used if 1st char is #0.
|
|
|
|
|
|
+ 2nd AnsiChar - Only used if 1st AnsiChar is #0.
|
|
|
|
|
|
- The first pair of the string is the actual key pressed.
|
|
|
|
|
|
+ The first pair of the shortstring is the actual key pressed.
|
|
The second pair is what that key should be become.
|
|
The second pair is what that key should be become.
|
|
|
|
|
|
#0#59 = F1, extended key
|
|
#0#59 = F1, extended key
|
|
@@ -2058,7 +2058,7 @@ end;
|
|
#0#0#0#59 = map ^@ to F1
|
|
#0#0#0#59 = map ^@ to F1
|
|
#97#0#65#0 = map a to A
|
|
#97#0#65#0 = map a to A
|
|
}
|
|
}
|
|
-Procedure MapKey(var ch : char;var eflag : boolean);
|
|
|
|
|
|
+Procedure MapKey(var ch : AnsiChar;var eflag : boolean);
|
|
Var
|
|
Var
|
|
i,
|
|
i,
|
|
cv : integer;
|
|
cv : integer;
|
|
@@ -2135,7 +2135,7 @@ End;{ of nEdit }
|
|
|
|
|
|
{ compatibility for old ch type }
|
|
{ compatibility for old ch type }
|
|
Function nEdit(win : pwindow; x,y,att,z,CursPos:integer;
|
|
Function nEdit(win : pwindow; x,y,att,z,CursPos:integer;
|
|
- es:string;var ch : char) : string;
|
|
|
|
|
|
+ es:shortstring;var ch : AnsiChar) : shortstring;
|
|
Var i : integer;
|
|
Var i : integer;
|
|
Begin
|
|
Begin
|
|
nEdit := nEdit(win,x,y,att,z,CursPos,es,i);
|
|
nEdit := nEdit(win,x,y,att,z,CursPos,es,i);
|
|
@@ -2150,7 +2150,7 @@ Begin
|
|
End;
|
|
End;
|
|
|
|
|
|
Function nEdit(x,y,att,z,CursPos:integer;
|
|
Function nEdit(x,y,att,z,CursPos:integer;
|
|
- es:string;var ch : char) : string;
|
|
|
|
|
|
+ es:string;var ch : AnsiChar) : string;
|
|
Var i : integer;
|
|
Var i : integer;
|
|
Begin
|
|
Begin
|
|
nEdit := nEdit(ActiveWn,x,y,att,z,CursPos,es,i);
|
|
nEdit := nEdit(ActiveWn,x,y,att,z,CursPos,es,i);
|
|
@@ -2165,7 +2165,7 @@ Begin
|
|
End;
|
|
End;
|
|
|
|
|
|
Function nEdit(x,y,att,z,CursPos:integer;
|
|
Function nEdit(x,y,att,z,CursPos:integer;
|
|
- es:longint;var ch : char) : longint;
|
|
|
|
|
|
+ es:longint;var ch : AnsiChar) : longint;
|
|
Begin
|
|
Begin
|
|
nEdit := nEdit(ActiveWn,x,y,att,z,CursPos,es,ch);
|
|
nEdit := nEdit(ActiveWn,x,y,att,z,CursPos,es,ch);
|
|
End;
|
|
End;
|
|
@@ -2189,7 +2189,7 @@ Begin
|
|
End;
|
|
End;
|
|
|
|
|
|
Function nEdit(win : pwindow; x,y,att,z,CursPos:integer;
|
|
Function nEdit(win : pwindow; x,y,att,z,CursPos:integer;
|
|
- es:longint;var ch : char) : longint;
|
|
|
|
|
|
+ es:longint;var ch : AnsiChar) : longint;
|
|
Var i : integer;
|
|
Var i : integer;
|
|
Begin
|
|
Begin
|
|
nEdit := nEdit(win,x,y,att,z,CursPos,es,i);
|
|
nEdit := nEdit(win,x,y,att,z,CursPos,es,i);
|
|
@@ -2204,7 +2204,7 @@ Begin
|
|
End;
|
|
End;
|
|
|
|
|
|
Function nEdit(x,y,att,z,CursPos:integer;
|
|
Function nEdit(x,y,att,z,CursPos:integer;
|
|
- es:real;var ch : char) : real;
|
|
|
|
|
|
+ es:real;var ch : AnsiChar) : real;
|
|
Var i : integer;
|
|
Var i : integer;
|
|
Begin
|
|
Begin
|
|
nEdit := nEdit(ActiveWn,x,y,att,z,CursPos,es,i);
|
|
nEdit := nEdit(ActiveWn,x,y,att,z,CursPos,es,i);
|
|
@@ -2242,7 +2242,7 @@ Begin
|
|
End;
|
|
End;
|
|
|
|
|
|
Function nEdit(win : pwindow; x,y,att,z,CursPos:integer;
|
|
Function nEdit(win : pwindow; x,y,att,z,CursPos:integer;
|
|
- es:real;var ch : char) : real;
|
|
|
|
|
|
+ es:real;var ch : AnsiChar) : real;
|
|
Var i : integer;
|
|
Var i : integer;
|
|
Begin
|
|
Begin
|
|
nEdit := nEdit(win,x,y,att,z,CursPos,es,i);
|
|
nEdit := nEdit(win,x,y,att,z,CursPos,es,i);
|
|
@@ -2264,7 +2264,7 @@ Function nEditNumber(
|
|
att, { edit field color attribute }
|
|
att, { edit field color attribute }
|
|
wid, { edit field width }
|
|
wid, { edit field width }
|
|
decm : integer; { number of decimal columns }
|
|
decm : integer; { number of decimal columns }
|
|
- bgd : string; { background string -
|
|
|
|
|
|
+ bgd : shortstring; { background string -
|
|
if bgd = '', then no background
|
|
if bgd = '', then no background
|
|
if bgd = a single character, then is used as the
|
|
if bgd = a single character, then is used as the
|
|
background fill character.
|
|
background fill character.
|
|
@@ -2278,24 +2278,24 @@ Function nEditNumber(
|
|
|
|
|
|
Const
|
|
Const
|
|
{ up to 12 decimal places }
|
|
{ up to 12 decimal places }
|
|
- decs : string = '[#][#][#][#][#][#][#][#][#][#][#][#]';
|
|
|
|
|
|
+ decs : shortstring = '[#][#][#][#][#][#][#][#][#][#][#][#]';
|
|
Var
|
|
Var
|
|
r : real;
|
|
r : real;
|
|
- s,s1,s2 : string;
|
|
|
|
|
|
+ s,s1,s2 : shortstring;
|
|
i,
|
|
i,
|
|
e,
|
|
e,
|
|
bc,
|
|
bc,
|
|
bx : integer;
|
|
bx : integer;
|
|
- ch : char;
|
|
|
|
- fill : array [0..255] of char;
|
|
|
|
|
|
+ ch : AnsiChar;
|
|
|
|
+ fill : array [0..255] of AnsiChar;
|
|
tmp_ec : tnEC;
|
|
tmp_ec : tnEC;
|
|
Begin
|
|
Begin
|
|
tmp_ec := nEC;
|
|
tmp_ec := nEC;
|
|
nEC.ExitMode := true;
|
|
nEC.ExitMode := true;
|
|
nEC.AppendMode := true;
|
|
nEC.AppendMode := true;
|
|
nEC.ClrChMap(0);
|
|
nEC.ClrChMap(0);
|
|
- nEC.AddChMap(#7#0#0+Char(nKeyDel));
|
|
|
|
- nEC.AddChMap(#8#0#0+Char(nKeyDel));
|
|
|
|
|
|
+ nEC.AddChMap(#7#0#0+AnsiChar(nKeyDel));
|
|
|
|
+ nEC.AddChMap(#8#0#0+AnsiChar(nKeyDel));
|
|
If decm > (Length(decs) div 3) Then
|
|
If decm > (Length(decs) div 3) Then
|
|
decm := (Length(decs) div 3);
|
|
decm := (Length(decs) div 3);
|
|
If decm >= wid Then decm := (wid - 1);
|
|
If decm >= wid Then decm := (wid - 1);
|
|
@@ -2355,7 +2355,7 @@ End;
|
|
{ overload - real, no pointer }
|
|
{ overload - real, no pointer }
|
|
Function nEditNumber(
|
|
Function nEditNumber(
|
|
x,y,att,wid,decm : integer;
|
|
x,y,att,wid,decm : integer;
|
|
- bgd : string;
|
|
|
|
|
|
+ bgd : shortstring;
|
|
initv,
|
|
initv,
|
|
minv,
|
|
minv,
|
|
maxv : real;
|
|
maxv : real;
|
|
@@ -2368,7 +2368,7 @@ End;
|
|
Function nEditNumber(
|
|
Function nEditNumber(
|
|
win : pwindow;
|
|
win : pwindow;
|
|
x,y,att,wid,decm : integer;
|
|
x,y,att,wid,decm : integer;
|
|
- bgd : string;
|
|
|
|
|
|
+ bgd : shortstring;
|
|
initv,
|
|
initv,
|
|
minv,
|
|
minv,
|
|
maxv : longint;
|
|
maxv : longint;
|
|
@@ -2383,7 +2383,7 @@ End;
|
|
{ overload - longint, no pointer }
|
|
{ overload - longint, no pointer }
|
|
Function nEditNumber(
|
|
Function nEditNumber(
|
|
x,y,att,wid,decm : integer;
|
|
x,y,att,wid,decm : integer;
|
|
- bgd : string;
|
|
|
|
|
|
+ bgd : shortstring;
|
|
initv,
|
|
initv,
|
|
minv,
|
|
minv,
|
|
maxv : longint;
|
|
maxv : longint;
|
|
@@ -2404,14 +2404,14 @@ Function nEditDate(
|
|
x, { edit field start column }
|
|
x, { edit field start column }
|
|
y, { edit field start row }
|
|
y, { edit field start row }
|
|
att : integer; { edit field color attribute }
|
|
att : integer; { edit field color attribute }
|
|
- initv : string; { initial value }
|
|
|
|
|
|
+ initv : shortstring; { initial value }
|
|
var esc : boolean { if Esc key pressed = true, else = false }
|
|
var esc : boolean { if Esc key pressed = true, else = false }
|
|
-) : string;
|
|
|
|
|
|
+) : shortstring;
|
|
|
|
|
|
Var
|
|
Var
|
|
- s : string;
|
|
|
|
|
|
+ s : shortstring;
|
|
i : integer;
|
|
i : integer;
|
|
- ch : char;
|
|
|
|
|
|
+ ch : AnsiChar;
|
|
tmp_ec : tnEC;
|
|
tmp_ec : tnEC;
|
|
|
|
|
|
Begin
|
|
Begin
|
|
@@ -2432,9 +2432,9 @@ Begin
|
|
End;
|
|
End;
|
|
If nCheckPxPicture(initv,nEC.Picture,i) <> 0 Then
|
|
If nCheckPxPicture(initv,nEC.Picture,i) <> 0 Then
|
|
system.move(initv[1],s[1],Length(initv));
|
|
system.move(initv[1],s[1],Length(initv));
|
|
- nEC.AddChMap(#7#0#0+Char(nKeyLeft));
|
|
|
|
- nEC.AddChMap(#8#0#0+Char(nKeyLeft));
|
|
|
|
- nEC.AddChMap(#0+Char(nKeyDel)+#0+Char(nKeyLeft));
|
|
|
|
|
|
+ nEC.AddChMap(#7#0#0+AnsiChar(nKeyLeft));
|
|
|
|
+ nEC.AddChMap(#8#0#0+AnsiChar(nKeyLeft));
|
|
|
|
+ nEC.AddChMap(#0+AnsiChar(nKeyDel)+#0+AnsiChar(nKeyLeft));
|
|
Repeat
|
|
Repeat
|
|
s := nEdit(win,x,y,att,x+9,x,s,ch);
|
|
s := nEdit(win,x,y,att,x+9,x,s,ch);
|
|
If ch = #13 Then Begin
|
|
If ch = #13 Then Begin
|
|
@@ -2448,7 +2448,7 @@ Begin
|
|
End;
|
|
End;
|
|
|
|
|
|
{ overload - no pointer }
|
|
{ overload - no pointer }
|
|
-Function nEditDate(x,y,att : integer;initv : string;var esc : boolean) : string;
|
|
|
|
|
|
+Function nEditDate(x,y,att : integer;initv : shortstring;var esc : boolean) : shortstring;
|
|
Begin
|
|
Begin
|
|
nEditDate := nEditDate(ActiveWn,x,y,att,initv,esc);
|
|
nEditDate := nEditDate(ActiveWn,x,y,att,initv,esc);
|
|
End;
|
|
End;
|
|
@@ -2461,7 +2461,7 @@ Procedure nMakeWindow(
|
|
ta,ba,ha : integer;
|
|
ta,ba,ha : integer;
|
|
hasframe : boolean;
|
|
hasframe : boolean;
|
|
hdrpos : tnJustify;
|
|
hdrpos : tnJustify;
|
|
- hdrtxt : string);
|
|
|
|
|
|
+ hdrtxt : shortstring);
|
|
Begin
|
|
Begin
|
|
win.init(x1,y1,x2,y2,ta,hasframe,ba);
|
|
win.init(x1,y1,x2,y2,ta,hasframe,ba);
|
|
If hdrtxt <> '' Then win.PutHeader(hdrtxt,ha,hdrpos);
|
|
If hdrtxt <> '' Then win.PutHeader(hdrtxt,ha,hdrpos);
|
|
@@ -2475,7 +2475,7 @@ Procedure nMakeWindow(
|
|
ta,ba,ha : integer;
|
|
ta,ba,ha : integer;
|
|
hasframe : boolean;
|
|
hasframe : boolean;
|
|
hdrpos : tnJustify;
|
|
hdrpos : tnJustify;
|
|
- hdrtxt : string);
|
|
|
|
|
|
+ hdrtxt : shortstring);
|
|
Begin
|
|
Begin
|
|
New(win,init(x1,y1,x2,y2,ta,hasframe,ba));
|
|
New(win,init(x1,y1,x2,y2,ta,hasframe,ba));
|
|
If hdrtxt <> '' Then win^.PutHeader(hdrtxt,ha,hdrpos);
|
|
If hdrtxt <> '' Then win^.PutHeader(hdrtxt,ha,hdrpos);
|
|
@@ -2498,9 +2498,9 @@ End;
|
|
a nil pointer if ack = true,
|
|
a nil pointer if ack = true,
|
|
a pointer to the tnWindow object if ack = false
|
|
a pointer to the tnWindow object if ack = false
|
|
--------------------------------------------------------------------}
|
|
--------------------------------------------------------------------}
|
|
-Function nShowMessage(msg : string;
|
|
|
|
|
|
+Function nShowMessage(msg : shortstring;
|
|
matt : byte;
|
|
matt : byte;
|
|
- hdr : string;
|
|
|
|
|
|
+ hdr : shortstring;
|
|
hatt : byte;
|
|
hatt : byte;
|
|
ack : boolean) : pnWindow;
|
|
ack : boolean) : pnWindow;
|
|
const
|
|
const
|
|
@@ -2586,13 +2586,13 @@ End;
|
|
y - starting row.
|
|
y - starting row.
|
|
n - number of characters to read.
|
|
n - number of characters to read.
|
|
---------------------------------------}
|
|
---------------------------------------}
|
|
-Function nReadScr(win : pWindow; x,y,n : integer) : string;
|
|
|
|
|
|
+Function nReadScr(win : pWindow; x,y,n : integer) : shortstring;
|
|
Var
|
|
Var
|
|
i,idx : integer;
|
|
i,idx : integer;
|
|
- s : string;
|
|
|
|
|
|
+ s : shortstring;
|
|
c : longint;
|
|
c : longint;
|
|
- { array of char/attr values, 4 bytes each, max 256 }
|
|
|
|
- buf : array[0..1023] of char;
|
|
|
|
|
|
+ { array of AnsiChar/attr values, 4 bytes each, max 256 }
|
|
|
|
+ buf : array[0..1023] of AnsiChar;
|
|
p : pchtype;
|
|
p : pchtype;
|
|
Begin
|
|
Begin
|
|
s := '';
|
|
s := '';
|
|
@@ -2609,7 +2609,7 @@ Begin
|
|
End;
|
|
End;
|
|
|
|
|
|
{ overload for current window }
|
|
{ overload for current window }
|
|
-Function nReadScr(x,y,n : integer) : string;
|
|
|
|
|
|
+Function nReadScr(x,y,n : integer) : shortstring;
|
|
Begin
|
|
Begin
|
|
nReadScr := nReadScr(ActiveWn,x,y,n);
|
|
nReadScr := nReadScr(ActiveWn,x,y,n);
|
|
End;
|
|
End;
|
|
@@ -2672,7 +2672,7 @@ Begin
|
|
nReadScrColor := nReadScrColor(ActiveWn,x,y);
|
|
nReadScrColor := nReadScrColor(ActiveWn,x,y);
|
|
End;
|
|
End;
|
|
|
|
|
|
-{ write a string with attributes, previously saved with nReadScrStr }
|
|
|
|
|
|
+{ write a shortstring with attributes, previously saved with nReadScrStr }
|
|
Procedure nWriteScrStr(win : pWindow; x,y : integer; s : pchtype);
|
|
Procedure nWriteScrStr(win : pWindow; x,y : integer; s : pchtype);
|
|
Begin
|
|
Begin
|
|
mvwaddchstr(win,y-1,x-1,s);
|
|
mvwaddchstr(win,y-1,x-1,s);
|
|
@@ -2814,7 +2814,7 @@ Procedure nMakeMenu(
|
|
ta,ca,ga,ba,ha : integer;
|
|
ta,ca,ga,ba,ha : integer;
|
|
hasframe : boolean;
|
|
hasframe : boolean;
|
|
hdrpos : tnJustify;
|
|
hdrpos : tnJustify;
|
|
- hdrtxt : string);
|
|
|
|
|
|
+ hdrtxt : shortstring);
|
|
Begin
|
|
Begin
|
|
mnu.init(x,y,_w,_r,_c,ta,ca,ga,hasframe,ba);
|
|
mnu.init(x,y,_w,_r,_c,ta,ca,ga,hasframe,ba);
|
|
If hdrtxt <> '' Then mnu.PutHeader(hdrtxt,ha,hdrpos);
|
|
If hdrtxt <> '' Then mnu.PutHeader(hdrtxt,ha,hdrpos);
|
|
@@ -2828,7 +2828,7 @@ Procedure nMakeMenu(
|
|
ta,ca,ga,ba,ha : integer;
|
|
ta,ca,ga,ba,ha : integer;
|
|
hasframe : boolean;
|
|
hasframe : boolean;
|
|
hdrpos : tnJustify;
|
|
hdrpos : tnJustify;
|
|
- hdrtxt : string);
|
|
|
|
|
|
+ hdrtxt : shortstring);
|
|
Begin
|
|
Begin
|
|
New(mnu,init(x,y,_w,_r,_c,ta,ca,ga,hasframe,ba));
|
|
New(mnu,init(x,y,_w,_r,_c,ta,ca,ga,hasframe,ba));
|
|
If hdrtxt <> '' Then mnu^.PutHeader(hdrtxt,ha,hdrpos);
|
|
If hdrtxt <> '' Then mnu^.PutHeader(hdrtxt,ha,hdrpos);
|
|
@@ -2875,8 +2875,8 @@ Procedure tnMenu.Post;
|
|
Var
|
|
Var
|
|
bx,by,
|
|
bx,by,
|
|
mx,my : longint;
|
|
mx,my : longint;
|
|
- p : pchar;
|
|
|
|
- a : array[0..SizeOf(tnS10)-1] of char;
|
|
|
|
|
|
+ p : PAnsiChar;
|
|
|
|
+ a : array[0..SizeOf(tnS10)-1] of AnsiChar;
|
|
Begin
|
|
Begin
|
|
{ could already be posted }
|
|
{ could already be posted }
|
|
UnPost;
|
|
UnPost;
|
|
@@ -2929,7 +2929,7 @@ Const
|
|
select = #13;
|
|
select = #13;
|
|
cancel = #27;
|
|
cancel = #27;
|
|
Var
|
|
Var
|
|
- key : char;
|
|
|
|
|
|
+ key : AnsiChar;
|
|
i,cnt,
|
|
i,cnt,
|
|
prev,
|
|
prev,
|
|
savecurs,
|
|
savecurs,
|
|
@@ -3016,7 +3016,7 @@ Begin
|
|
win^.Move(_x,_y);
|
|
win^.Move(_x,_y);
|
|
End;
|
|
End;
|
|
|
|
|
|
-Procedure tnMenu.PutHeader(hdr : string; hcolor : integer; hpos : tnJustify);
|
|
|
|
|
|
+Procedure tnMenu.PutHeader(hdr : shortstring; hcolor : integer; hpos : tnJustify);
|
|
Begin
|
|
Begin
|
|
win^.PutHeader(hdr,hcolor,hpos);
|
|
win^.PutHeader(hdr,hcolor,hpos);
|
|
End;
|
|
End;
|
|
@@ -3060,7 +3060,7 @@ Begin
|
|
End Else merr := E_BAD_ARGUMENT;
|
|
End Else merr := E_BAD_ARGUMENT;
|
|
End;
|
|
End;
|
|
|
|
|
|
-Procedure tnMenu.AddItem(i : integer; s : string);
|
|
|
|
|
|
+Procedure tnMenu.AddItem(i : integer; s : shortstring);
|
|
Const
|
|
Const
|
|
fwid : shortint = 0;
|
|
fwid : shortint = 0;
|
|
iwid : shortint = 1;
|
|
iwid : shortint = 1;
|
|
@@ -3073,7 +3073,7 @@ Begin
|
|
ClearItem(i);
|
|
ClearItem(i);
|
|
GetMem(items[i],Length(s)+1);
|
|
GetMem(items[i],Length(s)+1);
|
|
StrPCopy(items[i]^,s);
|
|
StrPCopy(items[i]^,s);
|
|
- pi[i] := new_item(pchar(items[i]),nil);
|
|
|
|
|
|
+ pi[i] := new_item(PAnsiChar(items[i]),nil);
|
|
If pi[i] <> Nil Then Begin
|
|
If pi[i] <> Nil Then Begin
|
|
merr := E_OK;
|
|
merr := E_OK;
|
|
{ Expand the window width if necessary. Limit to screen width.
|
|
{ Expand the window width if necessary. Limit to screen width.
|
|
@@ -3098,7 +3098,7 @@ Begin
|
|
End Else merr := E_BAD_ARGUMENT;
|
|
End Else merr := E_BAD_ARGUMENT;
|
|
End;
|
|
End;
|
|
|
|
|
|
-Function tnMenu.Add(s : string) : integer;
|
|
|
|
|
|
+Function tnMenu.Add(s : shortstring) : integer;
|
|
Var
|
|
Var
|
|
i : integer;
|
|
i : integer;
|
|
Begin
|
|
Begin
|
|
@@ -3111,7 +3111,7 @@ Begin
|
|
If merr = E_OK Then Add := i;
|
|
If merr = E_OK Then Add := i;
|
|
End;
|
|
End;
|
|
|
|
|
|
-Procedure tnMenu.Insert(idx : integer; s : string);
|
|
|
|
|
|
+Procedure tnMenu.Insert(idx : integer; s : shortstring);
|
|
Begin
|
|
Begin
|
|
If IsValid(idx) Then Begin
|
|
If IsValid(idx) Then Begin
|
|
ClearItem(nMAXMENUITEMS);
|
|
ClearItem(nMAXMENUITEMS);
|
|
@@ -3138,7 +3138,7 @@ Begin
|
|
End Else merr := E_BAD_ARGUMENT;
|
|
End Else merr := E_BAD_ARGUMENT;
|
|
End;
|
|
End;
|
|
|
|
|
|
-Procedure tnMenu.Change(idx : integer; s : string);
|
|
|
|
|
|
+Procedure tnMenu.Change(idx : integer; s : shortstring);
|
|
Begin
|
|
Begin
|
|
AddItem(idx,s);
|
|
AddItem(idx,s);
|
|
End;
|
|
End;
|
|
@@ -3205,8 +3205,8 @@ Begin
|
|
If _c > 0 Then c := _c;
|
|
If _c > 0 Then c := _c;
|
|
End;
|
|
End;
|
|
|
|
|
|
-{ get the item indicator prefix string }
|
|
|
|
-Function tnMenu.GetMark : string;
|
|
|
|
|
|
+{ get the item indicator prefix shortstring }
|
|
|
|
+Function tnMenu.GetMark : shortstring;
|
|
Begin
|
|
Begin
|
|
If posted Then
|
|
If posted Then
|
|
GetMark := StrPas(menu_mark(pm))
|
|
GetMark := StrPas(menu_mark(pm))
|
|
@@ -3214,8 +3214,8 @@ Begin
|
|
GetMark := mark;
|
|
GetMark := mark;
|
|
End;
|
|
End;
|
|
|
|
|
|
-{ set the item indicator prefix string }
|
|
|
|
-Procedure tnMenu.SetMark(ms : string);
|
|
|
|
|
|
+{ set the item indicator prefix shortstring }
|
|
|
|
+Procedure tnMenu.SetMark(ms : shortstring);
|
|
Begin
|
|
Begin
|
|
mark := ms;
|
|
mark := ms;
|
|
End;
|
|
End;
|