Elements C++ GUI Library
github.com
github.com
> The GUI should be declared in C++ code.
While I love the declarative aspect of the above, would the authors consider using a different DDL for layouts rather than C++?
The reason I ask is: this now enables creation of wrappers around this library for other languages like Golang and Python.
Also, having the layouts described as plain data rather than C++ code would allow not having to compile for minor UI/layout changes. Which will in turn permit faster prototyping during UI development.
Would the usual competitor to this be JUCE?
JUCE is really painful to use if you want to integrate it into anything modern. It's old, it's slow, and you really can't make it better. I really can't express how much distaste I have for JUCE after shipping multiple products built on it - it solves _one_ hard problem (wrapping AU, AAX, and VST3), other than that it is dog slow and can't be improved because the core devs don't accept outside contribution for no reason except their own hubris.
Any cross platform UI in C++ that isn't JUCE or Qt is highly welcome. Especially one that allows me to pull in external dependencies and use modern build systems, test frameworks, CI/CD, and other tooling.
It seems like those features are out of scope for the library - which is fair, one has to draw the line somewhere, and there are enough success stories with the project that it may not matter to a lot of the people. The author has mentioned in various places it's mostly for internal tools or game dev, which makes sense.
I am glad more toolkits are coming up (both for C/++ and Go, the languages I am interested in writing desktop apps with), but I am a bit surprised Qt seems by _far_ most mature compared to a lot of newer tools, not counting wxWidgets or glade/gtk3.
It's not unsurprising to me that Qt is the most mature. It's the oldest, most widely used, and probably the most well financed...
It really is Qt vs Electron if you want to ship a product that makes money - something I am paying for is expected to have a lot of these "features".
> the most well financed..
I'm interested in seeing if Elements can integrate. WxWidgets has the typical amount of code (more than a little, but not much more) to create one's GUI. There's significantly more than just a GUI, BTW.
I also tried Dear Imgui, but had to back out due to the constant rendering requirement of Imgui, because my applications are already hi-compute and a persistent GUI is required when you're already pushing the CPU without any GUI.
this part has always been clear:
"Should The Qt Company discontinue the development of the Qt Free Edition under the required licenses, then the Foundation has the right to release Qt under a BSD-style license or under other open source licenses. The agreements stay valid in case of a buy-out, a merger or bankruptcy."
I agree behavior lately is not great, and a Qt company in trouble won't be good, but I think the community will pick up quite a bit if it comes to that.
I also think many misunderstand or misrepresent the implications of a GPL only Qt (for closed source applications). It's a matter of linking correctly: https://news.ycombinator.com/item?id=23321448
The issue with the commercial licensing is that if you are a commercial licensee you are contractually prevented from contributing to Qt in some ways. See https://www.qt.io/terms-conditions/ and search for "Prohibited combination". If you are able to comply with the GPL or LGPL components without becoming a licensee, this is better in every way (you get to contribute, you have much more legal safety if the company gets acquired by a hostile entity, you don't have to worry about what happens when your license expires, and of course you save money). So those license terms are actively preventing the Qt company from getting revenue, because you get a worse deal in most ways if you pay them than if you don't. This is why I'm uncomfortable with Qt in non-GPL/LGPL commercial projects. You get trapped and you can't relicense your project to GPL afterwards even if you want to.
At this point the biggest concern for the Trolls (or whoever owns Qt nowadays now) should be that the FUD against GPL is starting to slowly evaporate, so even big companies are starting to use GPLd Qt rather than pay licenses. By the time they go Oracle there will not be much they can do.
https://github.com/McMartin/FRUT
It's meant to convert Projucer to CMake files, but we just create them ourselves. The CMakeLists files come out a bit wonky, but it works.
But you're right, JUCE is more than just a UI.
It seems to have an event loop though:
void app::run()
{
MSG messages;
while (_running && GetMessage(&messages, nullptr, 0, 0) > 0)
{
TranslateMessage(&messages);
DispatchMessage(&messages);
}
}Abusing metaprogramming is always a bad idea.
I just compiled this on windows and a full build after cloning the repo took about a minute.
(Sure there are native APIs for that, but bridging the gap is one of the point of a cross-platform GUI framework, isn't it?)
https://docs.microsoft.com/en-us/windows/win32/controls/trac...
It's probable doable with custom drawing, but that heavily ties the code to the Windows protocol for custom drawing of controls.