@@ -16,6 +16,16 @@ TPyDelphiLayout = class(TPyDelphiControl)
1616 property DelphiObject: TLayout read GetDelphiObject write SetDelphiObject;
1717 end ;
1818
19+ TPyDelphiScaledLayout = class (TPyDelphiControl)
20+ private
21+ function GetDelphiObject : TScaledLayout;
22+ procedure SetDelphiObject (const Value : TScaledLayout);
23+ public
24+ class function DelphiObjectClass : TClass; override;
25+ // Properties
26+ property DelphiObject: TScaledLayout read GetDelphiObject write SetDelphiObject;
27+ end ;
28+
1929implementation
2030
2131{ Register the wrappers, the globals and the constants }
@@ -27,6 +37,26 @@ TLayoutsRegistration = class(TRegisteredUnit)
2737 procedure DefineVars (APyDelphiWrapper : TPyDelphiWrapper); override;
2838 end ;
2939
40+ { TLayoutsRegistration }
41+
42+ procedure TLayoutsRegistration.DefineVars (APyDelphiWrapper: TPyDelphiWrapper);
43+ begin
44+ inherited ;
45+ end ;
46+
47+ function TLayoutsRegistration.Name : string;
48+ begin
49+ Result := ' Layouts' ;
50+ end ;
51+
52+ procedure TLayoutsRegistration.RegisterWrappers (
53+ APyDelphiWrapper: TPyDelphiWrapper);
54+ begin
55+ inherited ;
56+ APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiLayout);
57+ APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiScaledLayout);
58+ end ;
59+
3060{ TPyDelphiLayout }
3161
3262class function TPyDelphiLayout.DelphiObjectClass : TClass;
@@ -44,23 +74,21 @@ procedure TPyDelphiLayout.SetDelphiObject(const Value: TLayout);
4474 inherited DelphiObject := Value ;
4575end ;
4676
47- { TLayoutsRegistration }
77+ { TPyDelphiScaledLayout }
4878
49- procedure TLayoutsRegistration.DefineVars (APyDelphiWrapper: TPyDelphiWrapper) ;
79+ class function TPyDelphiScaledLayout.DelphiObjectClass : TClass ;
5080begin
51- inherited ;
81+ Result := TScaledLayout ;
5282end ;
5383
54- function TLayoutsRegistration.Name : string ;
84+ function TPyDelphiScaledLayout.GetDelphiObject : TScaledLayout ;
5585begin
56- Result := ' Layouts ' ;
86+ Result := TScaledLayout( inherited DelphiObject) ;
5787end ;
5888
59- procedure TLayoutsRegistration.RegisterWrappers (
60- APyDelphiWrapper: TPyDelphiWrapper);
89+ procedure TPyDelphiScaledLayout.SetDelphiObject (const Value : TScaledLayout);
6190begin
62- inherited ;
63- APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiLayout);
91+ inherited DelphiObject := Value ;
6492end ;
6593
6694initialization
0 commit comments