Earlier quoted context omitted.
Qt is the most portable GUI library. It can run on bare metal.
Except it doesn't run native controls, at least so far as I'm aware.
Libui: a portable GUI library for C
91–100 of 164 posts
Re: Libui: a portable GUI library for C
#92On Unix this seems to map to GTK+, so I guess it's a bit like wxWidgets then? Interesting but since GTK+ itself is cross-platforms it feels a bit heavy to wrap it.
Only in theory. It does not look and behave even close to native anywhere except on GNOME 3 with default settings.
Re: Libui: a portable GUI library for C
#93Earlier quoted context omitted.
Qt is the most portable GUI library. It can run on bare metal.
Except it doesn't run native controls, at least so far as I'm aware.
Can you tell the difference? https://3.bp.blogspot.com/-O1Naap_IGVQ/VGJsRBEfQjI/AAAAAAAAA...
Re: Libui: a portable GUI library for C
#94Earlier quoted context omitted.
I think GTK is an excellent library for C. If you use Glade and GTKBuilder, you don't have to write the boilerplate either. You design you UI in Glade visually, add your signals, set your id's etc. Then you save your design as an XML file. In your C code you load that design with a simple function, then assign the function names for the signals you've created in the visual designer. Then you're all set to go. The lib…
The UI's look like garbage on anything non linux though.
Re: Libui: a portable GUI library for C
#95A lot of the comments have mentioned the lack of documentation this project has, and then they've received replies of the form "you should submit a pull request, the author doesn't owe you anything". Here's my take on it: I don't owe the author anything either. But if I'm considering which project to use, I'd probably choose the one with documentation, since it signals better goals and higher code quality. It's absur…
I work for many years with FFMpeg that has no documentation and no code sample, and it's okay for me. I prefer that the developers keep their time optimizing the code rather than writing documentation that needs to be maintained and become a problem when not in sync. My state of mind is that if it's open source then just read the code.
Re: Libui: a portable GUI library for C
#96A lot of the comments have mentioned the lack of documentation this project has, and then they've received replies of the form "you should submit a pull request, the author doesn't owe you anything". Here's my take on it: I don't owe the author anything either. But if I'm considering which project to use, I'd probably choose the one with documentation, since it signals better goals and higher code quality. It's absur…
I work for many years with FFMpeg that has no documentation and no code sample, and it's okay for me. I prefer that the developers keep their time optimizing the code rather than writing documentation that needs to be maintained and become a problem when not in sync. My state of mind is that if it's open source then just read the code.
Re: Libui: a portable GUI library for C
#97A lot of the comments have mentioned the lack of documentation this project has, and then they've received replies of the form "you should submit a pull request, the author doesn't owe you anything". Here's my take on it: I don't owe the author anything either. But if I'm considering which project to use, I'd probably choose the one with documentation, since it signals better goals and higher code quality. It's absur…
Documentation is so important if you want to get people interested in your project. Personally, I value good documentation above features because without documentation I may never learn how to use your features and may never get started using the project. If I never use your project then there’s zero chance that I will contribute. Or, like above, I do, but run out of steam really quickly and lose interest.
Re: Libui: a portable GUI library for C
#98Earlier quoted context omitted.
Documentation is part of code quality.
That's rarely been my experience. In fact, documentation usually exists because code quality is poor and it needs to be explained.
In my opinion, good documentation has three parts (four if you include a tutorial too):
First is a document explaining rationale, high level/big picture design, tradeoffs, when to use what. Usually a prose document with some sample code snippets where appropriate. Second, example code showing how to solve different use cases. Finally, an api reference (often auto generated from docstrings).
Different projects need different levels of each of these. For example, a relatively simple library might get away with a few short paragraphs for the prose documentation and maybe the api reference is literally just listing the public functions (if the names and parameter names are descriptive), this can be generated without any additional markup. If the api is complex, then it may need some explanation. Or the text documentation needs to be more detailed.
Obviously I don’t expect this from everyone who release some code online. For small code snippets, I’m happy with a commented example use and appreciative that you released the code at all. However, don’t be surprised if your code doesn’t get used then and if you want me to contribute, then I need to understand your project and without documentation I can’t do that. If I don’t understand your project, I risk that any PR I do is wasted effort and my time is limited (but I’ll happily help projects I use out regardless, where I can. I may need some guidance though)
Re: Libui: a portable GUI library for C
#99 void uiGridInsertAt(uiGrid *g, uiControl *c, uiControl *existing, uiAt at, int xspan, int yspan, int hexpand, uiAlign halign, int vexpand, uiAlign valign);
The overall feeling is that it’s a [small] subset of GTK. I think they try to fill an empty cross-platform niche between lightweight and native-looking Tk and heavies like GTK and Qt. Doc could explain how is that better than Tk itself, but it has to be written. The other possibility is that they do it for fun and distinctive use cases are shallow – this is often seen in second order ui kits.Re: Libui: a portable GUI library for C
#100So what I can understand this is "just" a wrapper for existing GUI frameworks? Why is this better than just using GTK that already is portable?
Writing a GTK UI for macOS, for example, will make the interface look very different to the look and feel that the operation system is offering. If you use a library like libui, the ABI is the same for every major operating system, but the result matches what the OS is using. If you don't care about the look and feel of the interface then I guess this library is not for you. As someone who is responsible for maintain…