Skip to content

Commit 2475976

Browse files
committed
Giving access to the Inflate method of the StyledControl
1 parent e3dd31c commit 2475976

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

Source/fmx/WrapFmxControls.pas

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ TPyDelphiStyledControl = class(TPyDelphiControl)
7575
// Exposed Methods
7676
function ApplyStyleLookup_Wrapper(args : PPyObject) : PPyObject; cdecl;
7777
function NeedStyleLookup_Wrapper(args : PPyObject) : PPyObject; cdecl;
78+
function Inflate_Wrapper(args : PPyObject) : PPyObject; cdecl;
7879
// Property Getters
7980
function Get_DefaultStyleLookupName(AContext: Pointer): PPyObject; cdecl;
8081
function Get_StyleLookup(AContext: Pointer): PPyObject; cdecl;
@@ -494,6 +495,18 @@ function TPyDelphiStyledControl.Get_StyleLookup(AContext: Pointer): PPyObject;
494495
Result := GetPythonEngine.PyUnicodeFromString(DelphiObject.StyleLookup);
495496
end;
496497

498+
function TPyDelphiStyledControl.Inflate_Wrapper(args: PPyObject): PPyObject;
499+
begin
500+
Adjust(@Self);
501+
with GetPythonEngine do begin
502+
if PyArg_ParseTuple( args, ':Inflate') <> 0 then begin
503+
DelphiObject.Inflate;
504+
Result := ReturnNone;
505+
end else
506+
Result := nil;
507+
end;
508+
end;
509+
497510
function TPyDelphiStyledControl.NeedStyleLookup_Wrapper(
498511
args: PPyObject): PPyObject;
499512
begin
@@ -529,6 +542,9 @@ class procedure TPyDelphiStyledControl.RegisterMethods(PythonType: TPythonType);
529542
PythonType.AddMethod('NeedStyleLookup', @TPyDelphiStyledControl.NeedStyleLookup_Wrapper,
530543
'TStyledControl.NeedStyleLookup()'#10 +
531544
'Call this procedure to indicate that this control requires to get and apply its style lookup.');
545+
PythonType.AddMethod('Inflate', @TPyDelphiStyledControl.Inflate_Wrapper,
546+
'TStyledControl.Inflate()'#10 +
547+
'Call this procedure to get and apply its style lookup.');
532548
end;
533549

534550
procedure TPyDelphiStyledControl.SetDelphiObject(const Value: TStyledControl);

0 commit comments

Comments
 (0)