- All those naked 'new's in the example make me nervous. I see that the library uses exceptions, if one of the widget constructor throws while composing the overall widget hierarchy, it would leak memory.
You should be able to make it work with a value-based interface and allocating behind the scenes (this would also enable a few optimization opportunities).
- Since it's cited as cross-platform, including non-Windows screenshots would be helpful https://github.com/brisklib/brisk#screenshots
Also, I wasn't able to readily find any information about keybindings for the widgets, e.g. the way some frameworks use "&Monday" to make alt-m act on that checkbox https://github.com/brisklib/brisk/blob/v0.9.3/examples/showc...
I did see your "unhandled" event handler doing its own keybinding dispatch <https://github.com/brisklib/brisk/blob/v0.9.3/examples/calc/...> but I hope that's not the normal way to do keybinding
- While I welcome new cross-platform GUI Frameworks, I wonder why not use a declarative UI similar to QML? Even Slint[1] (which is built in Rust) uses such syntax for its UI.
- This looks really good. It's nice to see some options like this (and slint) appearing for cross-platform desktop GUI. I'm pretty skeptical of "modern" c++ but this looks like a good example of using it where it makes sense.
The data binding looks particularly clever. That's usually the Achilles heel of GUI toolkits (for me at least) and that looks like a clever and novel solution if it works.
- How well integrated with the underlying platform is it? For example, on Windows do you take advantage of accessibility APIs for things like screen readers?
- "However, for those who wish to use Brisk in proprietary or closed-source applications, a commercial license is also available."
Unfortunately there is no public information on the pricing.
- As someone who lives and breathes QT at the moment - what would you says the main differences are? What does Brisk offer that QT doesn't and vice-versa?
Though unfortunately since it's not lGPL or MIT, it doesn't look like I could use it anyways.
- I spent a very long time giving SolveSpace a native Haiku UI. I'm going to keep doing this kind of thing because there's nothing I personally dislike more than apps that don't use the platform's native UI.
I don't care that my approach is harder for the developer, because the thing I care about is consistency and convenience for the user.
I know the thing you built is neat (I've spent quite a few years working on almost the same thing), but I guess this is why I gave up on pushing my own solution
- If you are going for declarative UIs, please consider using a separate file for storing the UI and a "code behind" which is the C/C++ source file for that screen. This external file can be written in a form suitable for IDEs to read/write the form properties including all of the components in the form in the hierarchy in which they are put in during the design of the form.
The powerful approach used by Delphi for this is something I have never seen any other language use - where you could create your own components and these components could persist their properties into this external file used for storing the details about the form. So when the IDE loads the design from the external file, it would call the components to read the properties from the file to repopulate itself. This allowed for very powerful and deep components to be developed in Delphi
- I don't want to be a party pooper here, but, I am so that's how it comes out. In code declaration of user interfaces was old hat in Qt, and wxWidgets Why no interpreter? Recompiling to fritz with UI is just a bore.
- Nice to see someone taking a swing at a C++ GUI framework. Implementing a real on is not for the weak. If it's really works, it'll be expensive to license.
- I've only dabbled a bit in 3D graphics (OpenGL, THREE.js, swift SceneKit). When these 2D GUIs say "GPU-accelerated", does that mean they are doing the same thing you would do for 3D - build triangular meshes, materials, etc - and then just essentially point an orthographic camera at this "scene"? Or what kind of low-level GPU APIs (eg WebGPU) are used?
- My friend and I used to build a cross platform UI library in OCaml called… brisk. We didn’t make it production ready so i am sure the naming is a coincidence https://github.com/briskml/brisk.
- The one thing I have to wonder is:
I use Qt myself and one of the best things about the framework and toolkit is the UI tooling that allows me to drag and drop and visually create my UIs in the UI Designer app.How many people really want to spend time programming their UIs?I find that for any non-trivial application this type of boilerplate is best done with good tooling that just works and lets the UI to be knocked up fast and efficiently.
I also wrote an UI system for my game engine but it's completely drag & drop in the editor. Styling (skinning) is also via UI builder.
Source:
https://github.com/ensisoft/detonator/tree/master/uikit
Live demo:
https://ensisoft.com/demos/ui/game.html
Question, how do you handle arbitrary clipping masks ? In my solution clipping masks require evaluating all the widget parent's clipping rects and writing them to stencil buffer before rendering the current widget. This is unfortunately quite slow...
- I'll wait for the new gen of developers to re-discover WYSIWYG cross-platform GUI frameworks such as C++ Builder / Lazarus / Delphi like we had in the 90s
- Nice project! Do you think you'd ever support a "live preview" or "hot reloading" of the UI or is that beyond the scope of the project?
- To make it really declarative and exception safe, you need to wrap widget creation in function and return smart pointer.
- Great job, looks like a huge amount of work.
- Very nice, can't wait if you could make it compatible with a Python3 wrapper.
- Incredible to see people working on this so kudos
Why would someone use C++ and not Rust in 2024? Familiarity and experience?
- I see that WebGPU is used so it is a good candidate for being tried in https://exaequos.com, the OS I am creating and that fully runs in the web browser
Brisk is an open-source C++ GUI framework with a declarative approach, offering powerful data bindings, GPU-accelerated graphics, and dynamic widget management. It supports macOS, Linux, Windows, and simplifies UI creation with modern paradigms and CSS-like layouts.
Initially developed for a graphics-intensive project with a complex and dynamic GUI, the framework is currently under active development.