You've already forked CEF4Delphi
mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2025-06-12 22:07:39 +02:00
Added a touch keyboard to SimpleOSRBrowser
This commit is contained in:
@ -2,8 +2,8 @@ object Form1: TForm1
|
||||
Left = 0
|
||||
Top = 0
|
||||
Caption = 'Simple OSR Browser - Initializing browser. Please wait...'
|
||||
ClientHeight = 530
|
||||
ClientWidth = 800
|
||||
ClientHeight = 668
|
||||
ClientWidth = 988
|
||||
Color = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
@ -23,7 +23,7 @@ object Form1: TForm1
|
||||
object NavControlPnl: TPanel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 800
|
||||
Width = 988
|
||||
Height = 30
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
@ -37,7 +37,7 @@ object Form1: TForm1
|
||||
object ComboBox1: TComboBox
|
||||
Left = 5
|
||||
Top = 5
|
||||
Width = 721
|
||||
Width = 875
|
||||
Height = 21
|
||||
Align = alClient
|
||||
ItemIndex = 0
|
||||
@ -54,9 +54,9 @@ object Form1: TForm1
|
||||
'https://frames-per-second.appspot.com/')
|
||||
end
|
||||
object Panel2: TPanel
|
||||
Left = 726
|
||||
Left = 880
|
||||
Top = 5
|
||||
Width = 69
|
||||
Width = 103
|
||||
Height = 20
|
||||
Margins.Left = 2
|
||||
Margins.Top = 2
|
||||
@ -80,7 +80,7 @@ object Form1: TForm1
|
||||
OnEnter = GoBtnEnter
|
||||
end
|
||||
object SnapshotBtn: TButton
|
||||
Left = 38
|
||||
Left = 72
|
||||
Top = 0
|
||||
Width = 31
|
||||
Height = 20
|
||||
@ -100,13 +100,32 @@ object Form1: TForm1
|
||||
OnClick = SnapshotBtnClick
|
||||
OnEnter = SnapshotBtnEnter
|
||||
end
|
||||
object KeyboardBtn: TButton
|
||||
Left = 38
|
||||
Top = 0
|
||||
Width = 31
|
||||
Height = 20
|
||||
Hint = 'Touch keyboard'
|
||||
Margins.Left = 5
|
||||
Caption = '7'
|
||||
Font.Charset = SYMBOL_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -16
|
||||
Font.Name = 'Wingdings'
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
TabOrder = 2
|
||||
OnClick = KeyboardBtnClick
|
||||
end
|
||||
end
|
||||
end
|
||||
object Panel1: TBufferPanel
|
||||
Left = 0
|
||||
Top = 30
|
||||
Width = 800
|
||||
Height = 500
|
||||
Width = 988
|
||||
Height = 458
|
||||
Align = alClient
|
||||
Caption = 'Panel1'
|
||||
TabOrder = 1
|
||||
@ -120,6 +139,17 @@ object Form1: TForm1
|
||||
OnResize = Panel1Resize
|
||||
OnMouseLeave = Panel1MouseLeave
|
||||
end
|
||||
object TouchKeyboard1: TTouchKeyboard
|
||||
Left = 0
|
||||
Top = 488
|
||||
Width = 988
|
||||
Height = 180
|
||||
Align = alBottom
|
||||
GradientEnd = clSilver
|
||||
GradientStart = clGray
|
||||
Layout = 'Standard'
|
||||
Visible = False
|
||||
end
|
||||
object chrmosr: TChromium
|
||||
OnTooltip = chrmosrTooltip
|
||||
OnBeforePopup = chrmosrBeforePopup
|
||||
|
@ -45,10 +45,10 @@ uses
|
||||
{$IFDEF DELPHI16_UP}
|
||||
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes,
|
||||
System.SyncObjs, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls,
|
||||
Vcl.ExtCtrls, Vcl.AppEvnts,
|
||||
Vcl.ExtCtrls, Vcl.AppEvnts, Vcl.Touch.Keyboard,
|
||||
{$ELSE}
|
||||
Windows, Messages, SysUtils, Variants, Classes, SyncObjs,
|
||||
Graphics, Controls, Forms, Dialogs, StdCtrls, ExtCtrls, AppEvnts,
|
||||
Graphics, Controls, Forms, Dialogs, StdCtrls, ExtCtrls, AppEvnts, Keyboard,
|
||||
{$ENDIF}
|
||||
uCEFChromium, uCEFTypes, uCEFInterfaces, uCEFConstants, uBufferPanel;
|
||||
|
||||
@ -64,6 +64,8 @@ type
|
||||
SaveDialog1: TSaveDialog;
|
||||
Timer1: TTimer;
|
||||
Panel1: TBufferPanel;
|
||||
KeyboardBtn: TButton;
|
||||
TouchKeyboard1: TTouchKeyboard;
|
||||
|
||||
procedure AppEventsMessage(var Msg: tagMSG; var Handled: Boolean);
|
||||
|
||||
@ -103,6 +105,7 @@ type
|
||||
procedure Timer1Timer(Sender: TObject);
|
||||
procedure SnapshotBtnEnter(Sender: TObject);
|
||||
procedure ComboBox1Enter(Sender: TObject);
|
||||
procedure KeyboardBtnClick(Sender: TObject);
|
||||
|
||||
protected
|
||||
FPopUpBitmap : TBitmap;
|
||||
@ -813,6 +816,11 @@ begin
|
||||
FLastClickButton := mbLeft;
|
||||
end;
|
||||
|
||||
procedure TForm1.KeyboardBtnClick(Sender: TObject);
|
||||
begin
|
||||
TouchKeyboard1.Visible := not(TouchKeyboard1.Visible);
|
||||
end;
|
||||
|
||||
function TForm1.CancelPreviousClick(x, y : integer; var aCurrentTime : integer) : boolean;
|
||||
begin
|
||||
aCurrentTime := GetMessageTime;
|
||||
|
Reference in New Issue
Block a user