From 6f8ec5099151ed3d05611566670c1250293127f0 Mon Sep 17 00:00:00 2001 From: Lucas Moura Belo Date: Mon, 21 Dec 2020 10:17:33 -0300 Subject: [PATCH 01/23] Adding FMX.Dialogs.TOpenDialog wrapper --- Source/fmx/WrapFmxDialogs.pas | 114 ++++++++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 Source/fmx/WrapFmxDialogs.pas diff --git a/Source/fmx/WrapFmxDialogs.pas b/Source/fmx/WrapFmxDialogs.pas new file mode 100644 index 00000000..8302e619 --- /dev/null +++ b/Source/fmx/WrapFmxDialogs.pas @@ -0,0 +1,114 @@ +unit WrapFmxDialogs; + +interface + +uses + FMX.Dialogs, WrapDelphiClasses, PythonEngine; + + +type + TPyDelphiOpenDialog = class(TPyDelphiComponent) + private + function GetDelphiObject: TOpenDialog; + procedure SetDelphiObject(const Value: TOpenDialog); + protected + // Exposed Methods + function Execute_Wrapper(args: PPyObject): PPyObject; cdecl; + // Property Getters + function Get_filename(AContext: Pointer): PPyObject; cdecl; + public + class function DelphiObjectClass: TClass; override; + class procedure RegisterGetSets(PythonType: TPythonType); override; + class procedure RegisterMethods( PythonType : TPythonType ); override; + // Properties + property DelphiObject: TOpenDialog read GetDelphiObject + write SetDelphiObject; + end; + +implementation + +uses + WrapDelphi; + +{ Register the wrappers, the globals and the constants } +type + TDialogRegistration = class(TRegisteredUnit) + public + function Name: string; override; + procedure RegisterWrappers(APyDelphiWrapper: TPyDelphiWrapper); override; + procedure DefineVars(APyDelphiWrapper: TPyDelphiWrapper); override; + end; + +{ TDialogRegistration } + +procedure TDialogRegistration.DefineVars(APyDelphiWrapper: TPyDelphiWrapper); +begin + inherited; +end; + +function TDialogRegistration.Name: string; +begin + Result := 'Dialog'; +end; + +procedure TDialogRegistration.RegisterWrappers( + APyDelphiWrapper: TPyDelphiWrapper); +begin + inherited; + APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiOpenDialog); +end; + +{ TPyDelphiOpenDialog } + +class function TPyDelphiOpenDialog.DelphiObjectClass: TClass; +begin + Result := TOpenDialog; +end; + +function TPyDelphiOpenDialog.Execute_Wrapper(args: PPyObject): PPyObject; +begin + // We adjust the transmitted self argument + Adjust(@Self); + with GetPythonEngine do begin + if PyArg_ParseTuple( args, ':Execute') <> 0 then + Result := VariantAsPyObject(DelphiObject.Execute()) + else + Result := nil; + end; +end; + +function TPyDelphiOpenDialog.GetDelphiObject: TOpenDialog; +begin + Result := TOpenDialog(inherited DelphiObject); +end; + +function TPyDelphiOpenDialog.Get_filename(AContext: Pointer): PPyObject; +begin + Adjust(@self); + Result := GetPythonEngine.VariantAsPyObject(DelphiObject.FileName); +end; + +class procedure TPyDelphiOpenDialog.RegisterGetSets(PythonType: TPythonType); +begin + inherited; + PythonType.AddGetSet('FileName', @TPyDelphiOpenDialog.Get_filename, + nil, '', nil); +end; + +class procedure TPyDelphiOpenDialog.RegisterMethods(PythonType: TPythonType); +begin + inherited; + PythonType.AddMethod('Execute', @TPyDelphiOpenDialog.Execute_Wrapper, + 'TOpenDialog.Execute()'#10 + + 'Displays the dialog'); +end; + +procedure TPyDelphiOpenDialog.SetDelphiObject(const Value: TOpenDialog); +begin + inherited DelphiObject := Value; +end; + +initialization + RegisteredUnits.Add(TDialogRegistration.Create); + +end. From 6b51d5edf021b0f1ab4cc43adf9328e40a97139f Mon Sep 17 00:00:00 2001 From: Lucas Moura Belo Date: Mon, 21 Dec 2020 10:53:18 -0300 Subject: [PATCH 02/23] Adding TTabControl wrapper --- Source/fmx/WrapFmxComCtrls.pas | 129 +++++++++++++++++++++++++++++++++ 1 file changed, 129 insertions(+) create mode 100644 Source/fmx/WrapFmxComCtrls.pas diff --git a/Source/fmx/WrapFmxComCtrls.pas b/Source/fmx/WrapFmxComCtrls.pas new file mode 100644 index 00000000..21f98957 --- /dev/null +++ b/Source/fmx/WrapFmxComCtrls.pas @@ -0,0 +1,129 @@ +unit WrapFmxComCtrls; + +interface + +uses + FMX.Controls.Presentation, FMX.MultiView, FMX.TabControl, WrapFmxControls; + +type + TPyDelphiTabControl = class(TPyDelphiStyledControl) + private + function GetDelphiObject: TTabControl; + procedure SetDelphiObject(const Value: TTabControl); + public + class function DelphiObjectClass: TClass; override; + // Properties + property DelphiObject: TTabControl read GetDelphiObject write SetDelphiObject; + end; + + TPyDelphiCustomMultiView = class(TPyDelphiPresentedControl) + private + function GetDelphiObject: TCustomMultiView; + procedure SetDelphiObject(const Value: TCustomMultiView); + public + class function DelphiObjectClass: TClass; override; + // Properties + property DelphiObject: TCustomMultiView read GetDelphiObject write SetDelphiObject; + end; + + TPyDelphiMultiView = class(TPyDelphiCustomMultiView) + private + function GetDelphiObject: TMultiView; + procedure SetDelphiObject(const Value: TMultiView); + public + class function DelphiObjectClass: TClass; override; + // Properties + property DelphiObject: TMultiView read GetDelphiObject write SetDelphiObject; + end; + +implementation + +uses + WrapDelphi; + +{ Register the wrappers, the globals and the constants } +type + TComCtrlsRegistration = class(TRegisteredUnit) + public + function Name: string; override; + procedure RegisterWrappers(APyDelphiWrapper: TPyDelphiWrapper); override; + procedure DefineVars(APyDelphiWrapper: TPyDelphiWrapper); override; + end; + +{ TComCtrlsRegistration } + +procedure TComCtrlsRegistration.DefineVars(APyDelphiWrapper: TPyDelphiWrapper); +begin + inherited; +end; + +function TComCtrlsRegistration.Name: string; +begin + Result := 'ComCtrls'; +end; + +procedure TComCtrlsRegistration.RegisterWrappers( + APyDelphiWrapper: TPyDelphiWrapper); +begin + inherited; + APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiTabControl); + APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiCustomMultiView); + APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiMultiView); +end; + +{ TPyDelphiTabControl } + +class function TPyDelphiTabControl.DelphiObjectClass: TClass; +begin + Result := TTabControl; +end; + +function TPyDelphiTabControl.GetDelphiObject: TTabControl; +begin + Result := TTabControl(inherited DelphiObject); +end; + +procedure TPyDelphiTabControl.SetDelphiObject(const Value: TTabControl); +begin + inherited DelphiObject := Value; +end; + +{ TPyDelphiCustomMultiView } + +class function TPyDelphiCustomMultiView.DelphiObjectClass: TClass; +begin + Result := TCustomMultiView; +end; + +function TPyDelphiCustomMultiView.GetDelphiObject: TCustomMultiView; +begin + Result := TCustomMultiView(inherited DelphiObject); +end; + +procedure TPyDelphiCustomMultiView.SetDelphiObject( + const Value: TCustomMultiView); +begin + inherited DelphiObject := Value; +end; + +{ TPyDelphiMultiView } + +class function TPyDelphiMultiView.DelphiObjectClass: TClass; +begin + Result := TMultiView; +end; + +function TPyDelphiMultiView.GetDelphiObject: TMultiView; +begin + Result := TMultiView(inherited DelphiObject); +end; + +procedure TPyDelphiMultiView.SetDelphiObject(const Value: TMultiView); +begin + inherited DelphiObject := Value; +end; + +initialization + RegisteredUnits.Add( TComCtrlsRegistration.Create ); + +end. From 29a563ed2108cb8be3b94901275567ea4d3fdd65 Mon Sep 17 00:00:00 2001 From: Lucas Moura Belo Date: Mon, 21 Dec 2020 10:54:19 -0300 Subject: [PATCH 03/23] Adding TCustomMultiView wrapper --- Source/fmx/WrapFmxComCtrls.pas | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/Source/fmx/WrapFmxComCtrls.pas b/Source/fmx/WrapFmxComCtrls.pas index 21f98957..64cc023d 100644 --- a/Source/fmx/WrapFmxComCtrls.pas +++ b/Source/fmx/WrapFmxComCtrls.pas @@ -26,16 +26,6 @@ TPyDelphiCustomMultiView = class(TPyDelphiPresentedControl) property DelphiObject: TCustomMultiView read GetDelphiObject write SetDelphiObject; end; - TPyDelphiMultiView = class(TPyDelphiCustomMultiView) - private - function GetDelphiObject: TMultiView; - procedure SetDelphiObject(const Value: TMultiView); - public - class function DelphiObjectClass: TClass; override; - // Properties - property DelphiObject: TMultiView read GetDelphiObject write SetDelphiObject; - end; - implementation uses @@ -68,7 +58,6 @@ procedure TComCtrlsRegistration.RegisterWrappers( inherited; APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiTabControl); APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiCustomMultiView); - APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiMultiView); end; { TPyDelphiTabControl } @@ -88,7 +77,7 @@ procedure TPyDelphiTabControl.SetDelphiObject(const Value: TTabControl); inherited DelphiObject := Value; end; -{ TPyDelphiCustomMultiView } + { TPyDelphiCustomMultiView } class function TPyDelphiCustomMultiView.DelphiObjectClass: TClass; begin @@ -106,23 +95,6 @@ procedure TPyDelphiCustomMultiView.SetDelphiObject( inherited DelphiObject := Value; end; -{ TPyDelphiMultiView } - -class function TPyDelphiMultiView.DelphiObjectClass: TClass; -begin - Result := TMultiView; -end; - -function TPyDelphiMultiView.GetDelphiObject: TMultiView; -begin - Result := TMultiView(inherited DelphiObject); -end; - -procedure TPyDelphiMultiView.SetDelphiObject(const Value: TMultiView); -begin - inherited DelphiObject := Value; -end; - initialization RegisteredUnits.Add( TComCtrlsRegistration.Create ); From c5130baeb49cf5aa3f6be7bf09a50eafb4d7b82e Mon Sep 17 00:00:00 2001 From: Lucas Moura Belo Date: Mon, 21 Dec 2020 10:55:02 -0300 Subject: [PATCH 04/23] Adding TMultiView wrapper --- Source/fmx/WrapFmxComCtrls.pas | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/Source/fmx/WrapFmxComCtrls.pas b/Source/fmx/WrapFmxComCtrls.pas index 64cc023d..56ef5497 100644 --- a/Source/fmx/WrapFmxComCtrls.pas +++ b/Source/fmx/WrapFmxComCtrls.pas @@ -26,6 +26,16 @@ TPyDelphiCustomMultiView = class(TPyDelphiPresentedControl) property DelphiObject: TCustomMultiView read GetDelphiObject write SetDelphiObject; end; + TPyDelphiMultiView = class(TPyDelphiCustomMultiView) + private + function GetDelphiObject: TMultiView; + procedure SetDelphiObject(const Value: TMultiView); + public + class function DelphiObjectClass: TClass; override; + // Properties + property DelphiObject: TMultiView read GetDelphiObject write SetDelphiObject; + end; + implementation uses @@ -58,6 +68,7 @@ procedure TComCtrlsRegistration.RegisterWrappers( inherited; APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiTabControl); APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiCustomMultiView); + APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiMultiView); end; { TPyDelphiTabControl } @@ -95,6 +106,23 @@ procedure TPyDelphiCustomMultiView.SetDelphiObject( inherited DelphiObject := Value; end; +{ TPyDelphiMultiView } + +class function TPyDelphiMultiView.DelphiObjectClass: TClass; +begin + Result := TMultiView; +end; + +function TPyDelphiMultiView.GetDelphiObject: TMultiView; +begin + Result := TMultiView(inherited DelphiObject); +end; + +procedure TPyDelphiMultiView.SetDelphiObject(const Value: TMultiView); +begin + inherited DelphiObject := Value; +end; + initialization RegisteredUnits.Add( TComCtrlsRegistration.Create ); From c7aea86cd47e7e65afa1b1f8b75518984b530871 Mon Sep 17 00:00:00 2001 From: Lucas Moura Belo Date: Mon, 21 Dec 2020 10:43:21 -0300 Subject: [PATCH 05/23] Inheritance correction --- Source/fmx/WrapFmxDialogs.pas | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/fmx/WrapFmxDialogs.pas b/Source/fmx/WrapFmxDialogs.pas index 8302e619..7a474ea2 100644 --- a/Source/fmx/WrapFmxDialogs.pas +++ b/Source/fmx/WrapFmxDialogs.pas @@ -3,11 +3,11 @@ interface uses - FMX.Dialogs, WrapDelphiClasses, PythonEngine; + FMX.Dialogs, WrapFmxTypes, PythonEngine; type - TPyDelphiOpenDialog = class(TPyDelphiComponent) + TPyDelphiOpenDialog = class(TPyDelphiFmxObject) private function GetDelphiObject: TOpenDialog; procedure SetDelphiObject(const Value: TOpenDialog); From e742ae88f66f079821a21a67786ccc57843638fa Mon Sep 17 00:00:00 2001 From: Lucas Moura Belo Date: Mon, 21 Dec 2020 11:26:37 -0300 Subject: [PATCH 06/23] Adding FMX TShape wrapper --- Source/fmx/WrapFmxShapes.pas | 71 ++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 Source/fmx/WrapFmxShapes.pas diff --git a/Source/fmx/WrapFmxShapes.pas b/Source/fmx/WrapFmxShapes.pas new file mode 100644 index 00000000..a3e79cf3 --- /dev/null +++ b/Source/fmx/WrapFmxShapes.pas @@ -0,0 +1,71 @@ +unit WrapFmxShapes; + +interface + +uses + FMX.Objects, WrapFmxControls; + +type + TPyDelphiShape = class(TPyDelphiControl) + private + function GetDelphiObject: TShape; + procedure SetDelphiObject(const Value: TShape); + public + class function DelphiObjectClass : TClass; override; + // Properties + property DelphiObject: TShape read GetDelphiObject write SetDelphiObject; + end; + +implementation + +uses + WrapDelphi; + +{ Register the wrappers, the globals and the constants } +type + TShapesRegistration = class(TRegisteredUnit) + public + function Name : string; override; + procedure RegisterWrappers(APyDelphiWrapper : TPyDelphiWrapper); override; + procedure DefineVars(APyDelphiWrapper : TPyDelphiWrapper); override; + end; + +{ TShapesRegistration } + +procedure TShapesRegistration.DefineVars(APyDelphiWrapper: TPyDelphiWrapper); +begin + inherited; +end; + +function TShapesRegistration.Name: string; +begin + Result := 'Shapes'; +end; + +procedure TShapesRegistration.RegisterWrappers( + APyDelphiWrapper: TPyDelphiWrapper); +begin + inherited; +end; + +{ TPyDelphiShape } + +class function TPyDelphiShape.DelphiObjectClass: TClass; +begin + Result := TShape; +end; + +function TPyDelphiShape.GetDelphiObject: TShape; +begin + Result := TShape(inherited DelphiObject); +end; + +procedure TPyDelphiShape.SetDelphiObject(const Value: TShape); +begin + inherited DelphiObject := Value; +end; + +initialization + RegisteredUnits.Add(TShapesRegistration.Create); + +end. From 611cf6814926a32b463a8a5f59a230ab5e74ed1e Mon Sep 17 00:00:00 2001 From: Lucas Moura Belo Date: Mon, 21 Dec 2020 11:28:09 -0300 Subject: [PATCH 07/23] Adding FMX TLine wrapper --- Source/fmx/WrapFmxShapes.pas | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/Source/fmx/WrapFmxShapes.pas b/Source/fmx/WrapFmxShapes.pas index a3e79cf3..53fba0ca 100644 --- a/Source/fmx/WrapFmxShapes.pas +++ b/Source/fmx/WrapFmxShapes.pas @@ -16,6 +16,16 @@ TPyDelphiShape = class(TPyDelphiControl) property DelphiObject: TShape read GetDelphiObject write SetDelphiObject; end; + TPyDelphiLine = class(TPyDelphiShape) + private + function GetDelphiObject: TLine; + procedure SetDelphiObject(const Value: TLine); + public + class function DelphiObjectClass : TClass; override; + // Properties + property DelphiObject: TLine read GetDelphiObject write SetDelphiObject; + end; + implementation uses @@ -46,6 +56,7 @@ procedure TShapesRegistration.RegisterWrappers( APyDelphiWrapper: TPyDelphiWrapper); begin inherited; + APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiLine); end; { TPyDelphiShape } @@ -65,6 +76,23 @@ procedure TPyDelphiShape.SetDelphiObject(const Value: TShape); inherited DelphiObject := Value; end; +{ TPyDelphiLine } + +class function TPyDelphiLine.DelphiObjectClass: TClass; +begin + Result := TLine; +end; + +function TPyDelphiLine.GetDelphiObject: TLine; +begin + Result := TLine(inherited DelphiObject); +end; + +procedure TPyDelphiLine.SetDelphiObject(const Value: TLine); +begin + inherited DelphiObject := Value; +end; + initialization RegisteredUnits.Add(TShapesRegistration.Create); From caf79bed85a3feef55b94c874ef5680feeef25d2 Mon Sep 17 00:00:00 2001 From: Lucas Moura Belo Date: Mon, 21 Dec 2020 11:28:30 -0300 Subject: [PATCH 08/23] Registering TShape wrapper --- Source/fmx/WrapFmxShapes.pas | 1 + 1 file changed, 1 insertion(+) diff --git a/Source/fmx/WrapFmxShapes.pas b/Source/fmx/WrapFmxShapes.pas index 53fba0ca..3ce1635a 100644 --- a/Source/fmx/WrapFmxShapes.pas +++ b/Source/fmx/WrapFmxShapes.pas @@ -56,6 +56,7 @@ procedure TShapesRegistration.RegisterWrappers( APyDelphiWrapper: TPyDelphiWrapper); begin inherited; + APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiShape); APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiLine); end; From d8927305cf28b18f393576bf5219a732e8523850 Mon Sep 17 00:00:00 2001 From: Lucas Moura Belo Date: Mon, 21 Dec 2020 11:38:01 -0300 Subject: [PATCH 09/23] Adding TRectangle wrapper --- Source/fmx/WrapFmxShapes.pas | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/Source/fmx/WrapFmxShapes.pas b/Source/fmx/WrapFmxShapes.pas index 3ce1635a..34123fa5 100644 --- a/Source/fmx/WrapFmxShapes.pas +++ b/Source/fmx/WrapFmxShapes.pas @@ -26,6 +26,16 @@ TPyDelphiLine = class(TPyDelphiShape) property DelphiObject: TLine read GetDelphiObject write SetDelphiObject; end; + TPyDelphiRectangle = class(TPyDelphiShape) + private + function GetDelphiObject: TRectangle; + procedure SetDelphiObject(const Value: TRectangle); + public + class function DelphiObjectClass : TClass; override; + // Properties + property DelphiObject: TRectangle read GetDelphiObject write SetDelphiObject; + end; + implementation uses @@ -58,6 +68,7 @@ procedure TShapesRegistration.RegisterWrappers( inherited; APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiShape); APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiLine); + APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiRectangle); end; { TPyDelphiShape } @@ -94,6 +105,23 @@ procedure TPyDelphiLine.SetDelphiObject(const Value: TLine); inherited DelphiObject := Value; end; +{ TPyDelphiRectangle } + +class function TPyDelphiRectangle.DelphiObjectClass: TClass; +begin + Result := TRectangle; +end; + +function TPyDelphiRectangle.GetDelphiObject: TRectangle; +begin + Result := TRectangle(inherited DelphiObject); +end; + +procedure TPyDelphiRectangle.SetDelphiObject(const Value: TRectangle); +begin + inherited DelphiObject := Value; +end; + initialization RegisteredUnits.Add(TShapesRegistration.Create); From d739bec71cd184b33f59677c627344545329792a Mon Sep 17 00:00:00 2001 From: Lucas Moura Belo Date: Mon, 21 Dec 2020 11:39:35 -0300 Subject: [PATCH 10/23] Adding TCaretRectangle wrapper --- Source/fmx/WrapFmxShapes.pas | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/Source/fmx/WrapFmxShapes.pas b/Source/fmx/WrapFmxShapes.pas index 34123fa5..80bf19e9 100644 --- a/Source/fmx/WrapFmxShapes.pas +++ b/Source/fmx/WrapFmxShapes.pas @@ -36,6 +36,16 @@ TPyDelphiRectangle = class(TPyDelphiShape) property DelphiObject: TRectangle read GetDelphiObject write SetDelphiObject; end; + TPyDelphiCaretRectangle = class(TPyDelphiRectangle) + private + function GetDelphiObject: TCaretRectangle; + procedure SetDelphiObject(const Value: TCaretRectangle); + public + class function DelphiObjectClass : TClass; override; + // Properties + property DelphiObject: TCaretRectangle read GetDelphiObject write SetDelphiObject; + end; + implementation uses @@ -69,6 +79,7 @@ procedure TShapesRegistration.RegisterWrappers( APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiShape); APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiLine); APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiRectangle); + APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiCaretRectangle); end; { TPyDelphiShape } @@ -122,6 +133,23 @@ procedure TPyDelphiRectangle.SetDelphiObject(const Value: TRectangle); inherited DelphiObject := Value; end; +{ TPyDelphiCaretRectangle } + +class function TPyDelphiCaretRectangle.DelphiObjectClass: TClass; +begin + Result := TCaretRectangle; +end; + +function TPyDelphiCaretRectangle.GetDelphiObject: TCaretRectangle; +begin + Result := TCaretRectangle(inherited DelphiObject); +end; + +procedure TPyDelphiCaretRectangle.SetDelphiObject(const Value: TCaretRectangle); +begin + inherited DelphiObject := Value; +end; + initialization RegisteredUnits.Add(TShapesRegistration.Create); From c0417d9dda243d35cc5d188b7bc4f247d5b0243c Mon Sep 17 00:00:00 2001 From: Lucas Moura Belo Date: Mon, 21 Dec 2020 11:41:07 -0300 Subject: [PATCH 11/23] Adding TRoundRect wrapper --- Source/fmx/WrapFmxShapes.pas | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/Source/fmx/WrapFmxShapes.pas b/Source/fmx/WrapFmxShapes.pas index 80bf19e9..b0acdba1 100644 --- a/Source/fmx/WrapFmxShapes.pas +++ b/Source/fmx/WrapFmxShapes.pas @@ -46,6 +46,16 @@ TPyDelphiCaretRectangle = class(TPyDelphiRectangle) property DelphiObject: TCaretRectangle read GetDelphiObject write SetDelphiObject; end; + TPyDelphiRoundRect = class(TPyDelphiShape) + private + function GetDelphiObject: TRoundRect; + procedure SetDelphiObject(const Value: TRoundRect); + public + class function DelphiObjectClass : TClass; override; + // Properties + property DelphiObject: TRoundRect read GetDelphiObject write SetDelphiObject; + end; + implementation uses @@ -80,6 +90,7 @@ procedure TShapesRegistration.RegisterWrappers( APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiLine); APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiRectangle); APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiCaretRectangle); + APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiRoundRect); end; { TPyDelphiShape } @@ -150,6 +161,23 @@ procedure TPyDelphiCaretRectangle.SetDelphiObject(const Value: TCaretRectangle); inherited DelphiObject := Value; end; +{ TPyDelphiRoundRect } + +class function TPyDelphiRoundRect.DelphiObjectClass: TClass; +begin + Result := TRoundRect; +end; + +function TPyDelphiRoundRect.GetDelphiObject: TRoundRect; +begin + Result := TRoundRect(inherited DelphiObject); +end; + +procedure TPyDelphiRoundRect.SetDelphiObject(const Value: TRoundRect); +begin + inherited DelphiObject := Value; +end; + initialization RegisteredUnits.Add(TShapesRegistration.Create); From e24cb8801742ae957462d706015af5d3a08bd32e Mon Sep 17 00:00:00 2001 From: Lucas Moura Belo Date: Mon, 21 Dec 2020 11:42:46 -0300 Subject: [PATCH 12/23] Adding TCalloutRectangle wrapper --- Source/fmx/WrapFmxShapes.pas | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/Source/fmx/WrapFmxShapes.pas b/Source/fmx/WrapFmxShapes.pas index b0acdba1..0e7d219c 100644 --- a/Source/fmx/WrapFmxShapes.pas +++ b/Source/fmx/WrapFmxShapes.pas @@ -56,6 +56,15 @@ TPyDelphiRoundRect = class(TPyDelphiShape) property DelphiObject: TRoundRect read GetDelphiObject write SetDelphiObject; end; + TPyDelphiCalloutRectangle = class(TPyDelphiRectangle) + function GetDelphiObject: TCalloutRectangle; + procedure SetDelphiObject(const Value: TCalloutRectangle); + public + class function DelphiObjectClass : TClass; override; + // Properties + property DelphiObject: TCalloutRectangle read GetDelphiObject write SetDelphiObject; + end; + implementation uses @@ -91,6 +100,7 @@ procedure TShapesRegistration.RegisterWrappers( APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiRectangle); APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiCaretRectangle); APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiRoundRect); + APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiCalloutRectangle); end; { TPyDelphiShape } @@ -178,6 +188,24 @@ procedure TPyDelphiRoundRect.SetDelphiObject(const Value: TRoundRect); inherited DelphiObject := Value; end; +{ TPyDelphiCalloutRectangle } + +class function TPyDelphiCalloutRectangle.DelphiObjectClass: TClass; +begin + Result := TCalloutRectangle; +end; + +function TPyDelphiCalloutRectangle.GetDelphiObject: TCalloutRectangle; +begin + Result := TCalloutRectangle(inherited DelphiObject); +end; + +procedure TPyDelphiCalloutRectangle.SetDelphiObject( + const Value: TCalloutRectangle); +begin + inherited DelphiObject := Value; +end; + initialization RegisteredUnits.Add(TShapesRegistration.Create); From f3e842a9c8daebe24f23bdab58cd001598222200 Mon Sep 17 00:00:00 2001 From: Lucas Moura Belo Date: Mon, 21 Dec 2020 11:44:35 -0300 Subject: [PATCH 13/23] Adding TEllipse wrapper --- Source/fmx/WrapFmxShapes.pas | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/Source/fmx/WrapFmxShapes.pas b/Source/fmx/WrapFmxShapes.pas index 0e7d219c..bb1ece98 100644 --- a/Source/fmx/WrapFmxShapes.pas +++ b/Source/fmx/WrapFmxShapes.pas @@ -65,6 +65,15 @@ TPyDelphiCalloutRectangle = class(TPyDelphiRectangle) property DelphiObject: TCalloutRectangle read GetDelphiObject write SetDelphiObject; end; + TPyDelphiEllipse = class(TPyDelphiShape) + function GetDelphiObject: TEllipse; + procedure SetDelphiObject(const Value: TEllipse); + public + class function DelphiObjectClass : TClass; override; + // Properties + property DelphiObject: TEllipse read GetDelphiObject write SetDelphiObject; + end; + implementation uses @@ -101,6 +110,7 @@ procedure TShapesRegistration.RegisterWrappers( APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiCaretRectangle); APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiRoundRect); APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiCalloutRectangle); + APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiEllipse); end; { TPyDelphiShape } @@ -158,7 +168,7 @@ procedure TPyDelphiRectangle.SetDelphiObject(const Value: TRectangle); class function TPyDelphiCaretRectangle.DelphiObjectClass: TClass; begin - Result := TCaretRectangle; + Result := TCaretRectangle; end; function TPyDelphiCaretRectangle.GetDelphiObject: TCaretRectangle; @@ -175,7 +185,7 @@ procedure TPyDelphiCaretRectangle.SetDelphiObject(const Value: TCaretRectangle); class function TPyDelphiRoundRect.DelphiObjectClass: TClass; begin - Result := TRoundRect; + Result := TRoundRect; end; function TPyDelphiRoundRect.GetDelphiObject: TRoundRect; @@ -192,7 +202,7 @@ procedure TPyDelphiRoundRect.SetDelphiObject(const Value: TRoundRect); class function TPyDelphiCalloutRectangle.DelphiObjectClass: TClass; begin - Result := TCalloutRectangle; + Result := TCalloutRectangle; end; function TPyDelphiCalloutRectangle.GetDelphiObject: TCalloutRectangle; @@ -206,6 +216,23 @@ procedure TPyDelphiCalloutRectangle.SetDelphiObject( inherited DelphiObject := Value; end; +{ TPyDelphiEllipse } + +class function TPyDelphiEllipse.DelphiObjectClass: TClass; +begin + Result := TEllipse; +end; + +function TPyDelphiEllipse.GetDelphiObject: TEllipse; +begin + Result := TEllipse(inherited DelphiObject); +end; + +procedure TPyDelphiEllipse.SetDelphiObject(const Value: TEllipse); +begin + inherited DelphiObject := Value; +end; + initialization RegisteredUnits.Add(TShapesRegistration.Create); From d2a3cab7fc90745b7fcaaad88c8fb75b84744b4a Mon Sep 17 00:00:00 2001 From: Lucas Moura Belo Date: Mon, 21 Dec 2020 11:45:37 -0300 Subject: [PATCH 14/23] Adding TCircle wrapper --- Source/fmx/WrapFmxShapes.pas | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/Source/fmx/WrapFmxShapes.pas b/Source/fmx/WrapFmxShapes.pas index bb1ece98..dc2eb2a4 100644 --- a/Source/fmx/WrapFmxShapes.pas +++ b/Source/fmx/WrapFmxShapes.pas @@ -74,6 +74,15 @@ TPyDelphiEllipse = class(TPyDelphiShape) property DelphiObject: TEllipse read GetDelphiObject write SetDelphiObject; end; + TPyDelphiCircle = class(TPyDelphiEllipse) + function GetDelphiObject: TCircle; + procedure SetDelphiObject(const Value: TCircle); + public + class function DelphiObjectClass : TClass; override; + // Properties + property DelphiObject: TCircle read GetDelphiObject write SetDelphiObject; + end; + implementation uses @@ -111,6 +120,7 @@ procedure TShapesRegistration.RegisterWrappers( APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiRoundRect); APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiCalloutRectangle); APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiEllipse); + APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiCircle); end; { TPyDelphiShape } @@ -233,6 +243,23 @@ procedure TPyDelphiEllipse.SetDelphiObject(const Value: TEllipse); inherited DelphiObject := Value; end; +{ TPyDelphiCircle } + +class function TPyDelphiCircle.DelphiObjectClass: TClass; +begin + Result := TCircle; +end; + +function TPyDelphiCircle.GetDelphiObject: TCircle; +begin + Result := TCircle(inherited DelphiObject); +end; + +procedure TPyDelphiCircle.SetDelphiObject(const Value: TCircle); +begin + inherited DelphiObject := Value; +end; + initialization RegisteredUnits.Add(TShapesRegistration.Create); From f8991fdeac6483d03cbe8b2ef6bfc8ce2a4b922a Mon Sep 17 00:00:00 2001 From: Lucas Moura Belo Date: Mon, 21 Dec 2020 11:46:38 -0300 Subject: [PATCH 15/23] Adding TPie wrapper --- Source/fmx/WrapFmxShapes.pas | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/Source/fmx/WrapFmxShapes.pas b/Source/fmx/WrapFmxShapes.pas index dc2eb2a4..2dbf86dc 100644 --- a/Source/fmx/WrapFmxShapes.pas +++ b/Source/fmx/WrapFmxShapes.pas @@ -83,6 +83,15 @@ TPyDelphiCircle = class(TPyDelphiEllipse) property DelphiObject: TCircle read GetDelphiObject write SetDelphiObject; end; + TPyDelphiPie = class(TPyDelphiEllipse) + function GetDelphiObject: TPie; + procedure SetDelphiObject(const Value: TPie); + public + class function DelphiObjectClass : TClass; override; + // Properties + property DelphiObject: TPie read GetDelphiObject write SetDelphiObject; + end; + implementation uses @@ -121,6 +130,7 @@ procedure TShapesRegistration.RegisterWrappers( APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiCalloutRectangle); APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiEllipse); APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiCircle); + APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiPie); end; { TPyDelphiShape } @@ -260,6 +270,23 @@ procedure TPyDelphiCircle.SetDelphiObject(const Value: TCircle); inherited DelphiObject := Value; end; +{ TPyDelphiPie } + +class function TPyDelphiPie.DelphiObjectClass: TClass; +begin + Result := TPie; +end; + +function TPyDelphiPie.GetDelphiObject: TPie; +begin + Result := TPie(inherited DelphiObject); +end; + +procedure TPyDelphiPie.SetDelphiObject(const Value: TPie); +begin + inherited DelphiObject := Value; +end; + initialization RegisteredUnits.Add(TShapesRegistration.Create); From c4975a33ec817949101d0e051101ff34556e40c2 Mon Sep 17 00:00:00 2001 From: Lucas Moura Belo Date: Mon, 21 Dec 2020 11:47:57 -0300 Subject: [PATCH 16/23] Adding TArc wrapper --- Source/fmx/WrapFmxShapes.pas | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/Source/fmx/WrapFmxShapes.pas b/Source/fmx/WrapFmxShapes.pas index 2dbf86dc..49cdaba2 100644 --- a/Source/fmx/WrapFmxShapes.pas +++ b/Source/fmx/WrapFmxShapes.pas @@ -92,6 +92,15 @@ TPyDelphiPie = class(TPyDelphiEllipse) property DelphiObject: TPie read GetDelphiObject write SetDelphiObject; end; + TPyDelphiArc = class(TPyDelphiEllipse) + function GetDelphiObject: TArc; + procedure SetDelphiObject(const Value: TArc); + public + class function DelphiObjectClass : TClass; override; + // Properties + property DelphiObject: TArc read GetDelphiObject write SetDelphiObject; + end; + implementation uses @@ -131,6 +140,7 @@ procedure TShapesRegistration.RegisterWrappers( APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiEllipse); APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiCircle); APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiPie); + APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiArc); end; { TPyDelphiShape } @@ -287,6 +297,23 @@ procedure TPyDelphiPie.SetDelphiObject(const Value: TPie); inherited DelphiObject := Value; end; +{ TPyDelphiArc } + +class function TPyDelphiArc.DelphiObjectClass: TClass; +begin + Result := TArc +end; + +function TPyDelphiArc.GetDelphiObject: TArc; +begin + Result := TArc(inherited DelphiObject); +end; + +procedure TPyDelphiArc.SetDelphiObject(const Value: TArc); +begin + inherited DelphiObject := Value; +end; + initialization RegisteredUnits.Add(TShapesRegistration.Create); From 18dff6cecaee53186d2e7945ed0eb716f00bf980 Mon Sep 17 00:00:00 2001 From: Lucas Moura Belo Date: Mon, 21 Dec 2020 11:49:06 -0300 Subject: [PATCH 17/23] Adding TCustomPath wrapper --- Source/fmx/WrapFmxShapes.pas | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/Source/fmx/WrapFmxShapes.pas b/Source/fmx/WrapFmxShapes.pas index 49cdaba2..cc260bfc 100644 --- a/Source/fmx/WrapFmxShapes.pas +++ b/Source/fmx/WrapFmxShapes.pas @@ -101,6 +101,15 @@ TPyDelphiArc = class(TPyDelphiEllipse) property DelphiObject: TArc read GetDelphiObject write SetDelphiObject; end; + TPyDelphiCustomPath = class(TPyDelphiShape) + function GetDelphiObject: TCustomPath; + procedure SetDelphiObject(const Value: TCustomPath); + public + class function DelphiObjectClass : TClass; override; + // Properties + property DelphiObject: TCustomPath read GetDelphiObject write SetDelphiObject; + end; + implementation uses @@ -141,6 +150,7 @@ procedure TShapesRegistration.RegisterWrappers( APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiCircle); APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiPie); APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiArc); + APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiCustomPath); end; { TPyDelphiShape } @@ -314,6 +324,23 @@ procedure TPyDelphiArc.SetDelphiObject(const Value: TArc); inherited DelphiObject := Value; end; +{ TPyDelphiCustomPath } + +class function TPyDelphiCustomPath.DelphiObjectClass: TClass; +begin + Result := TCustomPath +end; + +function TPyDelphiCustomPath.GetDelphiObject: TCustomPath; +begin + Result := TCustomPath(inherited DelphiObject); +end; + +procedure TPyDelphiCustomPath.SetDelphiObject(const Value: TCustomPath); +begin + inherited DelphiObject := Value; +end; + initialization RegisteredUnits.Add(TShapesRegistration.Create); From e7be7fc70e1356aa732c4cdcbd0054cc0b084a2b Mon Sep 17 00:00:00 2001 From: Lucas Moura Belo Date: Mon, 21 Dec 2020 11:50:10 -0300 Subject: [PATCH 18/23] Adding TPath wrapper --- Source/fmx/WrapFmxShapes.pas | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/Source/fmx/WrapFmxShapes.pas b/Source/fmx/WrapFmxShapes.pas index cc260bfc..c3e5fc2a 100644 --- a/Source/fmx/WrapFmxShapes.pas +++ b/Source/fmx/WrapFmxShapes.pas @@ -110,6 +110,15 @@ TPyDelphiCustomPath = class(TPyDelphiShape) property DelphiObject: TCustomPath read GetDelphiObject write SetDelphiObject; end; + TPyDelphiPath = class(TPyDelphiCustomPath) + function GetDelphiObject: TPath; + procedure SetDelphiObject(const Value: TPath); + public + class function DelphiObjectClass : TClass; override; + // Properties + property DelphiObject: TPath read GetDelphiObject write SetDelphiObject; + end; + implementation uses @@ -151,6 +160,7 @@ procedure TShapesRegistration.RegisterWrappers( APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiPie); APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiArc); APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiCustomPath); + APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiPath); end; { TPyDelphiShape } @@ -341,6 +351,23 @@ procedure TPyDelphiCustomPath.SetDelphiObject(const Value: TCustomPath); inherited DelphiObject := Value; end; +{ TPyDelphiPath } + +class function TPyDelphiPath.DelphiObjectClass: TClass; +begin + Result := TPath +end; + +function TPyDelphiPath.GetDelphiObject: TPath; +begin + Result := TPath(inherited DelphiObject); +end; + +procedure TPyDelphiPath.SetDelphiObject(const Value: TPath); +begin + inherited DelphiObject := Value; +end; + initialization RegisteredUnits.Add(TShapesRegistration.Create); From a018711e252e096bd8fbbd9c80ac7b7322470512 Mon Sep 17 00:00:00 2001 From: Lucas Moura Belo Date: Mon, 21 Dec 2020 11:51:57 -0300 Subject: [PATCH 19/23] Adding TText wrapper --- Source/fmx/WrapFmxShapes.pas | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/Source/fmx/WrapFmxShapes.pas b/Source/fmx/WrapFmxShapes.pas index c3e5fc2a..0cac79f8 100644 --- a/Source/fmx/WrapFmxShapes.pas +++ b/Source/fmx/WrapFmxShapes.pas @@ -119,6 +119,15 @@ TPyDelphiPath = class(TPyDelphiCustomPath) property DelphiObject: TPath read GetDelphiObject write SetDelphiObject; end; + TPyDelphiText = class(TPyDelphiControl) + function GetDelphiObject: TText; + procedure SetDelphiObject(const Value: TText); + public + class function DelphiObjectClass : TClass; override; + // Properties + property DelphiObject: TText read GetDelphiObject write SetDelphiObject; + end; + implementation uses @@ -161,6 +170,7 @@ procedure TShapesRegistration.RegisterWrappers( APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiArc); APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiCustomPath); APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiPath); + APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiText); end; { TPyDelphiShape } @@ -368,6 +378,23 @@ procedure TPyDelphiPath.SetDelphiObject(const Value: TPath); inherited DelphiObject := Value; end; +{ TPyDelphiText } + +class function TPyDelphiText.DelphiObjectClass: TClass; +begin + Result := TText +end; + +function TPyDelphiText.GetDelphiObject: TText; +begin + Result := TText(inherited DelphiObject); +end; + +procedure TPyDelphiText.SetDelphiObject(const Value: TText); +begin + inherited DelphiObject := Value; +end; + initialization RegisteredUnits.Add(TShapesRegistration.Create); From 1d524ee8e6161b9dbed3f76aebeffbc20c3d48f4 Mon Sep 17 00:00:00 2001 From: Lucas Moura Belo Date: Mon, 21 Dec 2020 11:53:43 -0300 Subject: [PATCH 20/23] Adding TImage wrapper --- Source/fmx/WrapFmxShapes.pas | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/Source/fmx/WrapFmxShapes.pas b/Source/fmx/WrapFmxShapes.pas index 0cac79f8..c4499963 100644 --- a/Source/fmx/WrapFmxShapes.pas +++ b/Source/fmx/WrapFmxShapes.pas @@ -128,6 +128,15 @@ TPyDelphiText = class(TPyDelphiControl) property DelphiObject: TText read GetDelphiObject write SetDelphiObject; end; + TPyDelphiImage = class(TPyDelphiControl) + function GetDelphiObject: TImage; + procedure SetDelphiObject(const Value: TImage); + public + class function DelphiObjectClass : TClass; override; + // Properties + property DelphiObject: TImage read GetDelphiObject write SetDelphiObject; + end; + implementation uses @@ -331,7 +340,7 @@ procedure TPyDelphiPie.SetDelphiObject(const Value: TPie); class function TPyDelphiArc.DelphiObjectClass: TClass; begin - Result := TArc + Result := TArc; end; function TPyDelphiArc.GetDelphiObject: TArc; @@ -348,7 +357,7 @@ procedure TPyDelphiArc.SetDelphiObject(const Value: TArc); class function TPyDelphiCustomPath.DelphiObjectClass: TClass; begin - Result := TCustomPath + Result := TCustomPath; end; function TPyDelphiCustomPath.GetDelphiObject: TCustomPath; @@ -365,7 +374,7 @@ procedure TPyDelphiCustomPath.SetDelphiObject(const Value: TCustomPath); class function TPyDelphiPath.DelphiObjectClass: TClass; begin - Result := TPath + Result := TPath; end; function TPyDelphiPath.GetDelphiObject: TPath; @@ -382,7 +391,7 @@ procedure TPyDelphiPath.SetDelphiObject(const Value: TPath); class function TPyDelphiText.DelphiObjectClass: TClass; begin - Result := TText + Result := TText; end; function TPyDelphiText.GetDelphiObject: TText; @@ -395,6 +404,23 @@ procedure TPyDelphiText.SetDelphiObject(const Value: TText); inherited DelphiObject := Value; end; +{ TPyDelphiImage } + +class function TPyDelphiImage.DelphiObjectClass: TClass; +begin + Result := TImage; +end; + +function TPyDelphiImage.GetDelphiObject: TImage; +begin + Result := TImage(inherited DelphiObject); +end; + +procedure TPyDelphiImage.SetDelphiObject(const Value: TImage); +begin + inherited DelphiObject := Value; +end; + initialization RegisteredUnits.Add(TShapesRegistration.Create); From 282ccd1ce770897d4ae96f44528bd424d5f71b83 Mon Sep 17 00:00:00 2001 From: Lucas Moura Belo Date: Mon, 21 Dec 2020 11:54:54 -0300 Subject: [PATCH 21/23] Adding TPaintBox wrapper --- Source/fmx/WrapFmxShapes.pas | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/Source/fmx/WrapFmxShapes.pas b/Source/fmx/WrapFmxShapes.pas index c4499963..6455ee34 100644 --- a/Source/fmx/WrapFmxShapes.pas +++ b/Source/fmx/WrapFmxShapes.pas @@ -137,6 +137,15 @@ TPyDelphiImage = class(TPyDelphiControl) property DelphiObject: TImage read GetDelphiObject write SetDelphiObject; end; + TPyDelphiPaintBox = class(TPyDelphiControl) + function GetDelphiObject: TPaintBox; + procedure SetDelphiObject(const Value: TPaintBox); + public + class function DelphiObjectClass : TClass; override; + // Properties + property DelphiObject: TPaintBox read GetDelphiObject write SetDelphiObject; + end; + implementation uses @@ -180,6 +189,8 @@ procedure TShapesRegistration.RegisterWrappers( APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiCustomPath); APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiPath); APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiText); + APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiImage); + APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiPaintBox); end; { TPyDelphiShape } @@ -421,6 +432,23 @@ procedure TPyDelphiImage.SetDelphiObject(const Value: TImage); inherited DelphiObject := Value; end; +{ TPyDelphiPaintBox } + +class function TPyDelphiPaintBox.DelphiObjectClass: TClass; +begin + Result := TPaintBox; +end; + +function TPyDelphiPaintBox.GetDelphiObject: TPaintBox; +begin + Result := TPaintBox(inherited DelphiObject); +end; + +procedure TPyDelphiPaintBox.SetDelphiObject(const Value: TPaintBox); +begin + inherited DelphiObject := Value; +end; + initialization RegisteredUnits.Add(TShapesRegistration.Create); From 4cc9c6504e79ab49eaaf09904e35631089161569 Mon Sep 17 00:00:00 2001 From: Lucas Moura Belo Date: Mon, 21 Dec 2020 11:56:14 -0300 Subject: [PATCH 22/23] Adding TSelection wrapper --- Source/fmx/WrapFmxShapes.pas | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/Source/fmx/WrapFmxShapes.pas b/Source/fmx/WrapFmxShapes.pas index 6455ee34..53d6aa67 100644 --- a/Source/fmx/WrapFmxShapes.pas +++ b/Source/fmx/WrapFmxShapes.pas @@ -146,6 +146,15 @@ TPyDelphiPaintBox = class(TPyDelphiControl) property DelphiObject: TPaintBox read GetDelphiObject write SetDelphiObject; end; + TPyDelphiSelection = class(TPyDelphiControl) + function GetDelphiObject: TSelection; + procedure SetDelphiObject(const Value: TSelection); + public + class function DelphiObjectClass : TClass; override; + // Properties + property DelphiObject: TSelection read GetDelphiObject write SetDelphiObject; + end; + implementation uses @@ -191,6 +200,7 @@ procedure TShapesRegistration.RegisterWrappers( APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiText); APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiImage); APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiPaintBox); + APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiSelection); end; { TPyDelphiShape } @@ -449,6 +459,23 @@ procedure TPyDelphiPaintBox.SetDelphiObject(const Value: TPaintBox); inherited DelphiObject := Value; end; +{ TPyDelphiSelection } + +class function TPyDelphiSelection.DelphiObjectClass: TClass; +begin + Result := TSelection; +end; + +function TPyDelphiSelection.GetDelphiObject: TSelection; +begin + Result := TSelection(inherited DelphiObject); +end; + +procedure TPyDelphiSelection.SetDelphiObject(const Value: TSelection); +begin + inherited DelphiObject := Value; +end; + initialization RegisteredUnits.Add(TShapesRegistration.Create); From 0a55dd4d706d3e46a2b05058b174af1d8aa891b9 Mon Sep 17 00:00:00 2001 From: Lucas Moura Belo Date: Mon, 21 Dec 2020 11:57:48 -0300 Subject: [PATCH 23/23] Adding TSelectionPoint wrapper --- Source/fmx/WrapFmxShapes.pas | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/Source/fmx/WrapFmxShapes.pas b/Source/fmx/WrapFmxShapes.pas index 53d6aa67..95daa234 100644 --- a/Source/fmx/WrapFmxShapes.pas +++ b/Source/fmx/WrapFmxShapes.pas @@ -155,6 +155,15 @@ TPyDelphiSelection = class(TPyDelphiControl) property DelphiObject: TSelection read GetDelphiObject write SetDelphiObject; end; + TPyDelphiSelectionPoint = class(TPyDelphiStyledControl) + function GetDelphiObject: TSelectionPoint; + procedure SetDelphiObject(const Value: TSelectionPoint); + public + class function DelphiObjectClass : TClass; override; + // Properties + property DelphiObject: TSelectionPoint read GetDelphiObject write SetDelphiObject; + end; + implementation uses @@ -201,6 +210,7 @@ procedure TShapesRegistration.RegisterWrappers( APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiImage); APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiPaintBox); APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiSelection); + APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiSelectionPoint); end; { TPyDelphiShape } @@ -476,6 +486,23 @@ procedure TPyDelphiSelection.SetDelphiObject(const Value: TSelection); inherited DelphiObject := Value; end; +{ TPyDelphiSelectionPoint } + +class function TPyDelphiSelectionPoint.DelphiObjectClass: TClass; +begin + Result := TSelectionPoint; +end; + +function TPyDelphiSelectionPoint.GetDelphiObject: TSelectionPoint; +begin + Result := TSelectionPoint(inherited DelphiObject); +end; + +procedure TPyDelphiSelectionPoint.SetDelphiObject(const Value: TSelectionPoint); +begin + inherited DelphiObject := Value; +end; + initialization RegisteredUnits.Add(TShapesRegistration.Create);