-
-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3e62c4f
commit f40aa24
Showing
6 changed files
with
1,720 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Web Browser Overlay Demo | ||
|
||
## Description | ||
|
||
Demonstrates using native controls that show over the top of `TWebBrowser` | ||
|
||
Prompted by a question on Delphi Praxis, [here](https://en.delphipraxis.net/topic/12144-mouse-cursor/?do=findComment&comment=95938). | ||
|
||
This demo has a single `TNativeImage` control with a mouse-pointer like image, which is overlaid on a `TWebBrowser`. | ||
|
||
Please refer to the [native controls documentation](https://github.com/DelphiWorlds/Kastri/blob/master/Controls/NativeControls.md) for details about the controls themselves, **including installation** |
Binary file added
BIN
+703 Bytes
Demos/NativeControls/WebBrowserOverlay/Resources/Images/arrow_navigation_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
object Form1: TForm1 | ||
Left = 0 | ||
Top = 0 | ||
Caption = 'Form1' | ||
ClientHeight = 480 | ||
ClientWidth = 640 | ||
FormFactor.Width = 320 | ||
FormFactor.Height = 480 | ||
FormFactor.Devices = [Desktop] | ||
OnCreate = FormCreate | ||
DesignerMasterStyle = 0 | ||
object WebBrowser1: TWebBrowser | ||
Align = Client | ||
Size.Width = 640.000000000000000000 | ||
Size.Height = 381.000000000000000000 | ||
Size.PlatformDefault = False | ||
WindowsEngine = IEOnly | ||
end | ||
object TopLayout: TLayout | ||
Align = Top | ||
Padding.Left = 6.000000000000000000 | ||
Padding.Top = 4.000000000000000000 | ||
Padding.Right = 6.000000000000000000 | ||
Padding.Bottom = 4.000000000000000000 | ||
Size.Width = 640.000000000000000000 | ||
Size.Height = 49.000000000000000000 | ||
Size.PlatformDefault = False | ||
TabOrder = 0 | ||
object GoButton: TButton | ||
Align = Right | ||
Margins.Left = 12.000000000000000000 | ||
Position.X = 535.000000000000000000 | ||
Position.Y = 4.000000000000000000 | ||
Size.Width = 99.000000000000000000 | ||
Size.Height = 41.000000000000000000 | ||
Size.PlatformDefault = False | ||
TabOrder = 0 | ||
Text = 'Go' | ||
TextSettings.Trimming = None | ||
OnClick = GoButtonClick | ||
end | ||
object URLEdit: TEdit | ||
Touch.InteractiveGestures = [LongTap, DoubleTap] | ||
Align = VertCenter | ||
TabOrder = 1 | ||
Text = 'https://fissedesign.com.au/' | ||
Position.X = 6.000000000000000000 | ||
Position.Y = 10.000000000000000000 | ||
Size.Width = 517.000000000000000000 | ||
Size.Height = 28.000000000000000000 | ||
Size.PlatformDefault = False | ||
end | ||
end | ||
object Memo1: TMemo | ||
Touch.InteractiveGestures = [Pan, LongTap, DoubleTap] | ||
DataDetectorTypes = [] | ||
Align = Bottom | ||
Position.Y = 430.000000000000000000 | ||
Size.Width = 640.000000000000000000 | ||
Size.Height = 50.000000000000000000 | ||
Size.PlatformDefault = False | ||
TabOrder = 2 | ||
Viewport.Width = 636.000000000000000000 | ||
Viewport.Height = 46.000000000000000000 | ||
end | ||
object NativeImage1: TNativeImage | ||
BackgroundColor = claNull | ||
Image.PNG = { | ||
89504E470D0A1A0A0000000D4948445200000040000000400806000000AA6971 | ||
DE0000000473424954080808087C0864880000028849444154789CED993F6814 | ||
5110873F93F80741228722C4C24A14045114AB4B65C0468514A2A5556C44ED6C | ||
528895D8A5D3801609A40858599A4A5B2D0249142B110441103568A2DEE52C66 | ||
97B7B7BBB9DDF3DE7B7BBB371F2C2CB7EFDEFE6676DECC9B5D50144551144551 | ||
144551068F614BF38C0017800D60DDD29CA5E23ED002FE02CF80F3C08E421579 | ||
E621E280E8F116B8058C16A8CB1BC7802D924E68214BE21170B230759E788131 | ||
FA25920FE2CE78055C037615A4D1299318436790D09F02D6483AE233F0003852 | ||
8852470C031F10037F00FB82DF878009601168D0EE8826123997A848D29CC618 | ||
7723E5FA61E01EF0856454BC07EE02351F425D7110D8440C5AE9306E377085F6 | ||
BC111E1BC01C70CAA952872C608CA9E7187F06780CFC24E98CD7481ED9E344A9 | ||
23EA180316BAF85FA592E61B44F81F60ACCBFF5622694E61444FF7304F6993E6 | ||
5EE02B22F413B0B3C7F94A9934673022272DCE7B16784AFA4EF389C5FBF44CB4 | ||
3F58B23C770DE9409BB43BE0BBE5FBF44C18B25BC0710BF3D591704F7BFAABD8 | ||
8D342BC4FB83FF212C8FCB248DDE44AAC5047D5A15B6EB0FF2D06983F40EA900 | ||
072C6A7546567F10E73212CEDB65FB3CBBCBBEE210F01B316239636C0DF84572 | ||
6DDFA64FEB7D5EF2F6077722E39E03E3EEA5F9216F7FB08209F7523FF134B2FA | ||
83718C93E63CEAF246567F304FBE65525A3AF507FB31E56E0D8F357DC8D78D90 | ||
EC3E1F9C8F011723D7AE230E02A9FD2D7FB2FC7294F4FEA0D2C92FCE1266AD9F | ||
A0E0E467EBE36837AC035783F30692F0C2AF4637818F0568F2CA0862640BF886 | ||
E9EC568B10E33309863480D9E07C14F3C677367D7835897E3F1898E41727DA1F | ||
5472E797C539E4955633381F484E0787A2288AA2288AA2288AA278E41FEA34F9 | ||
1B680D25BD0000000049454E44AE426082} | ||
Position.X = 134.000000000000000000 | ||
Position.Y = 82.000000000000000000 | ||
Size.Width = 71.000000000000000000 | ||
Size.Height = 62.000000000000000000 | ||
Size.PlatformDefault = False | ||
TextSettings.Font.StyleExt = {00070000000000000004000000} | ||
TextSettings.FontColor = claWhite | ||
TextSettings.HorzAlign = Center | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
unit Unit1; | ||
|
||
interface | ||
|
||
uses | ||
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, | ||
FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.Controls.Presentation, DW.NativeShape, FMX.WebBrowser, FMX.Edit, FMX.StdCtrls, | ||
FMX.Layouts, DW.NativeImage, FMX.Memo.Types, FMX.ScrollBox, FMX.Memo, DW.NativeSlider; | ||
|
||
type | ||
TForm1 = class(TForm) | ||
WebBrowser1: TWebBrowser; | ||
TopLayout: TLayout; | ||
GoButton: TButton; | ||
URLEdit: TEdit; | ||
Memo1: TMemo; | ||
NativeImage1: TNativeImage; | ||
procedure FormCreate(Sender: TObject); | ||
procedure GoButtonClick(Sender: TObject); | ||
private | ||
{ Private declarations } | ||
public | ||
{ Public declarations } | ||
end; | ||
|
||
var | ||
Form1: TForm1; | ||
|
||
implementation | ||
|
||
{$R *.fmx} | ||
|
||
procedure TForm1.FormCreate(Sender: TObject); | ||
begin | ||
GoButtonClick(GoButton); | ||
end; | ||
|
||
procedure TForm1.GoButtonClick(Sender: TObject); | ||
begin | ||
WebBrowser1.Navigate(URLEdit.Text); | ||
end; | ||
|
||
end. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
program WBOverlay; | ||
|
||
uses | ||
System.StartUpCopy, | ||
FMX.Forms, | ||
Unit1 in 'Unit1.pas' {Form1}; | ||
|
||
{$R *.res} | ||
|
||
begin | ||
Application.Initialize; | ||
Application.CreateForm(TForm1, Form1); | ||
Application.Run; | ||
end. |
Oops, something went wrong.