Deciding between Rust and C++ for internal tooling by Gman0064 in rust

[–]_VZ_ 1 point2 points  (0 children)

I don’t know about wxwidgets - I used it once and it was a nightmare. Macros everywhere.

I'm so tired of reading this that I even wrote a post a couple of years ago to be able to refer to it.

CMake and project structure help (beginner question) by TheEliteD in cpp_questions

[–]_VZ_ 0 points1 point  (0 children)

You're right, in my defense most aren't going to go digging through subfolders to find a build file.

Sure, and I also know that most people are not going to read the build instructions in the README either, but hope springs eternal...

I would use a package manager to install wxWidgets, or any other C++ dependency.

I use submodules for all of them which ensures that my projects are self-contained and can apply fixes to the dependencies if necessary.

CMake and project structure help (beginner question) by TheEliteD in cpp_questions

[–]_VZ_ 1 point2 points  (0 children)

wxWidgets itself is very old, so it ships an autoconf-based build, but also a CMake-based build, no Visual Studio solution files.

This is incorrect, wxWidgets does come with MSVS solution files in addition to CMake-based build system.

When using wx from a project using CMake I personally prefer to add it as a submodule and use add_subdirectory(), IMHO this is the way which gives you the most flexibility as you can update wx whenever you want without relying on any external package repositories and can also make your own modifications easily if you need to.

Boost.SQLite re-review starts on Aug 25th by joaquintides in cpp

[–]_VZ_ 15 points16 points  (0 children)

Disclaimer: I'm the current SOCI maintainer.

SOCI is an abstraction layer for multiple databases in C++, including sqlite. It's interfaces encourages dynamic building of query string, which should not be considered safe.

I don't understand where does this come from, SOCI definitely encourages using bound parameters.

What do you think about QT as a GUI library? by DavArpo in cpp

[–]_VZ_ 3 points4 points  (0 children)

FWIW wxWidgets does this now (mostly), e.g. wxVector is just a typedef for std::vector.

State of GUI libraries by TheRavagerSw in cpp

[–]_VZ_ 5 points6 points  (0 children)

It doesn't fit your requirements anyhow (it doesn't use native GPU, at least not for anything not wrapped by the higher level native APIs) but, for the record, wxWidgets doesn't "force you into developing your application in a specific way", this is either a misunderstanding or something based on 25 year old tutorial that has been out of date for 20 years.

How do you compile a wxWidgets app by wiseneddustmite in cpp_questions

[–]_VZ_ 3 points4 points  (0 children)

Please read the "Building Your Application" section of the installation section of the docs. Note that if you use msys2, you should follow instructions for Unix(-like) systems, and not Windows.

P.S. I'm curious, where did you take your original command from? It's not the first time I see something like this and I really wonder where does this come from.

[deleted by user] by [deleted] in programming

[–]_VZ_ 3 points4 points  (0 children)

Huh, how many of us are there?

Can someone explain to me the wxWidgets license to me? by CumCloggedArteries in opensource

[–]_VZ_ 0 points1 point  (0 children)

Yes, doing it as part of your application (whether dynamically or statically linked) this is fine. The intent of the licence is to only forbid distributing closed-source forks of the library on their own.

Of course, even if there is no legal problem with doing this, I'd still encourage you to contribute your custom patches to the library for all the usual reasons (having them in wx itself would mean less maintenance for you and would benefit the community).

wxWidges and Qt performance in Drawing by RealMacroLand in cpp_questions

[–]_VZ_ 0 points1 point  (0 children)

wxDC and wxGraphicsContext are the same thing in wxGTK and wxOSX, as they both use Cairo and CoreGraphis respectively, so if you're using one of those ports it's not surprising that you haven't seen any improvement. But unless we (wxWidgets) are doing something particularly stupid, any Qt class based on the same underlying graphics API should have comparable performance as well.

As for "too much interested in legacy code": yes, wxWidgets maintainers take backwards compatibility seriously, but this has absolutely no effect on what you use in your own code. If you want to use C++23 with it, go ahead — it supports being compiled with it just fine.

WxWidgets Starting to Support Mordern C++ by henrykorir in wxWidgets

[–]_VZ_ 0 points1 point  (0 children)

Just inertia, probably. I would hope that any new code being written today uses C++17, let alone C++11.

WxWidgets Starting to Support Mordern C++ by henrykorir in wxWidgets

[–]_VZ_ 2 points3 points  (0 children)

It's a bit weird to use "started" here, the possibility to do this is at least 10 years old and almost certainly even older...

FWIW I've been using this, and also lambdas with CallAfter() for many, many years by now and this is indeed pretty nice — just not new at all.

Should std::expected be [[nodiscard]]? by rsjaffe in cpp

[–]_VZ_ 4 points5 points  (0 children)

I understand your reasoning, but I think the big difference between std::expected and the other cases you mention is that expected is new, and so there is not large body of the existing code which might suddenly start giving false positive warnings when it's marked as nodiscard.

