mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2024-11-24 08:02:15 +02:00
Fixed #246: FMX doesn't have a OnMove event
This commit is contained in:
parent
f96a7bc4f9
commit
cbca087674
@ -137,6 +137,7 @@ type
|
||||
procedure HandleSYSCHAR(const aMessage : TMsg);
|
||||
procedure HandleSYSKEYDOWN(const aMessage : TMsg);
|
||||
procedure HandleSYSKEYUP(const aMessage : TMsg);
|
||||
procedure SetBounds(ALeft: Integer; ATop: Integer; AWidth: Integer; AHeight: Integer); override;
|
||||
end;
|
||||
|
||||
var
|
||||
@ -791,6 +792,16 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TFMXExternalPumpBrowserFrm.SetBounds(ALeft, ATop, AWidth, AHeight: Integer);
|
||||
var
|
||||
PositionChanged: Boolean;
|
||||
begin
|
||||
PositionChanged := (ALeft <> Left) or (ATop <> Top);
|
||||
inherited SetBounds(ALeft, ATop, AWidth, AHeight);
|
||||
if PositionChanged then
|
||||
NotifyMoveOrResizeStarted;
|
||||
end;
|
||||
|
||||
procedure TFMXExternalPumpBrowserFrm.NotifyMoveOrResizeStarted;
|
||||
begin
|
||||
if (chrmosr <> nil) then chrmosr.NotifyMoveOrResizeStarted;
|
||||
@ -934,4 +945,5 @@ begin
|
||||
chrmosr.SendFocusEvent(False);
|
||||
end;
|
||||
|
||||
|
||||
end.
|
||||
|
@ -79,6 +79,7 @@ type
|
||||
procedure NotifyMoveOrResizeStarted;
|
||||
procedure DoDestroyParent;
|
||||
procedure SendCloseMsg;
|
||||
procedure SetBounds(ALeft: Integer; ATop: Integer; AWidth: Integer; AHeight: Integer); override;
|
||||
|
||||
property Closing : boolean read FClosing;
|
||||
property Homepage : string read FHomepage write FHomepage;
|
||||
@ -227,6 +228,16 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TChildForm.SetBounds(ALeft, ATop, AWidth, AHeight: Integer);
|
||||
var
|
||||
PositionChanged: Boolean;
|
||||
begin
|
||||
PositionChanged := (ALeft <> Left) or (ATop <> Top);
|
||||
inherited SetBounds(ALeft, ATop, AWidth, AHeight);
|
||||
if PositionChanged then
|
||||
NotifyMoveOrResizeStarted;
|
||||
end;
|
||||
|
||||
procedure TChildForm.NotifyMoveOrResizeStarted;
|
||||
begin
|
||||
// This is needed to display some HTML elements correctly
|
||||
|
@ -105,6 +105,7 @@ type
|
||||
procedure DoBrowserCreated;
|
||||
procedure DoDestroyParent;
|
||||
procedure NotifyMoveOrResizeStarted;
|
||||
procedure SetBounds(ALeft: Integer; ATop: Integer; AWidth: Integer; AHeight: Integer); override;
|
||||
end;
|
||||
|
||||
var
|
||||
@ -318,6 +319,16 @@ begin
|
||||
LoadURL;
|
||||
end;
|
||||
|
||||
procedure TSimpleFMXBrowserFrm.SetBounds(ALeft, ATop, AWidth, AHeight: Integer);
|
||||
var
|
||||
PositionChanged: Boolean;
|
||||
begin
|
||||
PositionChanged := (ALeft <> Left) or (ATop <> Top);
|
||||
inherited SetBounds(ALeft, ATop, AWidth, AHeight);
|
||||
if PositionChanged then
|
||||
NotifyMoveOrResizeStarted;
|
||||
end;
|
||||
|
||||
procedure TSimpleFMXBrowserFrm.NotifyMoveOrResizeStarted;
|
||||
begin
|
||||
if (FMXChromium1 <> nil) then FMXChromium1.NotifyMoveOrResizeStarted;
|
||||
|
Loading…
Reference in New Issue
Block a user