-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathVERITYPE.PAS
146 lines (124 loc) · 2.65 KB
/
VERITYPE.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
{$I COMPILER.INC}
unit VeriType;
interface
uses
AplObj;
type
PSpacing = ^TSpacing;
TRelativePosition = (rpAbsolute, rpParentClient, rpParentContent, rpParentRelative);
TBorderStyle = (bsNone, bsSingle);
TBevelStyle = (bvNone, bvLowered, bvRaised);
THorzAlign = (haLeft, haRight, haCenter);
TVertAlign = (vaTop, vaBottom, vaCenter);
TAlign =
(
alNone,
alLeft,
alRight,
alTop,
alBottom,
alClient
);
TScrollOrientation =
(
soVertical,
soHorizontal
);
TSpacing = object(TObject)
private
public
Left: integer;
Top: integer;
Right: integer;
Bottom: integer;
constructor CreateAll(ALeft, ATop, ARight, ABottom: integer);
constructor CreateValue(AValue: integer);
constructor CreateLeft(ALeft: integer);
constructor CreateTop(ATop: integer);
constructor CreateRight(ARight: integer);
constructor CreateBottom(ABottom: integer);
constructor CreateLeftRight(ALeft, ARight: integer);
constructor CreateTopBottom(ATop, ABottom: integer);
constructor CreateHorz(AValue: integer);
constructor CreateVert(AValue: integer);
function Width: integer;
function Height: integer;
procedure Init; virtual;
end;
implementation
constructor TSpacing.CreateAll(ALeft, ATop, ARight, ABottom: integer);
begin
inherited Create;
Left := ALeft;
Top := ATop;
Right := ARight;
Bottom := ABottom;
end;
constructor TSpacing.CreateValue(AValue: integer);
begin
inherited Create;
Left := AValue;
Top := AValue;
Right := AValue;
Bottom := AValue;
end;
constructor TSpacing.CreateLeft(ALeft: integer);
begin
inherited Create;
Left := ALeft;
end;
constructor TSpacing.CreateTop(ATop: integer);
begin
inherited Create;
Top := ATop;
end;
constructor TSpacing.CreateRight(ARight: integer);
begin
inherited Create;
Right := ARight;
end;
constructor TSpacing.CreateBottom(ABottom: integer);
begin
inherited Create;
Bottom := ABottom;
end;
constructor TSpacing.CreateLeftRight(ALeft, ARight: integer);
begin
inherited Create;
Left := ALeft;
Right := ARight;
end;
constructor TSpacing.CreateTopBottom(ATop, ABottom: integer);
begin
inherited Create;
Top := ATop;
Bottom := ABottom;
end;
constructor TSpacing.CreateHorz(AValue: integer);
begin
inherited Create;
Left := AValue;
Right := AValue;
end;
constructor TSpacing.CreateVert(AValue: integer);
begin
inherited Create;
Top := AValue;
Bottom := AValue;
end;
function TSpacing.Width: integer;
begin
Width := Left + Right;
end;
function TSpacing.Height: integer;
begin
Height := Top + Bottom;
end;
procedure TSpacing.Init;
begin
Left := 0;
Top := 0;
Right := 0;
Bottom := 0;
end;
end.