Skip to content

Commit 4cc9c65

Browse files
committed
Adding TSelection wrapper
1 parent 282ccd1 commit 4cc9c65

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

Source/fmx/WrapFmxShapes.pas

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,15 @@ TPyDelphiPaintBox = class(TPyDelphiControl)
146146
property DelphiObject: TPaintBox read GetDelphiObject write SetDelphiObject;
147147
end;
148148

149+
TPyDelphiSelection = class(TPyDelphiControl)
150+
function GetDelphiObject: TSelection;
151+
procedure SetDelphiObject(const Value: TSelection);
152+
public
153+
class function DelphiObjectClass : TClass; override;
154+
// Properties
155+
property DelphiObject: TSelection read GetDelphiObject write SetDelphiObject;
156+
end;
157+
149158
implementation
150159

151160
uses
@@ -191,6 +200,7 @@ procedure TShapesRegistration.RegisterWrappers(
191200
APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiText);
192201
APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiImage);
193202
APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiPaintBox);
203+
APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiSelection);
194204
end;
195205

196206
{ TPyDelphiShape }
@@ -449,6 +459,23 @@ procedure TPyDelphiPaintBox.SetDelphiObject(const Value: TPaintBox);
449459
inherited DelphiObject := Value;
450460
end;
451461

462+
{ TPyDelphiSelection }
463+
464+
class function TPyDelphiSelection.DelphiObjectClass: TClass;
465+
begin
466+
Result := TSelection;
467+
end;
468+
469+
function TPyDelphiSelection.GetDelphiObject: TSelection;
470+
begin
471+
Result := TSelection(inherited DelphiObject);
472+
end;
473+
474+
procedure TPyDelphiSelection.SetDelphiObject(const Value: TSelection);
475+
begin
476+
inherited DelphiObject := Value;
477+
end;
478+
452479
initialization
453480
RegisteredUnits.Add(TShapesRegistration.Create);
454481

0 commit comments

Comments
 (0)