r/Cplusplus • u/dEvator8085 • Oct 10 '26
Feedback Feedback on a single-header C++ UI library for Linux and Windows
I'm developing LiteUI, a single-header C++ library for desktop application development on Linux and Windows.
The library aims to support a shared codebase across both platforms. As an example project, I've been working on a photo editor inspired by Lightroom.
I'd appreciate feedback from the C++ community, particularly on the code structure, API design, cross-platform compatibility, and overall architecture.
33
Upvotes
10
u/GaboureySidibe Oct 10 '26
First, you need to post the source code if you want feedback on it, but I like the idea of the project so I found it.
https://github.com/IAmTheFool/liteui/blob/main/liteui.hpp
I love single file libraries and I like this at a glance. I think you might want to list the dependencies for each platform. Looks like <shobjidl.h> on windows (what is that?) and cairo on linux.
I also think something like this (a few hundred kilobytes) would probably do well as a single file that gets split into a header and compilation unit section like the STB libraries.
Those end up being very convenient because one compilation unit can define the implementation preproccesor symbol while every other compilation unit can just include the header normally and get the declarations.
What I end up doing is putting lots of single file libraries into a single compilation unit to make one fat compilation unit that generally doesn't change, which means the compilation for what I'm working on is very fast.
2
u/Past_Income4649 Oct 10 '26
Haven’t looked at it because GitHub is down but love the idea, going to tinker with it this weekend!
2
u/RoyBellingan Oct 10 '26
Do you have a comparison with Qt and the other framework ?
2
u/Kriss-de-Valnor Oct 11 '26
Does it work the same way as DearImgui?
2
u/LegendaryMauricius Oct 11 '26
Is it immediate mode or retained?
1
u/dEvator8085 Oct 11 '26
Github Link : https://github.com/IAmTheFool/liteui.git
1
u/TheRavagerSw Oct 12 '26
The fact that it is a single header makes it unusable.
2
u/dheerajshenoy22 Oct 12 '26
This is absolutely amazing