mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2024-11-24 08:02:15 +02:00
Rename references in demos
This commit is contained in:
parent
eec00d7da7
commit
df326d4e06
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user