Browser In A wxNotebook Tab

If you have a cool piece of software to share, but you are not hosting it officially yet, please dump it in here. If you have code snippets that are useful, please donate!
User avatar
archman007
Experienced Solver
Experienced Solver
Posts: 52
Joined: Mon Jan 13, 2020 1:06 pm

Browser In A wxNotebook Tab

Post by archman007 » Mon May 10, 2021 2:16 pm

I have started a a new project that will make a web browser function in a wxNotebook tab. I welcome all to review and improve the offered code base.

https://github.com/archman007/Browser-In-A-Tab

This post will serve as a documentation center for the project.

https://archbrooks.us/b4/2021/05/10/browser-in-a-tab/

wxWidgets 3.1.5 is the version for this project.

Thanks is advance for your participation.

Arch

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

Re: Browser In A wxNotebook Tab

Post by doublemax » Mon May 10, 2021 4:29 pm

Sorry, but what exactly does this do? Having a wxWebView instance as tab in a wxNotebook shouldn't be anything special.
Use the source, Luke!

User avatar
archman007
Experienced Solver
Experienced Solver
Posts: 52
Joined: Mon Jan 13, 2020 1:06 pm

Re: Browser In A wxNotebook Tab

Post by archman007 » Mon May 10, 2021 7:17 pm

There are many functions to complete the project. To go into all the details would be an overall obfuscation of the project. I intend for the participants to add solutions incrementally. This approach will allow for modularization of development.

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

Re: Browser In A wxNotebook Tab

Post by doublemax » Mon May 10, 2021 7:57 pm

Maybe potential participants are as confused as me ;)

Is this a component others can use in their application? Or is it a stand-alone application?

You must have a general idea about what the end goal is.
Use the source, Luke!

User avatar
archman007
Experienced Solver
Experienced Solver
Posts: 52
Joined: Mon Jan 13, 2020 1:06 pm

Re: Browser In A wxNotebook Tab

Post by archman007 » Mon May 10, 2021 10:33 pm

The reason for the modular design offers dialog's which may be reused in other applications.

Once the browser is operational MySQL will be employed to store web page links and descriptions into data tables.

A monolithic application is a relic of by gone coding era.

PB
Part Of The Furniture
Part Of The Furniture
Posts: 3041
Joined: Sun Jan 03, 2010 5:45 pm

Re: Browser In A wxNotebook Tab

Post by PB » Tue May 11, 2021 6:29 am

I have to admit that even after reading the posts twice, I have no idea what is the project goal and its audience.

Still, using MySQL for storing browser info seems like overkill. Possible licensing issues aside, AFAIK, the two major browsers use SQLite for this which seems a better fit.

User avatar
archman007
Experienced Solver
Experienced Solver
Posts: 52
Joined: Mon Jan 13, 2020 1:06 pm

Re: Browser In A wxNotebook Tab

Post by archman007 » Tue May 11, 2021 1:17 pm

Please do not overthink this project. Initially the first goal is to activate a web browser in a wxNotebook tab. After this task is completed we will proceed forward.

The RDBMS of choice is MySQL and that is not an option.

The table to store web links is not the only usage for the RDBMS. SQLite is not multi user.

User avatar
archman007
Experienced Solver
Experienced Solver
Posts: 52
Joined: Mon Jan 13, 2020 1:06 pm

Re: Browser In A wxNotebook Tab

Post by archman007 » Tue May 11, 2021 1:56 pm

I find it interesting that some individuals take the "my way or the highway" approach to software development. To be so rigid stifles creativity. I assure you there are more ways to accomplish goals than employing narrow minded approaches.

PB
Part Of The Furniture
Part Of The Furniture
Posts: 3041
Joined: Sun Jan 03, 2010 5:45 pm

Re: Browser In A wxNotebook Tab

Post by PB » Tue May 11, 2021 2:47 pm

I do not understand how asking the most basic question about a project: its goal and its audience "stifles your creativity".

But I guess an individual like me cannot even imagine to understand hefty ideals like yours, certainly supported by a portfolio of your released, groundbreaking, and widely popular software. ;) TBH, I do not even understand who are those "we" you keep talking about (assuming it is not a royal we).

FWIW, I have never pretended to be anything else but a layman, if it comes out otherwise, blame it on my poor English.

User avatar
archman007
Experienced Solver
Experienced Solver
Posts: 52
Joined: Mon Jan 13, 2020 1:06 pm

Re: Browser In A wxNotebook Tab

Post by archman007 » Wed May 12, 2021 2:46 pm

That is fine. Everyone is entitled to their opinion.

AmadeusK525
Knows some wx things
Knows some wx things
Posts: 49
Joined: Wed Aug 19, 2020 12:04 am

Re: Browser In A wxNotebook Tab

