Skip to content

Commit 9dca7b0

Browse files
committed
Including the FMX TTimer wrapper
1 parent 37ce6b9 commit 9dca7b0

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

Source/fmx/WrapFmxTypes.pas

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,16 @@ TPyDelphiControlSize = class(TPyDelphiPersistent)
148148
property DelphiObject: TControlSize read GetDelphiObject write SetDelphiObject;
149149
end;
150150

151+
TPyDelphiTimer = class (TPyDelphiComponent)
152+
private
153+
function GetDelphiObject: TTimer;
154+
procedure SetDelphiObject(const Value: TTimer);
155+
public
156+
class function DelphiObjectClass : TClass; override;
157+
// Properties
158+
property DelphiObject: TTimer read GetDelphiObject write SetDelphiObject;
159+
end;
160+
151161
{Helper functions}
152162
function WrapPointF(APyDelphiWrapper: TPyDelphiWrapper; const APoint : TPointF) : PPyObject;
153163
function WrapSizeF(APyDelphiWrapper: TPyDelphiWrapper; const ASize : TSizeF) : PPyObject;
@@ -293,6 +303,7 @@ procedure TTypesRegistration.RegisterWrappers(
293303
APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiCustomPopupMenu);
294304
APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiBounds);
295305
APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiControlSize);
306+
APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiTimer);
296307
end;
297308

298309
{ Helper functions }
@@ -921,6 +932,23 @@ function TPyDelphiRectF.Set_Top(AValue: PPyObject; AContext: Pointer): integer;
921932
Result := -1;
922933
end;
923934

935+
{ TPyDelphiTimer }
936+
937+
class function TPyDelphiTimer.DelphiObjectClass: TClass;
938+
begin
939+
Result := TTimer;
940+
end;
941+
942+
function TPyDelphiTimer.GetDelphiObject: TTimer;
943+
begin
944+
Result := TTimer(inherited DelphiObject);
945+
end;
946+
947+
procedure TPyDelphiTimer.SetDelphiObject(const Value: TTimer);
948+
begin
949+
inherited DelphiObject := Value;
950+
end;
951+
924952
initialization
925953
RegisteredUnits.Add(TTypesRegistration.Create);
926954

0 commit comments

Comments
 (0)