mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2025-06-02 21:57:37 +02:00
clearer comments, fixed uses clause and minor change in Chromium_OnAddressChange
This commit is contained in:
parent
cc7de98947
commit
9656a1323f
@ -44,13 +44,12 @@ interface
|
|||||||
uses
|
uses
|
||||||
{$IFDEF DELPHI16_UP}
|
{$IFDEF DELPHI16_UP}
|
||||||
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
|
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
|
||||||
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.ComCtrls, Vcl.Buttons, Vcl.ExtCtrls,
|
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.ComCtrls, Vcl.Buttons, Vcl.ExtCtrls, Vcl.StdCtrls,
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
Windows, Messages, SysUtils, Variants, Classes, Graphics,
|
Windows, Messages, SysUtils, Variants, Classes, Graphics,
|
||||||
Controls, Forms, Dialogs, ComCtrls, Buttons, ExtCtrls,
|
Controls, Forms, Dialogs, ComCtrls, Buttons, ExtCtrls, StdCtrls,
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
uCEFChromium, uCEFWindowParent, uCEFInterfaces, uCEFApplication, uCEFTypes, uCEFConstants,
|
uCEFChromium, uCEFWindowParent, uCEFInterfaces, uCEFApplication, uCEFTypes, uCEFConstants;
|
||||||
Vcl.StdCtrls;
|
|
||||||
|
|
||||||
const
|
const
|
||||||
CEFBROWSER_DESTROYWNDPARENT = WM_APP + $100;
|
CEFBROWSER_DESTROYWNDPARENT = WM_APP + $100;
|
||||||
@ -121,9 +120,9 @@ implementation
|
|||||||
// PageIndex of the Tab where they are included in the Message.lParam parameter if necessary.
|
// PageIndex of the Tab where they are included in the Message.lParam parameter if necessary.
|
||||||
|
|
||||||
// For simplicity the Button panel and the PageControl are disabled while adding or removing tab sheets.
|
// For simplicity the Button panel and the PageControl are disabled while adding or removing tab sheets.
|
||||||
// The Form can't be closed if it's desrtoying a tab.
|
// The Form can't be closed if it's destroying a tab.
|
||||||
|
|
||||||
// In case of closing a tab sheet, the destruction sequence is this :
|
// This is the destruction sequence when you remove a tab sheet:
|
||||||
// 1. RemoveTabBtnClick calls TChromium.CloseBrowser of the selected tab which triggers a TChromium.OnClose event.
|
// 1. RemoveTabBtnClick calls TChromium.CloseBrowser of the selected tab which triggers a TChromium.OnClose event.
|
||||||
// 2. TChromium.OnClose sends a CEFBROWSER_DESTROYWNDPARENT message to destroy TCEFWindowParent in the main thread which triggers a TChromium.OnBeforeClose event.
|
// 2. TChromium.OnClose sends a CEFBROWSER_DESTROYWNDPARENT message to destroy TCEFWindowParent in the main thread which triggers a TChromium.OnBeforeClose event.
|
||||||
// 3. TChromium.OnBeforeClose sends a CEFBROWSER_DESTROYTAB message to destroy the tab in the main thread.
|
// 3. TChromium.OnBeforeClose sends a CEFBROWSER_DESTROYTAB message to destroy the tab in the main thread.
|
||||||
@ -261,7 +260,7 @@ var
|
|||||||
begin
|
begin
|
||||||
if (PageControl1.TabIndex >= 0) and
|
if (PageControl1.TabIndex >= 0) and
|
||||||
GetPageIndex(Sender, TempPageIndex) and
|
GetPageIndex(Sender, TempPageIndex) and
|
||||||
(PageControl1.Pages[PageControl1.TabIndex].PageIndex = TempPageIndex) then
|
(PageControl1.TabIndex = TempPageIndex) then
|
||||||
URLCbx.Text := url;
|
URLCbx.Text := url;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user