-
Notifications
You must be signed in to change notification settings - Fork 0
/
uPSR_extctrls.pas
150 lines (125 loc) · 3.44 KB
/
uPSR_extctrls.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
147
148
unit uPSR_extctrls;
{$I PascalScript.inc}
interface
uses
uPSRuntime, uPSUtils;
procedure RIRegister_ExtCtrls(cl: TPSRuntimeClassImporter);
procedure RIRegisterTSHAPE(Cl: TPSRuntimeClassImporter);
procedure RIRegisterTIMAGE(Cl: TPSRuntimeClassImporter);
procedure RIRegisterTPAINTBOX(Cl: TPSRuntimeClassImporter);
procedure RIRegisterTBEVEL(Cl: TPSRuntimeClassImporter);
procedure RIRegisterTTIMER(Cl: TPSRuntimeClassImporter);
procedure RIRegisterTCUSTOMPANEL(Cl: TPSRuntimeClassImporter);
procedure RIRegisterTPANEL(Cl: TPSRuntimeClassImporter);
{$IFNDEF CLX}
procedure RIRegisterTPAGE(Cl: TPSRuntimeClassImporter);
procedure RIRegisterTNOTEBOOK(Cl: TPSRuntimeClassImporter);
{$IFNDEF FPC}procedure RIRegisterTHEADER(Cl: TPSRuntimeClassImporter);{$ENDIF}
{$ENDIF}
procedure RIRegisterTCUSTOMRADIOGROUP(Cl: TPSRuntimeClassImporter);
procedure RIRegisterTRADIOGROUP(Cl: TPSRuntimeClassImporter);
implementation
uses
{$IFDEF CLX}
QExtCtrls, QGraphics;
{$ELSE}
ExtCtrls, Graphics;
{$ENDIF}
procedure RIRegisterTSHAPE(Cl: TPSRuntimeClassImporter);
begin
with Cl.Add(TSHAPE) do
begin
{$IFNDEF PS_MINIVCL}
RegisterMethod(@TSHAPE.STYLECHANGED, 'STYLECHANGED');
{$ENDIF}
end;
end;
procedure TIMAGECANVAS_R(Self: TIMAGE; var T: TCANVAS); begin T := Self.CANVAS; end;
procedure RIRegisterTIMAGE(Cl: TPSRuntimeClassImporter);
begin
with Cl.Add(TIMAGE) do
begin
RegisterPropertyHelper(@TIMAGECANVAS_R, nil, 'CANVAS');
end;
end;
procedure TPAINTBOXCANVAS_R(Self: TPAINTBOX; var T: TCanvas); begin T := Self.CANVAS; end;
procedure RIRegisterTPAINTBOX(Cl: TPSRuntimeClassImporter);
begin
with Cl.Add(TPAINTBOX) do
begin
RegisterPropertyHelper(@TPAINTBOXCANVAS_R, nil, 'CANVAS');
end;
end;
procedure RIRegisterTBEVEL(Cl: TPSRuntimeClassImporter);
begin
Cl.Add(TBEVEL);
end;
procedure RIRegisterTTIMER(Cl: TPSRuntimeClassImporter);
begin
Cl.Add(TTIMER);
end;
procedure RIRegisterTCUSTOMPANEL(Cl: TPSRuntimeClassImporter);
begin
Cl.Add(TCUSTOMPANEL);
end;
procedure RIRegisterTPANEL(Cl: TPSRuntimeClassImporter);
begin
Cl.Add(TPANEL);
end;
{$IFNDEF CLX}
procedure RIRegisterTPAGE(Cl: TPSRuntimeClassImporter);
begin
Cl.Add(TPAGE);
end;
procedure RIRegisterTNOTEBOOK(Cl: TPSRuntimeClassImporter);
begin
Cl.Add(TNOTEBOOK);
end;
{$IFNDEF FPC}
procedure THEADERSECTIONWIDTH_R(Self: THEADER; var T: INTEGER; t1: INTEGER); begin T := Self.SECTIONWIDTH[t1]; end;
procedure THEADERSECTIONWIDTH_W(Self: THEADER; T: INTEGER; t1: INTEGER); begin Self.SECTIONWIDTH[t1] := T; end;
procedure RIRegisterTHEADER(Cl: TPSRuntimeClassImporter);
begin
with Cl.Add(THEADER) do
begin
RegisterPropertyHelper(@THEADERSECTIONWIDTH_R, @THEADERSECTIONWIDTH_W, 'SECTIONWIDTH');
end;
end;
{$ENDIF}
{$ENDIF}
procedure RIRegisterTCUSTOMRADIOGROUP(Cl: TPSRuntimeClassImporter);
begin
Cl.Add(TCUSTOMRADIOGROUP);
end;
procedure RIRegisterTRADIOGROUP(Cl: TPSRuntimeClassImporter);
begin
Cl.Add(TRADIOGROUP);
end;
procedure RIRegister_ExtCtrls(cl: TPSRuntimeClassImporter);
begin
{$IFNDEF PS_MINIVCL}
RIRegisterTSHAPE(Cl);
RIRegisterTIMAGE(Cl);
RIRegisterTPAINTBOX(Cl);
{$ENDIF}
RIRegisterTBEVEL(Cl);
{$IFNDEF PS_MINIVCL}
RIRegisterTTIMER(Cl);
{$ENDIF}
RIRegisterTCUSTOMPANEL(Cl);
{$IFNDEF CLX}
RIRegisterTPANEL(Cl);
{$ENDIF}
{$IFNDEF PS_MINIVCL}
{$IFNDEF CLX}
RIRegisterTPAGE(Cl);
RIRegisterTNOTEBOOK(Cl);
{$IFNDEF FPC}
RIRegisterTHEADER(Cl);
{$ENDIF}{FPC}
{$ENDIF}
RIRegisterTCUSTOMRADIOGROUP(Cl);
RIRegisterTRADIOGROUP(Cl);
{$ENDIF}
end;
end.