@@ -6,9 +6,8 @@ interface
66
77uses
88 Classes, SysUtils, TypInfo, Types,
9- FMX.Types, FMX.Controls,
10- PythonEngine, WrapDelphi, WrapDelphiClasses, WrapFmxTypes,
11- FMX.Controls.Presentation;
9+ FMX.Types, FMX.Controls, FMX.Controls.Presentation,
10+ PythonEngine, WrapDelphi, WrapDelphiClasses, WrapFmxTypes, WrapFmxActnList;
1211
1312type
1413 {
@@ -136,6 +135,17 @@ TPyDelphiPresentedControl = class(TPyDelphiStyledControl)
136135 property DelphiObject: TPresentedControl read GetDelphiObject write SetDelphiObject;
137136 end ;
138137
138+ TPyDelphiCustomControlAction = class (TPyDelphiCustomAction)
139+ private
140+ function GetDelphiObject : TCustomControlAction;
141+ procedure SetDelphiObject (const Value : TCustomControlAction);
142+ public
143+ class function DelphiObjectClass : TClass; override;
144+ public
145+ property DelphiObject: TCustomControlAction read GetDelphiObject
146+ write SetDelphiObject;
147+ end ;
148+
139149implementation
140150
141151type
@@ -147,6 +157,30 @@ TControlsRegistration = class(TRegisteredUnit)
147157 procedure DefineVars (APyDelphiWrapper : TPyDelphiWrapper); override;
148158 end ;
149159
160+ { TControlsRegistration }
161+
162+ procedure TControlsRegistration.DefineVars (APyDelphiWrapper: TPyDelphiWrapper);
163+ begin
164+ inherited ;
165+ end ;
166+
167+ function TControlsRegistration.Name : string;
168+ begin
169+ Result := ' Controls' ;
170+ end ;
171+
172+ procedure TControlsRegistration.RegisterWrappers (
173+ APyDelphiWrapper: TPyDelphiWrapper);
174+ begin
175+ inherited ;
176+ APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiControl);
177+ APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiStyledControl);
178+ APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiTextControl);
179+ APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiStyleBook);
180+ APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiPopup);
181+ APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiCustomControlAction);
182+ end ;
183+
150184{ TPyDelphiControl }
151185
152186function TPyDelphiControl.BringToFront_Wrapper (args: PPyObject): PPyObject;
@@ -425,29 +459,6 @@ function TPyDelphiControl.Set_Visible(AValue: PPyObject;
425459 Result := -1 ;
426460end ;
427461
428- { TControlsRegistration }
429-
430- procedure TControlsRegistration.DefineVars (APyDelphiWrapper: TPyDelphiWrapper);
431- begin
432- inherited ;
433- end ;
434-
435- function TControlsRegistration.Name : string;
436- begin
437- Result := ' Controls' ;
438- end ;
439-
440- procedure TControlsRegistration.RegisterWrappers (
441- APyDelphiWrapper: TPyDelphiWrapper);
442- begin
443- inherited ;
444- APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiControl);
445- APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiStyledControl);
446- APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiTextControl);
447- APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiStyleBook);
448- APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiPopup);
449- end ;
450-
451462{ TControlsAccess }
452463
453464class function TControlsAccess.ExpectedContainerClass : TClass;
@@ -740,6 +751,24 @@ procedure TPyDelphiPresentedControl.SetDelphiObject(
740751 inherited DelphiObject := Value ;
741752end ;
742753
754+ { TPyDelphiCustomControlAction }
755+
756+ class function TPyDelphiCustomControlAction.DelphiObjectClass : TClass;
757+ begin
758+ Result := TCustomControlAction;
759+ end ;
760+
761+ function TPyDelphiCustomControlAction.GetDelphiObject : TCustomControlAction;
762+ begin
763+ Result := TCustomControlAction(inherited DelphiObject);
764+ end ;
765+
766+ procedure TPyDelphiCustomControlAction.SetDelphiObject (
767+ const Value : TCustomControlAction);
768+ begin
769+ inherited DelphiObject := Value ;
770+ end ;
771+
743772initialization
744773 RegisteredUnits.Add(TControlsRegistration.Create);
745774
0 commit comments