Skip to content

Commit 9032e0b

Browse files
committed
Adding TCustomPopupForm wrapper
1 parent b7a04c7 commit 9032e0b

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

Source/fmx/WrapFmxForms.pas

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,17 @@ TPyDelphiCustomForm = class(TPyDelphiCommonCustomForm)
3939
property DelphiObject: TCustomForm read GetDelphiObject write SetDelphiObject;
4040
end;
4141

42+
TPyDelphiCustomPopupForm = class(TPyDelphiCustomForm)
43+
private
44+
function GetDelphiObject: TCustomPopupForm;
45+
procedure SetDelphiObject(const Value: TCustomPopupForm);
46+
public
47+
// Class methods
48+
class function DelphiObjectClass: TClass; override;
49+
// Properties
50+
property DelphiObject: TCustomPopupForm read GetDelphiObject write SetDelphiObject;
51+
end;
52+
4253
implementation
4354

4455
uses
@@ -81,6 +92,8 @@ procedure TFormsRegistration.RegisterWrappers(
8192
inherited;
8293
APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiApplication);
8394
APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiCommonCustomForm);
95+
APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiCustomForm);
96+
APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiCustomPopupForm);
8497
end;
8598

8699
{ TPyDelphiApplication }
@@ -135,6 +148,24 @@ procedure TPyDelphiCustomForm.SetDelphiObject(const Value: TCustomForm);
135148
inherited DelphiObject := Value;
136149
end;
137150

151+
{ TPyDelphiCustomPopupForm }
152+
153+
class function TPyDelphiCustomPopupForm.DelphiObjectClass: TClass;
154+
begin
155+
Result := TCustomPopupForm;
156+
end;
157+
158+
function TPyDelphiCustomPopupForm.GetDelphiObject: TCustomPopupForm;
159+
begin
160+
Result := TCustomPopupForm(inherited DelphiObject);
161+
end;
162+
163+
procedure TPyDelphiCustomPopupForm.SetDelphiObject(
164+
const Value: TCustomPopupForm);
165+
begin
166+
inherited DelphiObject := Value;
167+
end;
168+
138169
initialization
139170
RegisteredUnits.Add(TFormsRegistration.Create);
140171

0 commit comments

Comments
 (0)