128 points · by turrini · 6y ago · 45 comments
> 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.
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.
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?)