PureBasic Forum
http://forums.purebasic.com/english/

SWV: A simple HTML/JS desktop GUI engine for PB
http://forums.purebasic.com/english/viewtopic.php?f=7&t=74582
Page 1 of 5

Author:  firace [ Sun Feb 09, 2020 4:52 pm ]
Post subject:  SWV: A simple HTML/JS desktop GUI engine for PB

I am working on a Simple Webview control (hence the name: SWV) for PB developers, designed to be more useful and flexible than the standard WebGadget, while still being very lightweight.

SWV's primary purpose is to facilitate building HTML/JS GUIs for PureBasic desktop applications.
It aims to provide tight integration and seamless two-way communication between JS and PB.

Note that for security reasons, SWV is not intended, and not optimized for web browsing.


The SWV control will offer the following functions:

    SWV_New

    SWV_SetUserAgent

    SWV_SetLocation

    SWV_GetLocation

    SWV_SetHTML

    SWV_GetHTML

    SWV_SetDOM

    SWV_GetDOM

    SWV_RunJS

    SWV_Resize

    SWV_Free



A couple screenshots:

Image

Image

Image

I will release SWV as a very easy-to-use DLL (for a reasonable price), if enough people are interested.

So please share your thoughts / questions / suggestions :)

However do keep in mind that I will be travelling the next few days and might take a while to respond.


Edit: Demo #1 is available!


https://www.radsix.com/files_swv/SWV_De ... ve_x86.zip (Download size: 91KB)

Unzip the package to a location of your choice (preserving the folder structure),
and either just run the demo executable, or compile it from source.

Notes:
This is a very early preview for demonstration purposes only, so be aware that many UI elements have no effect, and only a subset of the intended functionality has been implemented.

Have a look at the sample applications, and be sure to check out the test view by pressing F12.

Keep in mind that to build an HTML/JS UI for your desktop application, a UI framework is required in addition to SWV.
The following popular frameworks are confirmed to be supported so far:

    BootStrap
    Pure.css
    Bulma.css
    Mint.css

All comments, bug reports, suggestions welcome :)

If there's enough interest, a CEF (Chromium) version will follow, but of course keep in mind that resulting applications will be much much bigger (about 130MB for a simple Hello world application, vs 100-150KB for the current native version).

Author:  Fred [ Sun Feb 09, 2020 5:36 pm ]
Post subject:  Re: SWV: A better webview control

Looks very interesting, on which browser code is it based ?

Author:  Kiffi [ Sun Feb 09, 2020 6:01 pm ]
Post subject:  Re: SWV: A better webview control

That sounds promising. But only if it does not use the Internet Explorer.

Greetings ... Peter

Author:  chi [ Sun Feb 09, 2020 7:40 pm ]
Post subject:  Re: SWV: A better webview control

Nice, looking forward to it ^^

Author:  firace [ Sun Feb 09, 2020 8:34 pm ]
Post subject:  Re: SWV: A better webview control

Fred wrote:
Looks very interesting, on which browser code is it based ?


I am making it for both Trident (with hardware acceleration) and Chromium.
Tests are looking good on both engines so far.

The Chromium version will certainly take a little more time to complete, but for desktop GUI rendering purposes, the Trident version should be quite usable already.

Author:  ozzie [ Mon Feb 10, 2020 2:26 am ]
Post subject:  Re: SWV: A better webview control

Looking forward to the demo!

Author:  diskay [ Mon Feb 10, 2020 12:20 pm ]
Post subject:  Re: SWV: A better webview control

https://github.com/weolar/miniblink49

free :D

Author:  the.weavster [ Mon Feb 10, 2020 5:55 pm ]
Post subject:  Re: SWV: A better webview control

diskay wrote:
https://github.com/weolar/miniblink49
free :D

I'd rather pay firace a few bob and avoid the frustration of trying to figure that out :wink:

Author:  firace [ Tue Feb 11, 2020 2:00 pm ]
Post subject:  Re: SWV: A better webview control

the.weavster wrote:
diskay wrote:
https://github.com/weolar/miniblink49
free :D

I'd rather pay firace a few bob and avoid the frustration of trying to figure that out :wink:


Yes using SWV should be much easier to figure out :)

A couple more screenshots (SWV + Bootstrap UI theme):

Image

Image

Author:  Kiffi [ Tue Feb 11, 2020 2:28 pm ]
Post subject:  Re: SWV: A better webview control

@firace: Can you do me a favor and test the following page?

https://www.spiderbasic.com/showcase/onlineviewer/examples/gadgetoverview.html

This is a demonstration of the SpiderBasic gadgets. When I display the page in a PureBasic WebGadget (Internet Explorer), I can't select the ListView and ListIconGadget entries with the mouse.

Thanks in Advance & greetings ... Peter

Author:  firace [ Tue Feb 11, 2020 4:26 pm ]
Post subject:  Re: SWV: A better webview control

Kiffi wrote:
@firace: Can you do me a favor and test the following page?

https://www.spiderbasic.com/showcase/onlineviewer/examples/gadgetoverview.html

This is a demonstration of the SpiderBasic gadgets. When I display the page in a PureBasic WebGadget (Internet Explorer), I can't select the ListView and ListIconGadget entries with the mouse.

Thanks in Advance & greetings ... Peter


I just tested it and yes, I do see issues with selection on those gadgets when using the IE11-based web control. In fact the browser control does appear to pick up the mouse events (see below screenshot), but does not highlight the selected item for some reason. I will try using the CEF (Chromium) engine later.

Image

Author:  firace [ Wed Feb 12, 2020 12:24 pm ]
Post subject:  Re: SWV: A better webview control

And here's a first little demo:

https://www.radsix.com/files_swv/SWV_De ... ve_x86.zip

Unzip the package to a location of your choice (preserving the folder structure),
and either just run the executable, or compile it from source (SWV_EXE_X6.pb)

Notes:
This is a very early preview for demonstration purposes only, so be aware that many UI elements have no effect, and only a subset of the intended functionality has been implemented.

Have a look at the sample applications, and be sure to switch to the full test view by pressing F12.

Keep in mind that to build an HTML/JS UI for your desktop application, a UI framework is required in addition to SWV.
The following popular frameworks are confirmed to be supported so far:

    BootStrap
    Pure.css
    Bulma.css
    Mint.css

All comments, bug reports, suggestions welcome :)

If there's enough interest, a CEF (Chromium) version will follow, but of course keep in mind that resulting applications will be much much bigger (about 100MB for a simple Hello world application, vs 100KB for the current native version).

Author:  Kwai chang caine [ Wed Feb 12, 2020 12:45 pm ]
Post subject:  Re: SWV: A better webview control

If i have good understand, it's not a webbrowser, but a GUI application like PB but create with local HTML5/CSS, you can't go to a site on the web ?
Works great here, thanks for your demonstration 8)

Author:  srod [ Wed Feb 12, 2020 12:59 pm ]
Post subject:  Re: SWV: A better webview control

Works well here on Win 7. Had to change the compiler settings so that the temporary exe is created in the source directory - otherwise the html file is not found.

Very impressive. :shock:

I take it that is using the Trident engine?

Will the chromium version be cross-platform?

Author:  Kiffi [ Wed Feb 12, 2020 1:22 pm ]
Post subject:  Re: SWV: A better webview control

I'm sorry to say it, but SWV scores too low on HTML5test

Image

(Btw: i'm using Windows 10)

CEF would get a higher score, but there is already the PB.Ex WebGadget (Windows) (WebKit) from RSBasic.

Greetings ... Peter

Page 1 of 5 All times are UTC + 1 hour
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/