Author Topic: LibUI Multi-Platform GUI&Gfx Library  (Read 3843 times)

Mike Lobanovsky

  • Guest
LibUI Multi-Platform GUI&Gfx Library
« on: August 11, 2019, 03:40:26 PM »
LibUI that Armando once pointed me to so generously has just now entered its late alpha stage and is more or less ready for deployment on the three major 64-bit platforms -- Windows, macOS, and GUI Linuxes.

Recent 14 days have been fun for me coding on 3 platforms simultaneously building LibUI shared libraries with VS2013, LLVM/Clang, and gcc, respectively. MSVC was a breeze, Clang more or less so too, while gcc proved "the great offender" with its default -fPIC setting that compiles every console executable into funny shared objects unless given an explicit -no-pic command line parameter. ;D

The libraries turned out to be pretty little thingies about 350KB large on all the platforms, which kept all my test executables linked against them down to mere 15 thru 25KB. The libraries already offer a unified and pretty decent set of common controls (buttons, checkboxes, option buttons, labels, frames, single line and multiline textboxes, combo- and listboxes, tab controls, progress bars, up-down spinners, trackbars, etc.) They also feature most common dialogs: open/save file dialogs, color pickers, font choosers, info and error message boxes, and date-time pickers. They also offer rich text boxes and anti-aliased canvases for drawing using Direct2D under Windows, and OpenGL, under macOS and Linux. All the controls utilize the platforms' native GUI frameworks to ensure excellent and rich look and feel of user app GUIs. More controls will be added in the future.

While the libraries themselves were compiled using the best of the best compilers on all the platforms (nearly 3/4 of the code is written in C++/ObjC), my main concern was to mate them with my 64-bit machine code compiler that doesn't support OOP and can only communicate with the libraries through an ANSI C interface. And much to my surprise, I succeeded!

What you are seeing below are test cases using LibUI shared libraries in the most critical mode of my compiler's operation: just-in-time compilation. If it's capable of doing that, it will sure be able to compile statically to executable files as well.

So as you understand, there's just one more part missing from that stack to assemble a decent multiplatform 64-bit alternative to PowerBASIC, which is a DDT PB-compatible lexer. :D

(Okay okay, keep quiet, I am still a (re)tired language developer... ;))