33interface
44
55uses
6- FMX.Forms, PythonEngine, WrapDelphiClasses;
6+ FMX.Forms, PythonEngine, WrapDelphiClasses, WrapFmxTypes ;
77
88type
99 TPyDelphiApplication = class (TPyDelphiComponent)
@@ -17,6 +17,17 @@ TPyDelphiApplication = class(TPyDelphiComponent)
1717 property DelphiObject: TApplication read GetDelphiObject write SetDelphiObject;
1818 end ;
1919
20+ TPyDelphiCommonCustomForm = class (TPyDelphiFmxObject)
21+ private
22+ function GetDelphiObject : TCommonCustomForm;
23+ procedure SetDelphiObject (const Value : TCommonCustomForm);
24+ public
25+ // Class methods
26+ class function DelphiObjectClass : TClass; override;
27+ // Properties
28+ property DelphiObject: TCommonCustomForm read GetDelphiObject write SetDelphiObject;
29+ end ;
30+
2031implementation
2132
2233uses
@@ -57,7 +68,7 @@ procedure TFormsRegistration.RegisterWrappers(
5768 APyDelphiWrapper: TPyDelphiWrapper);
5869begin
5970 inherited ;
60-
71+ APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiCommonCustomForm);
6172end ;
6273
6374{ TPyDelphiApplication }
@@ -77,7 +88,25 @@ procedure TPyDelphiApplication.SetDelphiObject(const Value: TApplication);
7788 inherited DelphiObject := Value ;
7889end ;
7990
91+ { TPyDelphiCommonCustomForm }
92+
93+ class function TPyDelphiCommonCustomForm.DelphiObjectClass : TClass;
94+ begin
95+ Result := TCommonCustomForm;
96+ end ;
97+
98+ function TPyDelphiCommonCustomForm.GetDelphiObject : TCommonCustomForm;
99+ begin
100+ Result := TCommonCustomForm(inherited DelphiObject);
101+ end ;
102+
103+ procedure TPyDelphiCommonCustomForm.SetDelphiObject (
104+ const Value : TCommonCustomForm);
105+ begin
106+ inherited DelphiObject := Value ;
107+ end ;
108+
80109initialization
81- RegisteredUnits.Add( TFormsRegistration.Create );
110+ RegisteredUnits.Add(TFormsRegistration.Create);
82111
83112end .
0 commit comments