Post by AmadeusK525 » Fri May 14, 2021 12:58 am

Sorry, but you're coming off in a really bad way here. You have not really answered the simple questions asked and got mad about it. I don't understand the project either, shouldn't adding the wxWebView be trivial? If that is really the objective, then the project is meaningless, because, AFAIK, it should be as simple as adding any other control to the wxNotebook. You shouldn't try and assume people are trying to devalue your work just because they don't understand its purpose.

User avatar
archman007
Experienced Solver
Experienced Solver
Posts: 52
Joined: Mon Jan 13, 2020 1:06 pm

Re: Browser In A wxNotebook Tab

Post by archman007 » Fri May 14, 2021 12:14 pm

Since adding the wxWebView is so trivial why has no one offered the code to do so. To only criticize and provide zero help "comes off in a really bad way here" AFIK. Since the few detractors have offered zero assistance but insist on knowing a long plan that may be nonexistent is counter productive. To insist there is a motive beyond the question I propose is assumptive. Everyone knows the decomposition of the acronym of assume. Have a great day.

PB
Part Of The Furniture
Part Of The Furniture
Posts: 3041
Joined: Sun Jan 03, 2010 5:45 pm

Re: Browser In A wxNotebook Tab

Post by PB » Fri May 14, 2021 12:45 pm

As you were told several times: Adding a wxWebView to a wxNotebook is no different to adding any other control to it, so there is no need to demonstrate it.

If you find this unbelievable, here is a simple but fully compilable and runnable program doing that, in less than 20 lines of code:

Code: Select all

#include <wx/wx.h>
#include <wx/notebook.h>
#include <wx/webview.h>

class MyApp : public wxApp
{
public:
    bool OnInit() override
    {
        wxFrame*    frame = new wxFrame(nullptr, wxID_ANY, "Test", wxDefaultPosition, wxSize(800, 600));
        wxNotebook* notebook = new wxNotebook(frame, wxID_ANY);

        notebook->AddPage(wxWebView::New(notebook, wxID_ANY, "https://www.example.com"), "example.com");
        notebook->AddPage(wxWebView::New(notebook, wxID_ANY, "https://www.wxWidgets.org"), "wxWidgets.org");

        frame->Show();
        return true;
    }
}; wxIMPLEMENT_APP(MyApp);
Of course, if your goal is creating a web browser in wxWidgets, e.g. something like Microsoft did with the Chromium-based Edge... That is not only an entirely different discussion but also a futile project, as this would require a large team of full-time working developers (not to mention there is probably not market for this).

TBH, your bold yet vague statements sound like you were trying to start a religion, not a software project.

User avatar
archman007
Experienced Solver
Experienced Solver
Posts: 52
Joined: Mon Jan 13, 2020 1:06 pm

Re: Browser In A wxNotebook Tab

Post by archman007 » Fri May 14, 2021 1:41 pm

How can you be sure that I make "bold but vague statements" when you have not even reviewed the code I have provided with the project. https://github.com/archman007/Browser-In-A-Tab My request is simple but the arogance of the respondents is over the top.

"Start a religion"? BOL :lol:

The example you provided is of little value since you did not follow the the project code I provided for you. A shot fired from the hip is no gurantee you will hit the desired target. [-X

Your offering is useful to whom? It does not even address the so called simple solution to the project I am referring to.

Please note the project was developed with wxSmith and the generic model you provided in not even close to what is needed.
Last edited by archman007 on Fri May 14, 2021 2:20 pm, edited 1 time in total.

AmadeusK525
Knows some wx things
Knows some wx things
Posts: 49
Joined: Wed Aug 19, 2020 12:04 am

Re: Browser In A wxNotebook Tab

Post by AmadeusK525 » Fri May 14, 2021 2:10 pm

What?? He literally just gave you the code and you didn't accept it! Maybe you have misunderstood things. wxWebView is an existing control that works as a browser in any wxWidgets application, just like a wxButton or wxListCtrl or any other. It is a (mostly) fully working browser and you can use it as you wish. Adding it to a wxNotebook is, as we've said, no different than adding ANY OTHER CONTROL to it, with wxNotebook::AddPage(). My only guess is that you didn't know there was a wxWebView control, which is a browser, and so you intended to code THE browser itself and then add it to wxNotebook, because if not I can't figure out what your point is. Maybe wxSmith doesn't accept adding a wxWebView directly to a wxNotebook, but then that is a problem with wxSmith, since you can do it very trivially with hand-written code (which is basically always better than GUI-builder applications). I hope the negativity in this thread can end, but please don't assume we're responding with bad intent, we have never done that and you, thinking we have, always answer in an angry way and miss the point of the questions asked, thus making this a cycle of questions asked but no questions answered.

Post Reply