1
0
mirror of https://github.com/salvadordf/CEF4Delphi.git synced 2025-11-23 21:34:53 +02:00

Added touch support for Windows 8,8.1,10 to FMXExternalPumpBrowser

- Removed GestureBrowser demo
- Added TBufferPanel.OnWrongSize event
- Added TFMXBufferPanel.OnWrongSize event
- More touch support fixes in SimpleOSRBrowser and KioskOSRBrowser.
This commit is contained in:
Salvador Díaz Fau
2020-02-08 12:59:59 +01:00
parent 75258ea8e7
commit e8d2db5b57
19 changed files with 289 additions and 2005 deletions

View File

@@ -69,6 +69,7 @@ type
FColor : TAlphaColor;
FHighSpeedDrawing : boolean;
FOnDialogKey : TDialogKeyEvent;
FOnWrongSize : TNotifyEvent;
procedure CreateSyncObj;
@@ -147,6 +148,7 @@ type
property OnKeyUp;
property OnKeyDown;
property OnDialogKey : TDialogKeyEvent read FOnDialogKey write FOnDialogKey;
property OnWrongSize : TNotifyEvent read FOnWrongSize write FOnWrongSize;
end;
implementation
@@ -168,6 +170,7 @@ begin
FScanlineSize := 0;
FColor := claWhite;
FOnDialogKey := nil;
FOnWrongSize := nil;
FHighSpeedDrawing := True;
end;
@@ -277,8 +280,10 @@ function TFMXBufferPanel.CopyBuffer : boolean;
var
TempSrc, TempDst, TempClip : TRectF;
TempState : TCanvasSaveState;
TempWrongSize : boolean;
begin
Result := False;
Result := False;
TempWrongSize := False;
if Canvas.BeginScene then
try
@@ -298,6 +303,9 @@ begin
finally
Canvas.RestoreState(TempState);
end;
TempWrongSize := (abs(Width - TempDst.Width) > 1) or
(abs(Height - TempDst.Height) > 1);
end;
finally
EndBufferDraw;
@@ -305,6 +313,8 @@ begin
finally
Canvas.EndScene;
end;
if TempWrongSize and assigned(FOnWrongSize) then FOnWrongSize(self);
end;
procedure TFMXBufferPanel.DialogKey(var Key: Word; Shift: TShiftState);