Skip to content
Prev Previous commit
Next Next commit
Including the TCustomViewAction wrapper
  • Loading branch information
lmbelo committed Mar 26, 2022
commit 2d7553794c36641054fd054a806d76a3cde336dd
28 changes: 28 additions & 0 deletions Source/fmx/WrapFmxActnList.pas
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,15 @@ TPyDelphiAction = class(TPyDelphiContainedAction)
property DelphiObject: TAction read GetDelphiObject write SetDelphiObject;
end;

TPyDelphiCustomViewAction = class(TPyDelphiCustomAction)
private
function GetDelphiObject: TCustomViewAction;
procedure SetDelphiObject(const Value: TCustomViewAction);
public
class function DelphiObjectClass: TClass; override;
property DelphiObject: TCustomViewAction read GetDelphiObject write SetDelphiObject;
end;

implementation

{ Register the wrappers, the globals and the constants }
Expand Down Expand Up @@ -79,6 +88,7 @@ procedure TActnListRegistration.RegisterWrappers(APyDelphiWrapper
APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiActionList);
APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiCustomAction);
APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiAction);
APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiCustomViewAction);
end;

{ TPyDelphiCustomActionList }
Expand Down Expand Up @@ -149,6 +159,24 @@ procedure TPyDelphiAction.SetDelphiObject(const Value: TAction);
inherited DelphiObject := Value;
end;

{ TPyDelphiCustomViewAction }

class function TPyDelphiCustomViewAction.DelphiObjectClass: TClass;
begin
Result := TCustomViewAction;
end;

function TPyDelphiCustomViewAction.GetDelphiObject: TCustomViewAction;
begin
Result := TCustomViewAction(inherited DelphiObject);
end;

procedure TPyDelphiCustomViewAction.SetDelphiObject(
const Value: TCustomViewAction);
begin
inherited DelphiObject := Value;
end;

initialization
RegisteredUnits.Add(TActnListRegistration.Create());

Expand Down