From df326d4e06d610922983578b1b138930fccfc405 Mon Sep 17 00:00:00 2001 From: martin Date: Sat, 20 Mar 2021 21:10:53 +0100 Subject: [PATCH] Rename references in demos --- .../BrowserWindow/uBrowserWindow.lfm | 6 +-- .../BrowserWindow/uBrowserWindow.pas | 20 ++++----- .../BrowserWindowDom/uBrowserWindowDom.lfm | 4 +- .../BrowserWindowDom/uBrowserWindowDom.pas | 24 +++++----- .../BrowserWindowOsrDom/uBrowserWindowDom.lfm | 6 +-- .../BrowserWindowOsrDom/uBrowserWindowDom.pas | 44 +++++++++---------- 6 files changed, 52 insertions(+), 52 deletions(-) diff --git a/demos/Lazarus_any_OS/BrowserWindow/uBrowserWindow.lfm b/demos/Lazarus_any_OS/BrowserWindow/uBrowserWindow.lfm index 008e5751..58de7219 100644 --- a/demos/Lazarus_any_OS/BrowserWindow/uBrowserWindow.lfm +++ b/demos/Lazarus_any_OS/BrowserWindow/uBrowserWindow.lfm @@ -61,14 +61,14 @@ object Form1: TForm1 Text = 'https://www.google.com' end end - object LazarusBrowserWindow1: TLazarusBrowserWindow + object BrowserWindow1: TBrowserWindow Left = 0 Height = 566 Top = 23 Width = 967 Align = alClient TabOrder = 1 - OnBrowserCreated = LazarusBrowserWindow1BrowserCreated - OnBrowserClosed = LazarusBrowserWindow1BrowserClosed + OnBrowserCreated = BrowserWindow1BrowserCreated + OnBrowserClosed = BrowserWindow1BrowserClosed end end diff --git a/demos/Lazarus_any_OS/BrowserWindow/uBrowserWindow.pas b/demos/Lazarus_any_OS/BrowserWindow/uBrowserWindow.pas index 64411ba4..6937efe6 100644 --- a/demos/Lazarus_any_OS/BrowserWindow/uBrowserWindow.pas +++ b/demos/Lazarus_any_OS/BrowserWindow/uBrowserWindow.pas @@ -48,7 +48,7 @@ uses SysUtils, Messages, Forms, Controls, Dialogs, ExtCtrls, StdCtrls, LMessages, uCEFTypes, uCEFInterfaces, - uCEFWorkScheduler, uCEFBrowserWindow, Classes; + uCEFWorkScheduler, uCEFBrowserWindow; type @@ -58,7 +58,7 @@ type AddressEdt: TComboBox; GoBtn: TButton; AddressPnl: TPanel; - LazarusBrowserWindow1: TBrowserWindow; + BrowserWindow1: TBrowserWindow; procedure Chromium1BeforePopup(Sender: TObject; const browser: ICefBrowser; const frame: ICefFrame; const targetUrl, targetFrameName: ustring; targetDisposition: TCefWindowOpenDisposition; userGesture: Boolean; const popupFeatures: TCefPopupFeatures; var windowInfo: TCefWindowInfo; var client: ICefClient; var settings: TCefBrowserSettings; var extra_info: ICefDictionaryValue; var noJavascriptAccess: Boolean; var Result: Boolean); procedure Chromium1OpenUrlFromTab(Sender: TObject; const browser: ICefBrowser; const frame: ICefFrame; const targetUrl: ustring; targetDisposition: TCefWindowOpenDisposition; userGesture: Boolean; out Result: Boolean); @@ -66,8 +66,8 @@ type procedure FormCreate(Sender: TObject); procedure GoBtnClick(Sender: TObject); - procedure LazarusBrowserWindow1BrowserClosed(Sender: TObject); - procedure LazarusBrowserWindow1BrowserCreated(Sender: TObject); + procedure BrowserWindow1BrowserClosed(Sender: TObject); + procedure BrowserWindow1BrowserCreated(Sender: TObject); protected {$IFDEF WINDOWS} @@ -117,15 +117,15 @@ uses procedure TForm1.GoBtnClick(Sender: TObject); begin - LazarusBrowserWindow1.LoadURL(UTF8Decode(AddressEdt.Text)); + BrowserWindow1.LoadURL(UTF8Decode(AddressEdt.Text)); end; -procedure TForm1.LazarusBrowserWindow1BrowserClosed(Sender: TObject); +procedure TForm1.BrowserWindow1BrowserClosed(Sender: TObject); begin Close; end; -procedure TForm1.LazarusBrowserWindow1BrowserCreated(Sender: TObject); +procedure TForm1.BrowserWindow1BrowserCreated(Sender: TObject); begin Caption := 'BrowserWindow'; end; @@ -169,14 +169,14 @@ end; procedure TForm1.FormCloseQuery(Sender: TObject; var CanClose: Boolean); begin - LazarusBrowserWindow1.CloseBrowser(True); + BrowserWindow1.CloseBrowser(True); - CanClose := LazarusBrowserWindow1.IsClosed; + CanClose := BrowserWindow1.IsClosed; end; procedure TForm1.FormCreate(Sender: TObject); begin - LazarusBrowserWindow1.LoadURL(UTF8Decode(AddressEdt.Text)); + BrowserWindow1.LoadURL(UTF8Decode(AddressEdt.Text)); end; initialization diff --git a/demos/Lazarus_any_OS/BrowserWindowDom/uBrowserWindowDom.lfm b/demos/Lazarus_any_OS/BrowserWindowDom/uBrowserWindowDom.lfm index c3acec0b..e1ed0e91 100644 --- a/demos/Lazarus_any_OS/BrowserWindowDom/uBrowserWindowDom.lfm +++ b/demos/Lazarus_any_OS/BrowserWindowDom/uBrowserWindowDom.lfm @@ -61,13 +61,13 @@ object Form1: TForm1 Text = 'https://www.google.com' end end - object LazarusBrowserWindow1: TBrowserWindow + object BrowserWindow1: TBrowserWindow Left = 0 Height = 566 Top = 23 Width = 967 Align = alClient TabOrder = 1 - OnBrowserClosed = LazarusBrowserWindow1BrowserClosed + OnBrowserClosed = BrowserWindow1BrowserClosed end end diff --git a/demos/Lazarus_any_OS/BrowserWindowDom/uBrowserWindowDom.pas b/demos/Lazarus_any_OS/BrowserWindowDom/uBrowserWindowDom.pas index e6292bf5..337132f8 100644 --- a/demos/Lazarus_any_OS/BrowserWindowDom/uBrowserWindowDom.pas +++ b/demos/Lazarus_any_OS/BrowserWindowDom/uBrowserWindowDom.pas @@ -58,7 +58,7 @@ type AddressEdt: TComboBox; GoBtn: TButton; AddressPnl: TPanel; - LazarusBrowserWindow1: TBrowserWindow; + BrowserWindow1: TBrowserWindow; mDomHere: TMenuItem; procedure Chromium1BeforePopup(Sender: TObject; const browser: ICefBrowser; const frame: ICefFrame; const targetUrl, targetFrameName: ustring; targetDisposition: TCefWindowOpenDisposition; userGesture: Boolean; const popupFeatures: TCefPopupFeatures; var windowInfo: TCefWindowInfo; var client: ICefClient; var settings: TCefBrowserSettings; var extra_info: ICefDictionaryValue; var noJavascriptAccess: Boolean; var Result: Boolean); @@ -67,7 +67,7 @@ type procedure FormCreate(Sender: TObject); procedure GoBtnClick(Sender: TObject); - procedure LazarusBrowserWindow1BrowserClosed(Sender: TObject); + procedure BrowserWindow1BrowserClosed(Sender: TObject); private FContextXY: TPoint; @@ -130,10 +130,10 @@ uses procedure TForm1.GoBtnClick(Sender: TObject); begin - LazarusBrowserWindow1.LoadURL(UTF8Decode(AddressEdt.Text)); + BrowserWindow1.LoadURL(UTF8Decode(AddressEdt.Text)); end; -procedure TForm1.LazarusBrowserWindow1BrowserClosed(Sender: TObject); +procedure TForm1.BrowserWindow1BrowserClosed(Sender: TObject); begin Close; end; @@ -149,7 +149,7 @@ end; procedure TForm1.DoCaptureMenuXY; begin - FContextXY := LazarusBrowserWindow1.ScreenToClient(Mouse.CursorPos); + FContextXY := BrowserWindow1.ScreenToClient(Mouse.CursorPos); end; procedure TForm1.DoContextMenuCmd(Sender: TObject; const browser: ICefBrowser; @@ -163,7 +163,7 @@ begin TempMsg := TCefProcessMessageRef.New(MSG_REQUEST_DOM); // Same name than TCefCustomRenderProcessHandler.MessageName TempMsg.ArgumentList.SetInt(0, FContextXY.X); TempMsg.ArgumentList.SetInt(1, FContextXY.Y); - LazarusBrowserWindow1.Chromium.SendProcessMessage(PID_RENDERER, TempMsg); + BrowserWindow1.Chromium.SendProcessMessage(PID_RENDERER, TempMsg); end; end; @@ -220,18 +220,18 @@ end; procedure TForm1.FormCloseQuery(Sender: TObject; var CanClose: Boolean); begin - LazarusBrowserWindow1.CloseBrowser(True); + BrowserWindow1.CloseBrowser(True); - CanClose := LazarusBrowserWindow1.IsClosed; + CanClose := BrowserWindow1.IsClosed; end; procedure TForm1.FormCreate(Sender: TObject); begin - LazarusBrowserWindow1.Chromium.OnBeforeContextMenu := @DoBeforeContextMenu; - LazarusBrowserWindow1.Chromium.OnContextMenuCommand := @DoContextMenuCmd; - LazarusBrowserWindow1.Chromium.OnProcessMessageReceived := @DoProcessMessageReceived; + BrowserWindow1.Chromium.OnBeforeContextMenu := @DoBeforeContextMenu; + BrowserWindow1.Chromium.OnContextMenuCommand := @DoContextMenuCmd; + BrowserWindow1.Chromium.OnProcessMessageReceived := @DoProcessMessageReceived; - LazarusBrowserWindow1.LoadURL(UTF8Decode(AddressEdt.Text)); + BrowserWindow1.LoadURL(UTF8Decode(AddressEdt.Text)); end; initialization diff --git a/demos/Lazarus_any_OS/BrowserWindowOsrDom/uBrowserWindowDom.lfm b/demos/Lazarus_any_OS/BrowserWindowOsrDom/uBrowserWindowDom.lfm index 0dc868b3..d85839d2 100644 --- a/demos/Lazarus_any_OS/BrowserWindowOsrDom/uBrowserWindowDom.lfm +++ b/demos/Lazarus_any_OS/BrowserWindowOsrDom/uBrowserWindowDom.lfm @@ -61,7 +61,7 @@ object Form1: TForm1 Text = 'https://www.google.com' end end - object LazarusOsrBrowserWindow1: TLazarusOsrBrowserWindow + object OsrBrowserWindow1: TOsrBrowserWindow Left = 0 Height = 566 Top = 23 @@ -69,8 +69,8 @@ object Form1: TForm1 CopyOriginalBuffer = True Align = alClient TabOrder = 1 - OnMouseMove = LazarusOsrBrowserWindow1MouseMove - OnBrowserClosed = LazarusBrowserWindow1BrowserClosed + OnMouseMove = OsrBrowserWindow1MouseMove + OnBrowserClosed = OsrBrowserWindow1BrowserClosed end object PopupMenu1: TPopupMenu left = 418 diff --git a/demos/Lazarus_any_OS/BrowserWindowOsrDom/uBrowserWindowDom.pas b/demos/Lazarus_any_OS/BrowserWindowOsrDom/uBrowserWindowDom.pas index a14264db..871a79ae 100644 --- a/demos/Lazarus_any_OS/BrowserWindowOsrDom/uBrowserWindowDom.pas +++ b/demos/Lazarus_any_OS/BrowserWindowOsrDom/uBrowserWindowDom.pas @@ -58,7 +58,7 @@ type AddressEdt: TComboBox; GoBtn: TButton; AddressPnl: TPanel; - LazarusOsrBrowserWindow1: TOsrBrowserWindow; + OsrBrowserWindow1: TOsrBrowserWindow; mDomHere: TMenuItem; MenuItem1: TMenuItem; PopupMenu1: TPopupMenu; @@ -69,8 +69,8 @@ type procedure FormCreate(Sender: TObject); procedure GoBtnClick(Sender: TObject); - procedure LazarusBrowserWindow1BrowserClosed(Sender: TObject); - procedure LazarusOsrBrowserWindow1MouseMove(Sender: TObject; + procedure OsrBrowserWindow1BrowserClosed(Sender: TObject); + procedure OsrBrowserWindow1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); private FCurRect: TRect; @@ -109,15 +109,15 @@ uses procedure TForm1.GoBtnClick(Sender: TObject); begin - LazarusOsrBrowserWindow1.Chromium.LoadURL(UTF8Decode(AddressEdt.Text)); + OsrBrowserWindow1.Chromium.LoadURL(UTF8Decode(AddressEdt.Text)); end; -procedure TForm1.LazarusBrowserWindow1BrowserClosed(Sender: TObject); +procedure TForm1.OsrBrowserWindow1BrowserClosed(Sender: TObject); begin Close; end; -procedure TForm1.LazarusOsrBrowserWindow1MouseMove(Sender: TObject; +procedure TForm1.OsrBrowserWindow1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); var TempMsg : ICefProcessMessage; @@ -125,7 +125,7 @@ begin TempMsg := TCefProcessMessageRef.New(MSG_REQUEST_DOM_R); // Same name than TCefCustomRenderProcessHandler.MessageName TempMsg.ArgumentList.SetInt(0, X); TempMsg.ArgumentList.SetInt(1, Y); - LazarusOsrBrowserWindow1.Chromium.SendProcessMessage(PID_RENDERER, TempMsg); + OsrBrowserWindow1.Chromium.SendProcessMessage(PID_RENDERER, TempMsg); end; procedure TForm1.DoOnMouseDown(Sender: TObject; Button: TMouseButton; @@ -147,10 +147,10 @@ end; procedure TForm1.DoOnPaint(Sender: TObject); begin if (FCurRect.Width > 0) and (FCurRect.Height > 0) then begin - LazarusOsrBrowserWindow1.Canvas.Brush.Style := bsClear; - LazarusOsrBrowserWindow1.Canvas.Pen.Style := psSolid; - LazarusOsrBrowserWindow1.Canvas.Pen.Color := clRed; - LazarusOsrBrowserWindow1.Canvas.Rectangle(FCurRect); + OsrBrowserWindow1.Canvas.Brush.Style := bsClear; + OsrBrowserWindow1.Canvas.Pen.Style := psSolid; + OsrBrowserWindow1.Canvas.Pen.Color := clRed; + OsrBrowserWindow1.Canvas.Rectangle(FCurRect); end; end; @@ -167,7 +167,7 @@ begin FCurRect.Width := message.ArgumentList.GetInt(2); FCurRect.Height := message.ArgumentList.GetInt(3); Result := True; - LazarusOsrBrowserWindow1.Invalidate; + OsrBrowserWindow1.Invalidate; end; end; end; @@ -194,10 +194,10 @@ begin if (GlobalCEFApp <> nil) then GlobalCEFApp.UpdateDeviceScaleFactor; - if (LazarusOsrBrowserWindow1.Chromium <> nil) then + if (OsrBrowserWindow1.Chromium <> nil) then begin - LazarusOsrBrowserWindow1.Chromium.NotifyScreenInfoChanged; - LazarusOsrBrowserWindow1.Chromium.WasResized; + OsrBrowserWindow1.Chromium.NotifyScreenInfoChanged; + OsrBrowserWindow1.Chromium.WasResized; end; end; @@ -226,20 +226,20 @@ end; procedure TForm1.FormCloseQuery(Sender: TObject; var CanClose: Boolean); begin - LazarusOsrBrowserWindow1.CloseBrowser(True); + OsrBrowserWindow1.CloseBrowser(True); - CanClose := LazarusOsrBrowserWindow1.IsClosed; + CanClose := OsrBrowserWindow1.IsClosed; end; procedure TForm1.FormCreate(Sender: TObject); begin FCurRect.Width := 0; - LazarusOsrBrowserWindow1.Chromium.OnProcessMessageReceived := @DoProcessMessageReceived; - LazarusOsrBrowserWindow1.OnMouseDown := @DoOnMouseDown; - LazarusOsrBrowserWindow1.OnMouseUp := @DoOnMouseUp; - LazarusOsrBrowserWindow1.OnPaint := @DoOnPaint; + OsrBrowserWindow1.Chromium.OnProcessMessageReceived := @DoProcessMessageReceived; + OsrBrowserWindow1.OnMouseDown := @DoOnMouseDown; + OsrBrowserWindow1.OnMouseUp := @DoOnMouseUp; + OsrBrowserWindow1.OnPaint := @DoOnPaint; - LazarusOsrBrowserWindow1.Chromium.LoadURL(UTF8Decode(AddressEdt.Text)); + OsrBrowserWindow1.Chromium.LoadURL(UTF8Decode(AddressEdt.Text)); end; initialization