2006-05-30 16:23:25 +02:00
|
|
|
|
{ Compiletime TObject, TPersistent and TComponent definitions }
|
|
|
|
|
unit uPSC_std;
|
|
|
|
|
{$I PascalScript.inc}
|
|
|
|
|
interface
|
|
|
|
|
uses
|
|
|
|
|
uPSCompiler, uPSUtils;
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
Will register files from:
|
|
|
|
|
System
|
|
|
|
|
Classes (Only TComponent and TPersistent)
|
2008-12-05 13:15:22 +01:00
|
|
|
|
|
2006-05-30 16:23:25 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
procedure SIRegister_Std_TypesAndConsts(Cl: TPSPascalCompiler);
|
|
|
|
|
procedure SIRegisterTObject(CL: TPSPascalCompiler);
|
|
|
|
|
procedure SIRegisterTPersistent(Cl: TPSPascalCompiler);
|
|
|
|
|
procedure SIRegisterTComponent(Cl: TPSPascalCompiler);
|
|
|
|
|
|
|
|
|
|
procedure SIRegister_Std(Cl: TPSPascalCompiler);
|
|
|
|
|
|
|
|
|
|
implementation
|
|
|
|
|
|
|
|
|
|
procedure SIRegisterTObject(CL: TPSPascalCompiler);
|
|
|
|
|
begin
|
2008-12-05 13:15:22 +01:00
|
|
|
|
with Cl.AddClassN(nil, 'TObject') do
|
2006-05-30 16:23:25 +02:00
|
|
|
|
begin
|
|
|
|
|
RegisterMethod('constructor Create');
|
|
|
|
|
RegisterMethod('procedure Free');
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure SIRegisterTPersistent(Cl: TPSPascalCompiler);
|
|
|
|
|
begin
|
2008-12-05 13:15:22 +01:00
|
|
|
|
with Cl.AddClassN(cl.FindClass('TObject'), 'TPersistent') do
|
2006-05-30 16:23:25 +02:00
|
|
|
|
begin
|
|
|
|
|
RegisterMethod('procedure Assign(Source: TPersistent)');
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure SIRegisterTComponent(Cl: TPSPascalCompiler);
|
|
|
|
|
begin
|
2008-12-05 13:15:22 +01:00
|
|
|
|
with Cl.AddClassN(cl.FindClass('TPersistent'), 'TComponent') do
|
2006-05-30 16:23:25 +02:00
|
|
|
|
begin
|
2016-05-13 14:34:11 +02:00
|
|
|
|
RegisterMethod('function FindComponent(AName: string): TComponent;');
|
2006-05-30 16:23:25 +02:00
|
|
|
|
RegisterMethod('constructor Create(AOwner: TComponent); virtual;');
|
|
|
|
|
|
|
|
|
|
RegisterProperty('Owner', 'TComponent', iptRW);
|
2008-12-05 13:15:22 +01:00
|
|
|
|
RegisterMethod('procedure DestroyComponents');
|
|
|
|
|
RegisterMethod('procedure Destroying');
|
2016-05-13 14:34:11 +02:00
|
|
|
|
RegisterMethod('procedure FreeNotification(AComponent: TComponent)');
|
|
|
|
|
RegisterMethod('procedure InsertComponent(AComponent: TComponent)');
|
|
|
|
|
RegisterMethod('procedure RemoveComponent(AComponent: TComponent)');
|
2008-12-05 13:15:22 +01:00
|
|
|
|
RegisterProperty('Components', 'TComponent Integer', iptr);
|
|
|
|
|
RegisterProperty('ComponentCount', 'Integer', iptr);
|
|
|
|
|
RegisterProperty('ComponentIndex', 'Integer', iptrw);
|
|
|
|
|
RegisterProperty('ComponentState', 'Byte', iptr);
|
2016-05-13 14:34:11 +02:00
|
|
|
|
RegisterProperty('DesignInfo', 'LongInt', iptrw);
|
|
|
|
|
RegisterProperty('Name', 'string', iptrw);
|
2008-12-05 13:15:22 +01:00
|
|
|
|
RegisterProperty('Tag', 'LongInt', iptrw);
|
2006-05-30 16:23:25 +02:00
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
procedure SIRegister_Std_TypesAndConsts(Cl: TPSPascalCompiler);
|
|
|
|
|
begin
|
|
|
|
|
Cl.AddTypeS('TComponentStateE', '(csLoading, csReading, csWriting, csDestroying, csDesigning, csAncestor, csUpdating, csFixups, csFreeNotification, csInline, csDesignInstance)');
|
|
|
|
|
cl.AddTypeS('TComponentState', 'set of TComponentStateE');
|
|
|
|
|
Cl.AddTypeS('TRect', 'record Left, Top, Right, Bottom: Integer; end;');
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure SIRegister_Std(Cl: TPSPascalCompiler);
|
|
|
|
|
begin
|
|
|
|
|
SIRegister_Std_TypesAndConsts(Cl);
|
|
|
|
|
SIRegisterTObject(CL);
|
|
|
|
|
SIRegisterTPersistent(Cl);
|
|
|
|
|
SIRegisterTComponent(Cl);
|
|
|
|
|
end;
|
|
|
|
|
|
2024-05-15 08:07:45 +02:00
|
|
|
|
// PS_MINIVCL changes by Martijn Laan
|
2006-05-30 16:23:25 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
End.
|
|
|
|
|
|
2008-12-05 13:15:22 +01:00
|
|
|
|
|