1
0
mirror of https://github.com/salvadordf/CEF4Delphi.git synced 2025-06-12 22:07:39 +02:00

Added keyboard shortcut to show/hide the developer tools

This commit is contained in:
Salvador Diaz Fau
2017-05-20 19:20:38 +02:00
parent f803df15e7
commit db58c92e61
5 changed files with 227 additions and 122 deletions

View File

@ -1,36 +1,36 @@
[Closed Files] [Closed Files]
File_0=TSourceModule,'c:\program files\embarcadero\studio\17.0\SOURCE\VCL\Vcl.Controls.pas',0,1,9646,1,9668,0,0,, File_0=TSourceModule,'c:\program files\embarcadero\studio\17.0\source\rtl\win\Winapi.Windows.pas',0,1,22517,1,22546,0,0,,
File_1=TSourceModule,'c:\program files\embarcadero\studio\17.0\SOURCE\VCL\Vcl.ComCtrls.pas',0,1,7510,1,7532,0,0,{{17105,0} File_1=TSourceModule,'c:\program files\embarcadero\studio\17.0\SOURCE\VCL\Vcl.Forms.pas',0,1,4931,72,4962,0,0,{{1729,4}
File_2=TSourceModule,'c:\program files\embarcadero\studio\17.0\SOURCE\RTL\SYS\System.SysUtils.pas',0,1,24591,1,24613,0,0,, File_2=TSourceModule,'c:\program files\embarcadero\studio\17.0\SOURCE\VCL\Vcl.Controls.pas',0,1,9646,1,9668,0,0,,
File_3=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFApplication.pas',0,1,226,40,238,0,0,, File_3=TSourceModule,'c:\program files\embarcadero\studio\17.0\SOURCE\VCL\Vcl.ComCtrls.pas',0,1,7510,1,7532,0,0,{{17105,0}
File_4=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFMiscFunctions.pas',0,1,447,3,472,0,0,, File_4=TSourceModule,'c:\program files\embarcadero\studio\17.0\SOURCE\RTL\SYS\System.SysUtils.pas',0,1,24591,1,24613,0,0,,
File_5=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MiniBrowser\uHelloScheme.pas',0,1,90,77,136,0,0,, File_5=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFApplication.pas',0,1,226,40,238,0,0,,
File_6=TSourceModule,'c:\program files\embarcadero\studio\17.0\SOURCE\RTL\SYS\System.pas',0,1,29880,1,29902,0,0,, File_6=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFMiscFunctions.pas',0,1,447,3,472,0,0,,
File_7=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFConstants.pas',0,1,169,1,38,0,0,, File_7=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MiniBrowser\uHelloScheme.pas',0,1,90,77,136,0,0,,
File_8=TSourceModule,'c:\program files\embarcadero\studio\17.0\source\rtl\common\System.Classes.pas',0,1,7968,76,8018,0,0,, File_8=TSourceModule,'c:\program files\embarcadero\studio\17.0\SOURCE\RTL\SYS\System.pas',0,1,29880,1,29902,0,0,,
File_9=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFSchemeHandlerFactory.pas',0,1,51,89,90,0,0,, File_9=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFConstants.pas',0,1,169,1,38,0,0,,
[Modules] [Modules]
Module0=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MiniBrowser\MiniBrowser.dproj Module0=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MiniBrowser\uMiniBrowser.pas
Module1=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MiniBrowser\uMiniBrowser.pas Module1=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MiniBrowser\MiniBrowser.dproj
Module2=default.htm Module2=default.htm
Count=3 Count=3
EditWindowCount=1 EditWindowCount=1
[C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MiniBrowser\MiniBrowser.dproj]
ModuleType=TBaseProject
[C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MiniBrowser\uMiniBrowser.pas] [C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MiniBrowser\uMiniBrowser.pas]
ModuleType=TSourceModule ModuleType=TSourceModule
FormState=1 FormState=1
FormOnTop=0 FormOnTop=1
[C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MiniBrowser\MiniBrowser.dproj]
ModuleType=TBaseProject
[default.htm] [default.htm]
ModuleType=TURLModule ModuleType=TURLModule
[EditWindow0] [EditWindow0]
ViewCount=3 ViewCount=3
CurrentEditView=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MiniBrowser\MiniBrowser.dpr CurrentEditView=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MiniBrowser\uMiniBrowser.pas
View0=0 View0=0
View1=1 View1=1
View2=2 View2=2
@ -50,18 +50,18 @@ ClientHeight=9428
DockedToMainForm=1 DockedToMainForm=1
BorlandEditorCodeExplorer=BorlandEditorCodeExplorer@EditWindow0 BorlandEditorCodeExplorer=BorlandEditorCodeExplorer@EditWindow0
TopPanelSize=0 TopPanelSize=0
LeftPanelSize=0 LeftPanelSize=1898
LeftPanelClients=PropertyInspector,DockSite3
LeftPanelData=00000800010100000000AA19000000000000016A0700000000000001000000005D0E000009000000446F636B53697465330100000000A12300001100000050726F7065727479496E73706563746F72FFFFFFFF
RightPanelSize=2000 RightPanelSize=2000
RightPanelClients=DockSite2 RightPanelClients=DockSite2,DockSite4
RightPanelData=00000800010100000000E41200000000000001D00700000000000001000000003A1A000009000000446F636B5369746532FFFFFFFF RightPanelData=00000800010100000000AA1900000000000001D00700000000000001000000004312000009000000446F636B53697465320100000000A123000009000000446F636B5369746534FFFFFFFF
BottomPanelSize=2343 BottomPanelSize=0
BottomPanelClients=DockSite1,MessageView BottomPanelClients=DockSite1,MessageView
BottomPanelData=0000080001020100000009000000446F636B53697465313B3600000000000002270900000000000001000000003B3600000F0000004D65737361676556696577466F726DFFFFFFFF BottomPanelData=0000080001020200000009000000446F636B53697465310F0000004D65737361676556696577466F726D1234000000000000022506000000000000FFFFFFFF
BottomMiddlePanelSize=0 BottomMiddlePanelSize=0
BottomMiddlePanelClients=DockSite0,GraphDrawingModel BottomMiddlePanelClients=DockSite0,GraphDrawingModel
BottomMiddelPanelData=0000080001020200000009000000446F636B536974653010000000477261706844726177696E67566965779D1D00000000000002F306000000000000FFFFFFFF BottomMiddelPanelData=0000080001020200000009000000446F636B536974653010000000477261706844726177696E67566965779D1D00000000000002F306000000000000FFFFFFFF
TabDockLeftClients=PropertyInspector=0,DockSite3=1
TabDockRightClients=DockSite4=0
[View0] [View0]
CustomEditViewType=TWelcomePageView CustomEditViewType=TWelcomePageView
@ -70,9 +70,9 @@ WelcomePageURL=bds:/default.htm
[View1] [View1]
CustomEditViewType=TEditView CustomEditViewType=TEditView
Module=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MiniBrowser\MiniBrowser.dpr Module=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MiniBrowser\MiniBrowser.dpr
CursorX=56 CursorX=59
CursorY=128 CursorY=140
TopLine=104 TopLine=80
LeftCol=1 LeftCol=1
Elisions= Elisions=
Bookmarks= Bookmarks=
@ -81,13 +81,13 @@ EditViewName=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\d
[View2] [View2]
CustomEditViewType=TEditView CustomEditViewType=TEditView
Module=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MiniBrowser\uMiniBrowser.pas Module=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MiniBrowser\uMiniBrowser.pas
CursorX=88 CursorX=92
CursorY=206 CursorY=53
TopLine=173 TopLine=28
LeftCol=1 LeftCol=1
Elisions= Elisions=
Bookmarks={1,322,7}{2,200,1} Bookmarks={1,361,40}{2,212,1}{3,185,76}
EditViewName=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MiniBrowser\uMiniBrowser.pas EditViewName=Borland.FormDesignerView
[Watches] [Watches]
Count=0 Count=0
@ -103,11 +103,11 @@ State=0
Left=0 Left=0
Top=0 Top=0
Width=3820 Width=3820
Height=1861 Height=1121
MaxLeft=-1 MaxLeft=-1
MaxTop=-1 MaxTop=-1
ClientWidth=3820 ClientWidth=3820
ClientHeight=1861 ClientHeight=1121
TBDockHeight=213 TBDockHeight=213
LRDockWidth=13602 LRDockWidth=13602
Dockable=1 Dockable=1
@ -151,11 +151,11 @@ State=0
Left=0 Left=0
Top=0 Top=0
Width=2000 Width=2000
Height=6379 Height=4226
MaxLeft=-1 MaxLeft=-1
MaxTop=-1 MaxTop=-1
ClientWidth=2000 ClientWidth=2000
ClientHeight=6379 ClientHeight=4226
TBDockHeight=5897 TBDockHeight=5897
LRDockWidth=2352 LRDockWidth=2352
Dockable=1 Dockable=1
@ -164,18 +164,18 @@ StayOnTop=0
[MessageView] [MessageView]
PercentageSizes=1 PercentageSizes=1
Create=1 Create=1
Visible=1 Visible=0
Docked=1 Docked=1
State=0 State=0
Left=0 Left=0
Top=23 Top=0
Width=10000 Width=2773
Height=2164 Height=1424
MaxLeft=-1 MaxLeft=-1
MaxTop=-1 MaxTop=-1
ClientWidth=10000 ClientWidth=2773
ClientHeight=2164 ClientHeight=1424
TBDockHeight=2164 TBDockHeight=1424
LRDockWidth=2773 LRDockWidth=2773
Dockable=1 Dockable=1
StayOnTop=0 StayOnTop=0
@ -188,12 +188,12 @@ Docked=1
State=0 State=0
Left=0 Left=0
Top=0 Top=0
Width=1875 Width=2000
Height=6738 Height=4339
MaxLeft=-1 MaxLeft=-1
MaxTop=-1 MaxTop=-1
ClientWidth=1875 ClientWidth=2000
ClientHeight=6738 ClientHeight=4339
TBDockHeight=7152 TBDockHeight=7152
LRDockWidth=2000 LRDockWidth=2000
Dockable=1 Dockable=1
@ -243,8 +243,8 @@ Create=1
Visible=0 Visible=0
Docked=1 Docked=1
State=0 State=0
Left=-8 Left=-121
Top=-30 Top=-74
Width=1844 Width=1844
Height=3139 Height=3139
MaxLeft=-1 MaxLeft=-1
@ -297,22 +297,27 @@ StayOnTop=0
[PropertyInspector] [PropertyInspector]
PercentageSizes=1 PercentageSizes=1
Create=1 Create=1
Visible=0 Visible=1
Docked=1 Docked=1
State=0 State=0
Left=78 Left=0
Top=386 Top=362
Width=1898 Width=1898
Height=7164 Height=5370
MaxLeft=-1 MaxLeft=-1
MaxTop=-1 MaxTop=-1
ClientWidth=1773 ClientWidth=1898
ClientHeight=6738 ClientHeight=5370
TBDockHeight=7164 TBDockHeight=7119
LRDockWidth=1898 LRDockWidth=1898
Dockable=1 Dockable=1
StayOnTop=0 StayOnTop=0
SplitPos=127 SplitPos=111
[PropInspDesignerSelection]
ArrangeBy=Name
SelectedItem=Align,
ExpandedItems=LiveBindings=0,"LiveBindings Designer=0",Margins=0,StyleElements=0,Anchors=0,Constraints=0
[frmDesignPreview] [frmDesignPreview]
PercentageSizes=1 PercentageSizes=1
@ -358,8 +363,8 @@ Create=1
Visible=0 Visible=0
Docked=1 Docked=1
State=0 State=0
Left=-8 Left=-1152
Top=287 Top=243
Width=273 Width=273
Height=359 Height=359
MaxLeft=-1 MaxLeft=-1
@ -383,11 +388,11 @@ State=0
Left=0 Left=0
Top=0 Top=0
Width=3820 Width=3820
Height=1861 Height=1121
MaxLeft=-1 MaxLeft=-1
MaxTop=-1 MaxTop=-1
ClientWidth=3820 ClientWidth=3820
ClientHeight=1861 ClientHeight=1121
TBDockHeight=415 TBDockHeight=415
LRDockWidth=4953 LRDockWidth=4953
Dockable=1 Dockable=1
@ -402,11 +407,11 @@ State=0
Left=0 Left=0
Top=0 Top=0
Width=3820 Width=3820
Height=1861 Height=1121
MaxLeft=-1 MaxLeft=-1
MaxTop=-1 MaxTop=-1
ClientWidth=3820 ClientWidth=3820
ClientHeight=1861 ClientHeight=1121
TBDockHeight=213 TBDockHeight=213
LRDockWidth=7406 LRDockWidth=7406
Dockable=1 Dockable=1
@ -425,11 +430,11 @@ State=0
Left=0 Left=0
Top=0 Top=0
Width=3820 Width=3820
Height=1861 Height=1121
MaxLeft=-1 MaxLeft=-1
MaxTop=-1 MaxTop=-1
ClientWidth=3820 ClientWidth=3820
ClientHeight=1861 ClientHeight=1121
TBDockHeight=1536 TBDockHeight=1536
LRDockWidth=3484 LRDockWidth=3484
Dockable=1 Dockable=1
@ -444,11 +449,11 @@ State=0
Left=0 Left=0
Top=0 Top=0
Width=3820 Width=3820
Height=1861 Height=1121
MaxLeft=-1 MaxLeft=-1
MaxTop=-1 MaxTop=-1
ClientWidth=3820 ClientWidth=3820
ClientHeight=1861 ClientHeight=1121
TBDockHeight=2063 TBDockHeight=2063
LRDockWidth=3484 LRDockWidth=3484
Dockable=1 Dockable=1
@ -566,11 +571,11 @@ State=0
Left=0 Left=0
Top=0 Top=0
Width=3820 Width=3820
Height=1861 Height=1121
MaxLeft=-1 MaxLeft=-1
MaxTop=-1 MaxTop=-1
ClientWidth=3820 ClientWidth=3820
ClientHeight=1861 ClientHeight=1121
TBDockHeight=1547 TBDockHeight=1547
LRDockWidth=8742 LRDockWidth=8742
Dockable=1 Dockable=1
@ -591,12 +596,12 @@ Docked=1
State=0 State=0
Left=0 Left=0
Top=0 Top=0
Width=1773 Width=1898
Height=6738 Height=3498
MaxLeft=-1 MaxLeft=-1
MaxTop=-1 MaxTop=-1
ClientWidth=1773 ClientWidth=1898
ClientHeight=6738 ClientHeight=3498
TBDockHeight=3677 TBDockHeight=3677
LRDockWidth=1898 LRDockWidth=1898
Dockable=1 Dockable=1
@ -678,12 +683,12 @@ State=0
Left=0 Left=0
Top=23 Top=23
Width=3820 Width=3820
Height=2164 Height=1424
MaxLeft=-1 MaxLeft=-1
MaxTop=-1 MaxTop=-1
ClientWidth=3820 ClientWidth=3820
ClientHeight=2164 ClientHeight=1424
TBDockHeight=2164 TBDockHeight=1424
LRDockWidth=3820 LRDockWidth=3820
Dockable=1 Dockable=1
StayOnTop=0 StayOnTop=0
@ -702,12 +707,12 @@ State=0
Left=0 Left=0
Top=23 Top=23
Width=2000 Width=2000
Height=6682 Height=4529
MaxLeft=-1 MaxLeft=-1
MaxTop=-1 MaxTop=-1
ClientWidth=2000 ClientWidth=2000
ClientHeight=6682 ClientHeight=4529
TBDockHeight=7164 TBDockHeight=7119
LRDockWidth=2000 LRDockWidth=2000
Dockable=1 Dockable=1
StayOnTop=0 StayOnTop=0
@ -716,22 +721,22 @@ ActiveTabID=ProjectManager
TabDockClients=ProjectManager,ModelViewTool,DataExplorerContainer,frmDesignPreview,TFileExplorerForm TabDockClients=ProjectManager,ModelViewTool,DataExplorerContainer,frmDesignPreview,TFileExplorerForm
[DockSite3] [DockSite3]
HostDockSite=LeftDockTabSet HostDockSite=DockLeftPanel
DockSiteType=1 DockSiteType=1
PercentageSizes=1 PercentageSizes=1
Create=1 Create=1
Visible=0 Visible=1
Docked=1 Docked=1
State=0 State=0
Left=0 Left=0
Top=0 Top=23
Width=1898 Width=1898
Height=7164 Height=3498
MaxLeft=-1 MaxLeft=-1
MaxTop=-1 MaxTop=-1
ClientWidth=1773 ClientWidth=1898
ClientHeight=6738 ClientHeight=3498
TBDockHeight=7164 TBDockHeight=7119
LRDockWidth=1898 LRDockWidth=1898
Dockable=1 Dockable=1
StayOnTop=0 StayOnTop=0
@ -740,22 +745,22 @@ ActiveTabID=StructureView
TabDockClients=StructureView,ClassBrowserTool TabDockClients=StructureView,ClassBrowserTool
[DockSite4] [DockSite4]
HostDockSite=RightTabDock HostDockSite=DockRightPanel
DockSiteType=1 DockSiteType=1
PercentageSizes=1 PercentageSizes=1
Create=1 Create=1
Visible=0 Visible=1
Docked=1 Docked=1
State=0 State=0
Left=0 Left=0
Top=0 Top=454
Width=2000 Width=2000
Height=7164 Height=4339
MaxLeft=-1 MaxLeft=-1
MaxTop=-1 MaxTop=-1
ClientWidth=1875 ClientWidth=2000
ClientHeight=6738 ClientHeight=4339
TBDockHeight=7164 TBDockHeight=7119
LRDockWidth=2000 LRDockWidth=2000
Dockable=1 Dockable=1
StayOnTop=0 StayOnTop=0

View File

@ -1,10 +1,10 @@
[Stats] [Stats]
EditorSecs=32709 EditorSecs=33834
DesignerSecs=1961 DesignerSecs=2107
InspectorSecs=1308 InspectorSecs=1461
CompileSecs=1534686 CompileSecs=1703492
OtherSecs=5083 OtherSecs=5442
StartTime=11/02/2017 10:51:15 StartTime=11/02/2017 10:51:15
RealKeys=0 RealKeys=0
EffectiveKeys=0 EffectiveKeys=0
DebugSecs=20405 DebugSecs=23775

View File

@ -2,8 +2,8 @@ object MiniBrowserFrm: TMiniBrowserFrm
Left = 0 Left = 0
Top = 0 Top = 0
Caption = 'MiniBrowser' Caption = 'MiniBrowser'
ClientHeight = 716 ClientHeight = 712
ClientWidth = 1089 ClientWidth = 1184
Color = clBtnFace Color = clBtnFace
Font.Charset = DEFAULT_CHARSET Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText Font.Color = clWindowText
@ -16,10 +16,10 @@ object MiniBrowserFrm: TMiniBrowserFrm
PixelsPerInch = 96 PixelsPerInch = 96
TextHeight = 13 TextHeight = 13
object Splitter1: TSplitter object Splitter1: TSplitter
Left = 1084 Left = 1179
Top = 41 Top = 41
Width = 5 Width = 5
Height = 656 Height = 652
Align = alRight Align = alRight
Visible = False Visible = False
ExplicitLeft = 0 ExplicitLeft = 0
@ -29,7 +29,7 @@ object MiniBrowserFrm: TMiniBrowserFrm
object NavControlPnl: TPanel object NavControlPnl: TPanel
Left = 0 Left = 0
Top = 0 Top = 0
Width = 1089 Width = 1184
Height = 41 Height = 41
Align = alTop Align = alTop
BevelOuter = bvNone BevelOuter = bvNone
@ -109,7 +109,7 @@ object MiniBrowserFrm: TMiniBrowserFrm
object URLEditPnl: TPanel object URLEditPnl: TPanel
Left = 133 Left = 133
Top = 0 Top = 0
Width = 883 Width = 978
Height = 41 Height = 41
Align = alClient Align = alClient
BevelOuter = bvNone BevelOuter = bvNone
@ -120,7 +120,7 @@ object MiniBrowserFrm: TMiniBrowserFrm
object URLCbx: TComboBox object URLCbx: TComboBox
Left = 0 Left = 0
Top = 9 Top = 9
Width = 883 Width = 978
Height = 21 Height = 21
Align = alClient Align = alClient
TabOrder = 0 TabOrder = 0
@ -142,7 +142,7 @@ object MiniBrowserFrm: TMiniBrowserFrm
end end
end end
object ConfigPnl: TPanel object ConfigPnl: TPanel
Left = 1016 Left = 1111
Top = 0 Top = 0
Width = 73 Width = 73
Height = 41 Height = 41
@ -184,24 +184,24 @@ object MiniBrowserFrm: TMiniBrowserFrm
object CEFWindowParent1: TCEFWindowParent object CEFWindowParent1: TCEFWindowParent
Left = 0 Left = 0
Top = 41 Top = 41
Width = 1084 Width = 1179
Height = 656 Height = 652
Align = alClient Align = alClient
TabOrder = 1 TabOrder = 1
end end
object DevTools: TCEFWindowParent object DevTools: TCEFWindowParent
Left = 1089 Left = 1184
Top = 41 Top = 41
Width = 0 Width = 0
Height = 656 Height = 652
Align = alRight Align = alRight
TabOrder = 2 TabOrder = 2
Visible = False Visible = False
end end
object StatusBar1: TStatusBar object StatusBar1: TStatusBar
Left = 0 Left = 0
Top = 697 Top = 693
Width = 1089 Width = 1184
Height = 19 Height = 19
Panels = < Panels = <
item item
@ -214,18 +214,20 @@ object MiniBrowserFrm: TMiniBrowserFrm
OnLoadingStateChange = Chromium1LoadingStateChange OnLoadingStateChange = Chromium1LoadingStateChange
OnBeforeContextMenu = Chromium1BeforeContextMenu OnBeforeContextMenu = Chromium1BeforeContextMenu
OnContextMenuCommand = Chromium1ContextMenuCommand OnContextMenuCommand = Chromium1ContextMenuCommand
OnPreKeyEvent = Chromium1PreKeyEvent
OnKeyEvent = Chromium1KeyEvent
OnAddressChange = Chromium1AddressChange OnAddressChange = Chromium1AddressChange
OnTitleChange = Chromium1TitleChange OnTitleChange = Chromium1TitleChange
OnFullScreenModeChange = Chromium1FullScreenModeChange OnFullScreenModeChange = Chromium1FullScreenModeChange
OnStatusMessage = Chromium1StatusMessage OnStatusMessage = Chromium1StatusMessage
OnAfterCreated = Chromium1AfterCreated OnAfterCreated = Chromium1AfterCreated
Left = 424 Left = 32
Top = 352 Top = 224
end end
object PopupMenu1: TPopupMenu object PopupMenu1: TPopupMenu
OnPopup = PopupMenu1Popup OnPopup = PopupMenu1Popup
Left = 664 Left = 32
Top = 104 Top = 168
object DevTools1: TMenuItem object DevTools1: TMenuItem
Caption = 'DevTools' Caption = 'DevTools'
OnClick = DevTools1Click OnClick = DevTools1Click
@ -268,7 +270,12 @@ object MiniBrowserFrm: TMiniBrowserFrm
end end
end end
object SaveDialog1: TSaveDialog object SaveDialog1: TSaveDialog
Left = 488 Left = 32
Top = 232 Top = 112
end
object ApplicationEvents1: TApplicationEvents
OnMessage = ApplicationEvents1Message
Left = 32
Top = 56
end end
end end

View File

@ -45,10 +45,10 @@ uses
{$IFDEF DELPHI16_UP} {$IFDEF DELPHI16_UP}
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Menus, Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Menus,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ExtCtrls, System.Types, Vcl.ComCtrls, Vcl.ClipBrd, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ExtCtrls, System.Types, Vcl.ComCtrls, Vcl.ClipBrd,
System.UITypes, System.UITypes, Vcl.AppEvnts,
{$ELSE} {$ELSE}
Windows, Messages, SysUtils, Variants, Classes, Graphics, Menus, Windows, Messages, SysUtils, Variants, Classes, Graphics, Menus,
Controls, Forms, Dialogs, StdCtrls, ExtCtrls, Types, ComCtrls, ClipBrd, Controls, Forms, Dialogs, StdCtrls, ExtCtrls, Types, ComCtrls, ClipBrd, AppEvnts,
{$ENDIF} {$ENDIF}
uCEFChromium, uCEFWindowParent, uCEFInterfaces, uCEFApplication, uCEFTypes, uCEFConstants; uCEFChromium, uCEFWindowParent, uCEFInterfaces, uCEFApplication, uCEFTypes, uCEFConstants;
@ -103,6 +103,7 @@ type
Deczoom1: TMenuItem; Deczoom1: TMenuItem;
Resetzoom1: TMenuItem; Resetzoom1: TMenuItem;
SaveDialog1: TSaveDialog; SaveDialog1: TSaveDialog;
ApplicationEvents1: TApplicationEvents;
procedure FormShow(Sender: TObject); procedure FormShow(Sender: TObject);
procedure BackBtnClick(Sender: TObject); procedure BackBtnClick(Sender: TObject);
procedure ForwardBtnClick(Sender: TObject); procedure ForwardBtnClick(Sender: TObject);
@ -143,6 +144,14 @@ type
procedure Resetzoom1Click(Sender: TObject); procedure Resetzoom1Click(Sender: TObject);
procedure Chromium1FullScreenModeChange(Sender: TObject; procedure Chromium1FullScreenModeChange(Sender: TObject;
const browser: ICefBrowser; fullscreen: Boolean); const browser: ICefBrowser; fullscreen: Boolean);
procedure Chromium1PreKeyEvent(Sender: TObject;
const browser: ICefBrowser; const event: PCefKeyEvent; osEvent: PMsg;
out isKeyboardShortcut, Result: Boolean);
procedure Chromium1KeyEvent(Sender: TObject;
const browser: ICefBrowser; const event: PCefKeyEvent; osEvent: PMsg;
out Result: Boolean);
procedure ApplicationEvents1Message(var Msg: tagMSG;
var Handled: Boolean);
protected protected
procedure AddURL(const aURL : string); procedure AddURL(const aURL : string);
@ -151,6 +160,9 @@ type
procedure ShowDevTools; overload; procedure ShowDevTools; overload;
procedure HideDevTools; procedure HideDevTools;
procedure HandleKeyUp(const aMsg : TMsg; var aHandled : boolean);
procedure HandleKeyDown(const aMsg : TMsg; var aHandled : boolean);
procedure BrowserCreatedMsg(var aMessage : TMessage); message MINIBROWSER_CREATED; procedure BrowserCreatedMsg(var aMessage : TMessage); message MINIBROWSER_CREATED;
procedure ShowDevToolsMsg(var aMessage : TMessage); message MINIBROWSER_SHOWDEVTOOLS; procedure ShowDevToolsMsg(var aMessage : TMessage); message MINIBROWSER_SHOWDEVTOOLS;
procedure HideDevToolsMsg(var aMessage : TMessage); message MINIBROWSER_HIDEDEVTOOLS; procedure HideDevToolsMsg(var aMessage : TMessage); message MINIBROWSER_HIDEDEVTOOLS;
@ -332,6 +344,75 @@ begin
end; end;
end; end;
procedure TMiniBrowserFrm.Chromium1KeyEvent(Sender: TObject;
const browser: ICefBrowser; const event: PCefKeyEvent; osEvent: PMsg;
out Result: Boolean);
var
TempMsg : TMsg;
begin
Result := False;
if (event <> nil) and (osEvent <> nil) then
case osEvent.Message of
WM_KEYUP :
begin
TempMsg := osEvent^;
HandleKeyUp(TempMsg, Result);
end;
WM_KEYDOWN :
begin
TempMsg := osEvent^;
HandleKeyDown(TempMsg, Result);
end;
end;
end;
procedure TMiniBrowserFrm.ApplicationEvents1Message(var Msg: tagMSG;
var Handled: Boolean);
begin
case Msg.message of
WM_KEYUP : HandleKeyUp(Msg, Handled);
WM_KEYDOWN : HandleKeyDown(Msg, Handled);
end;
end;
procedure TMiniBrowserFrm.HandleKeyUp(const aMsg : TMsg; var aHandled : boolean);
var
TempMessage : TMessage;
TempKeyMsg : TWMKey;
begin
TempMessage.Msg := aMsg.message;
TempMessage.wParam := aMsg.wParam;
TempMessage.lParam := aMsg.lParam;
TempKeyMsg := TWMKey(TempMessage);
if (TempKeyMsg.CharCode = VK_F12) then
begin
aHandled := True;
if DevTools.Visible then
PostMessage(Handle, MINIBROWSER_HIDEDEVTOOLS, 0, 0)
else
PostMessage(Handle, MINIBROWSER_SHOWDEVTOOLS, 0, 0);
end;
end;
procedure TMiniBrowserFrm.HandleKeyDown(const aMsg : TMsg; var aHandled : boolean);
var
TempMessage : TMessage;
TempKeyMsg : TWMKey;
begin
TempMessage.Msg := aMsg.message;
TempMessage.wParam := aMsg.wParam;
TempMessage.lParam := aMsg.lParam;
TempKeyMsg := TWMKey(TempMessage);
if (TempKeyMsg.CharCode = VK_F12) then aHandled := True;
end;
procedure TMiniBrowserFrm.Chromium1LoadingStateChange(Sender: TObject; procedure TMiniBrowserFrm.Chromium1LoadingStateChange(Sender: TObject;
const browser: ICefBrowser; isLoading, canGoBack, canGoForward: Boolean); const browser: ICefBrowser; isLoading, canGoBack, canGoForward: Boolean);
begin begin
@ -341,6 +422,18 @@ begin
StopBtn.Enabled := isLoading; StopBtn.Enabled := isLoading;
end; end;
procedure TMiniBrowserFrm.Chromium1PreKeyEvent(Sender: TObject;
const browser: ICefBrowser; const event: PCefKeyEvent; osEvent: PMsg;
out isKeyboardShortcut, Result: Boolean);
begin
Result := False;
if (event <> nil) and
(event.kind in [KEYEVENT_KEYDOWN, KEYEVENT_KEYUP]) and
(event.windows_key_code = VK_F12) then
isKeyboardShortcut := True;
end;
procedure TMiniBrowserFrm.Chromium1ProcessMessageReceived(Sender: TObject; procedure TMiniBrowserFrm.Chromium1ProcessMessageReceived(Sender: TObject;
const browser: ICefBrowser; sourceProcess: TCefProcessId; const browser: ICefBrowser; sourceProcess: TCefProcessId;
const message: ICefProcessMessage; out Result: Boolean); const message: ICefProcessMessage; out Result: Boolean);