Skip to content

Commit 282ccd1

Browse files
committed
Adding TPaintBox wrapper
1 parent 1d524ee commit 282ccd1

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

Source/fmx/WrapFmxShapes.pas

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,15 @@ TPyDelphiImage = class(TPyDelphiControl)
137137
property DelphiObject: TImage read GetDelphiObject write SetDelphiObject;
138138
end;
139139

140+
TPyDelphiPaintBox = class(TPyDelphiControl)
141+
function GetDelphiObject: TPaintBox;
142+
procedure SetDelphiObject(const Value: TPaintBox);
143+
public
144+
class function DelphiObjectClass : TClass; override;
145+
// Properties
146+
property DelphiObject: TPaintBox read GetDelphiObject write SetDelphiObject;
147+
end;
148+
140149
implementation
141150

142151
uses
@@ -180,6 +189,8 @@ procedure TShapesRegistration.RegisterWrappers(
180189
APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiCustomPath);
181190
APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiPath);
182191
APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiText);
192+
APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiImage);
193+
APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiPaintBox);
183194
end;
184195

185196
{ TPyDelphiShape }
@@ -421,6 +432,23 @@ procedure TPyDelphiImage.SetDelphiObject(const Value: TImage);
421432
inherited DelphiObject := Value;
422433
end;
423434

435+
{ TPyDelphiPaintBox }
436+
437+
class function TPyDelphiPaintBox.DelphiObjectClass: TClass;
438+
begin
439+
Result := TPaintBox;
440+
end;
441+
442+
function TPyDelphiPaintBox.GetDelphiObject: TPaintBox;
443+
begin
444+
Result := TPaintBox(inherited DelphiObject);
445+
end;
446+
447+
procedure TPyDelphiPaintBox.SetDelphiObject(const Value: TPaintBox);
448+
begin
449+
inherited DelphiObject := Value;
450+
end;
451+
424452
initialization
425453
RegisteredUnits.Add(TShapesRegistration.Create);
426454

0 commit comments

Comments
 (0)