wxWebView as GUI for application / program ?

This forum can be used to talk about general design strategies, new ideas and questions in general related to wxWidgets. If you feel your questions doesn't fit anywhere, put it here.
Post Reply
Obelix
Earned a small fee
Earned a small fee
Posts: 10
Joined: Mon Jan 02, 2017 4:19 pm

wxWebView as GUI for application / program ?

Post by Obelix » Fri Sep 22, 2017 5:21 pm

I want not native look application therefore my question is, can I use wxWebView for whole GUI? Then I write gui only in Html/CSS and maybe JS. It is possible?
And can I manipulate from C++ something inside wxWebView? For example moving rectangle, or anything inside wxWebView.

User avatar
doublemax
Moderator
Moderator
Posts: 14895
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: wxWebView as GUI for application / program ?

Post by doublemax » Fri Sep 22, 2017 8:49 pm

It may be possible, but i think it would be unnecessarily complicated. If you want to build an app using HTML/CSS/JS, i would suggest something like electron: https://electron.atom.io/
Use the source, Luke!

Obelix
Earned a small fee
Earned a small fee
Posts: 10
Joined: Mon Jan 02, 2017 4:19 pm

Re: wxWebView as GUI for application / program ?

Post by Obelix » Sun Sep 24, 2017 9:17 am

Thanks for info, I know about Electron, but I looking for C++ solution. C++ can be used in electron but I it is maybe too complicated. But I found webtoolkit which is tools for creating web apps with C++. It is look like only web, that means you run program throught web browser. What you think about this combination wxWidget as window system to display webBrowser and WT as whole program?
If you want more info about wt

User avatar
doublemax
Moderator
Moderator
Posts: 14895
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: wxWebView as GUI for application / program ?

Post by doublemax » Sun Sep 24, 2017 9:40 pm

Interesting, i didn't know about webtoolkit. Unfortunately its license makes it unsuitable for my purposes.

But if i understood its concept correctly, i don't know why you'd need wxWidgets at all.
Use the source, Luke!

Obelix
Earned a small fee
Earned a small fee
Posts: 10
Joined: Mon Jan 02, 2017 4:19 pm

Re: wxWebView as GUI for application / program ?

Post by Obelix » Mon Sep 25, 2017 8:27 am

Because WT don't have window system (I didn't find any mention about windowing in documentation), only in browser. And I want my application run in window, and wxWidget can do that.

User avatar
evstevemd
Part Of The Furniture
Part Of The Furniture
Posts: 2292
Joined: Wed Jan 28, 2009 11:57 am
Location: United Republic of Tanzania
Contact:

Re: wxWebView as GUI for application / program ?

Post by evstevemd » Thu Sep 28, 2017 6:51 am

Obelix wrote:Because WT don't have window system (I didn't find any mention about windowing in documentation), only in browser. And I want my application run in window, and wxWidget can do that.
How does WT interact with browser? Does it act as a server? Knowing how it interacts with other browsers will help us figure out how to help with wxWidgets case.
Chief Justice: We have trouble dear citizens!
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
[Ubuntu 19.04/Windows 10 Pro/MacOS 10.13 - GCC/MinGW/Clang, CodeLite IDE]

Obelix
Earned a small fee
Earned a small fee
Posts: 10
Joined: Mon Jan 02, 2017 4:19 pm

Re: wxWebView as GUI for application / program ?

Post by Obelix » Thu Sep 28, 2017 9:28 pm

evstevemd wrote: How does WT interact with browser?
I don't tried WT yet.
evstevemd wrote: Does it act as a server?
From their website info, yes.

User avatar
evstevemd
Part Of The Furniture
Part Of The Furniture
Posts: 2292
Joined: Wed Jan 28, 2009 11:57 am
Location: United Republic of Tanzania
Contact:

Re: wxWebView as GUI for application / program ?

Post by evstevemd » Sat Sep 30, 2017 2:50 pm

Obelix wrote:
evstevemd wrote: Does it act as a server?
From their website info, yes.
In that case it should be easy. You will have to compile your WT app as separate executable full with dependencies. Then you will have your Main UI written in wxWidgets with two parts
1. The Part that manages the WT app. wxWidgets profiles a lot of classes for that. Check out wxExecute function with wxProcess class
2. The main UI that consists of your web browser app (wxWebView) that loads wxWebView to port and IP that WT app was strated.

Starting with such basic app, you can expand it as you wish.
HTH
Chief Justice: We have trouble dear citizens!
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
[Ubuntu 19.04/Windows 10 Pro/MacOS 10.13 - GCC/MinGW/Clang, CodeLite IDE]

Obelix
Earned a small fee
Earned a small fee
Posts: 10
Joined: Mon Jan 02, 2017 4:19 pm

Re: wxWebView as GUI for application / program ?

Post by Obelix » Wed Oct 04, 2017 8:53 am

Thanks, I started learning wxWidgets.

Post Reply