-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathSSINIT.PAS
56 lines (46 loc) · 1016 Bytes
/
SSINIT.PAS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
Unit SSInit;
Interface
Uses
Crt, SSType, SSDraw, SSInt, GeneralDrawing;
Procedure InitProgram (Prog : TProgPtr);
Implementation
{*
* InitProgram
*
* Arguments
* Prog : TProgPtr - A pointer to the main program's data structure.
*
* Initializes Prog's variables.
*}
Procedure InitProgram (Prog : TProgPtr);
Var
X, Y : Integer;
Begin
IP:= Prog;
With Prog^ do
Begin
OCX:= 1;
OCY:= 1;
SelectedTextColor:= Lightgray;
SelectedBackgroundColor:= Black;
ScrollLine:= 0;
ScrollColumn:= 0;
CurrentLine:= 1;
CurrentColumn:= 1;
For Y:=1 to LinesMaximum do LineDimension[Y]:= 1;
For X:=1 to ColumnsMaximum do ColumnDimension[X]:= 10;
For Y:=1 to LinesMaximum do
Begin
For X:=1 to ColumnsMaximum do
Begin
Cell[Y, X].Value:= '';
Cell[Y, X].RValue:= 0;
Cell[Y, X].TextAlignment:= TextLeft;
Cell[Y, X].ForegroundColor:= LightGray;
Cell[Y, X].BackgroundColor:= Black;
End;
End;
End;
End;
Begin
End.