News for hackers. Stuff that matters.
Re:Nana: A modern C++ GUI library by Const-me on Saturday April 20, 2019 @08:42PM (#19709845)
> you will come up to the need of separate style definition entity almost immediately

Not necessarily. As always with software design, there’re tradeoffs involved.

Separate styles work when the stuff you’re styling is content to consume, not rich GUI to edit/produce. For rich GUI that works well on every platform you need different structure, not just different styles.

Separate styles work when the devices are not too different. If they are very different, like PC and smartwatch, you probably need different structure even for readonly content.

There’re frameworks/design patterns, like MVVM for XAML, MVC for iOS and old-school web, where you can replace complete views while reusing the rest of the app.

Re:Nana: A modern C++ GUI library by c-smile on Saturday April 20, 2019 @09:00PM (#19709913)
> For rich GUI that works well on every platform you need different structure, not just different styles.

Why do you need such "modern C++ GUI library" then?

Check my Sciter Notes. Screenshots of the application for each platform are on its frontpage: https://notes.sciter.com/

This application uses the same UI definitions on any platform (https://github.com/c-smile/sciter-sdk/tree/master/notes/res) and the same C++ code.

Re:Nana: A modern C++ GUI library by Const-me on Sunday April 21, 2019 @02:08PM (#19713536)
> the same UI definitions on any platform

Very nice library! But you only support PCs. You have same structure, and same UX (mouse+keyboard, relatively large screen) on all of them, you only need to adjust for DPI scaling, and for window resize.

About hardcoded pixel sizes, sometimes they’re OK. Apple did that in iOS, worked well for them. When they released iPhone 4, they just doubled the DPI. And when they released iPad, they made developers replace complete views and it made sense because it was much different UX.

I’m not saying that library is good. Apple has separate UI markup language, and they have decent UI designer in XCode for that. The feature is IMO required for a modern GUI framework and it’s missing in Nana.

Also, GPU-based rendering is nice to have nowadays, see MS XAML or Google Flutter.

I once needed to create rich GUI for embedded Linux app on top of essentially raw hardware, drm, kms, gles. I’ve compiled C shared library exposing some wrappers around NanoVG API https://github.com/memononen/nanovg then implemented touchscreen input, controls, styles and animations in C# using .NET core. Worked well for my requirements.

Re:Nana: A modern C++ GUI library by qPCR4vir on Tuesday April 23, 2019 @08:43PM (#19734518)
modern C++ refers to c++14/17, etc. and current recommendations to program in c++, not to modern style in web design. Your affirmation is that there is no hope for c++ programmers wanting to write a "simple" desktop application other than learn web design/programming just to build a functional GUI?
Re:Nana: A modern C++ GUI library by pknopf on Saturday April 20, 2019 @09:42PM (#19710054)
Is the source for Sciter available?
Re:Nana: A modern C++ GUI library by neurocline on Sunday April 21, 2019 @01:51AM (#19710713)
It looks like it’s on Github (link from the Sciter Downloads page).
Re:Nana: A modern C++ GUI library by pknopf on Sunday April 21, 2019 @10:49AM (#19712285)
It looks like it's just pre-compiled libs.