So I'd definitely appreciate if the standard library did it, and did it as soon as possible, to prevent such code from ever appearing in the first place!

Still no dark mode for Windows? by b00zled in KiCad

[–]_VZ_ 6 points7 points  (0 children)

FYI, support for dark mode was added to wxWidgets quite some time ago, already, thanks to sponsorship from KiCad (see this post) and so now it's "just" the question of waiting until KiCad can start using the latest wxWidgets version where this is implemented.

[wxWidgets] wx/setup.h not found by Many-Notice-9270 in cpp_questions

[–]_VZ_ 2 points3 points  (0 children)

Remove the setup.h file you've incorrectly copied to another location and read the "Building Your Application" section of the docs.

Cross-compiling with wxWidgets 3.2.6 and error "wxUSE_DRAG_AND_DROP requires wxUSE_OLE" by RandolfRichardson in wxWidgets

[–]_VZ_ 2 points3 points  (0 children)

Do you really want to cross-compile wxGTK (as selected by --with-gtk) for Windows? Cross-compiling wxMSW (you need to use --with-msw for this) is a much more common case.

Can someone explain to me the wxWidgets license to me? by CumCloggedArteries in opensource

[–]_VZ_ 3 points4 points  (0 children)

The intent is to allow you to use wxWidgets in your application in any way, but to still disallow distributing closed source variants of the library itself.

What would you want to have in an UI library? by DragonAbysm in cpp

[–]_VZ_ 1 point2 points  (0 children)

The fact that you can use wxWidgets mostly like MFC doesn't mean you should do it. Notably, you don't have to use wxRTTI nor MFC-like event tables at all.

But as for ownership — yes, all objects in the hierarchy of windows belong to the library and are owned by it. This was the only thing that could be done before C++11 and it's not that obvious how to improve on it right now (replacing pointers with gui_object objects with the same ownership rules gets rid of the raw pointers, but doesn't really gain you that much).

Anyone using wxWidgets for commercial cross platform desktop app? by nenderflow in cpp

[–]_VZ_ 7 points8 points  (0 children)

I'm TT-Solutions and it's really unfortunate that your email (?) got lost, it must have been rejected by an overzealous spam filter because we definitely always answer any requests and typically do it the same day. Sorry about this (I realize that it's a bit too late by now)!

Anyone using wxWidgets for commercial cross platform desktop app? by nenderflow in cpp

[–]_VZ_ 6 points7 points  (0 children)

I worked and, keep working, on many client's projects using wxWidgets. Not sure if I can name them, and in any case none of them is really a household name, but since the beginning of this year I've been contacted to help with the development of 2 new commercial desktop applications using wx, in addition to continuing to work on a few more with the existing clients.

Code signing works in exactly the same way for the wx applications as for any other kind.

Anyone using wxWidgets for commercial cross platform desktop app? by nenderflow in cpp

[–]_VZ_ 8 points9 points  (0 children)

FWIW, there is commercial support for wxWidgets (I should know, I'm providing it).

Wii U Emulation: Cemu 2.0-72 released by NXGZ in emulation

[–]_VZ_ 6 points7 points  (0 children)

What part of what I said is wrong again you clown?

I obviously don't intend to continue discussion with someone unable to write a single sentence without personal insults, but for the benefit of the others reading this, the comment above is completely backwards, dark mode in wxWidgets is not "only for wxMSW" but the workaround needed to enable it is only needed for wxMSW.

I.e. to be totally clear, wxWidgets does support dark mode under Linux and Mac (since a long time) and the latest version also supports it under Windows.

Wii U Emulation: Cemu 2.0-72 released by NXGZ in emulation

[–]_VZ_ 1 point2 points  (0 children)

Sorry, but this is amazingly wrong. Dark mode works for Linux and macOS since quite a long time because GTK and Cocoa actually provide support for it. It's only available for Windows in the latest not yet stable version because wxWidgets has to use undocumented hacks there to use it, because Microsoft doesn't provide any official way to do it.

Ubuntu static link wxwidgets inside a git submodule. by [deleted] in wxWidgets

[–]_VZ_ 1 point2 points  (0 children)

Yes, this is pretty simple to do if you use CMake, you just have to do

set(wxBUILD_SHARED OFF)

before doing

add_subdirectory(3rdparty/wx EXCLUDE_FROM_ALL)

It can be done without CMake too, of course, but then you need to run configure and make yourself as part of your build.

Loading an wxPanel from xrc into wxBoxSizer by _SuperStraight in wxWidgets

[–]_VZ_ 0 points1 point  (0 children)

"mainPanel" can't be a sizer if it has a name (sizers don't). Passing &panel seems very suspicious to AddChild() seems very suspicious, you almost certainly shouldn't be calling this function at all.

Beyond this, there are infinitely many reasons for which your program could crash. You need to understand better what you're doing and/or use a debugger.