No, NiGui is intended to define your user interface by manually written Nim source code.
Using a GUI builder is maybe faster at the start of a project, but to modify an existing UI, it faster to change a few lines of code, instead of dragging around a bunch of widgets.
Sizes of "example_01_basic_app":
Linux x64 binary: 608 kB
Windows x64 binary: 705 kB
NiGui allows you to use the native controls like buttons, labels, and text boxes. Typically the look of native controls can't be changed much. For example Windows does not support changing the background color of a button.
As an alternative to native controls, NiGui allows you to create custom controls. Custom controls must draw their surface by it's own, therefore it can look like anything you want. As an example: To create a custom button, you can inherit from the type Button
and override the method handleDrawEvent()
.
To make it possible to adjust the look of custom controls to the look of native controls, NiGui allows you to use the platform's default styles, for example app.defaultBackgroundColor
and app.defaultTextColor
.
Please add your knowlege here if you know more.
Gtk is a popular cross-platform GUI toolkit written in C.
Gtk uses native widgets partly.
Unlike to NiGui, under Windows the user has to install Gtk or you ship the DLL files with your application.
The Gtk 2 DLL files for Windows takes about 30 MB.
Under the desktop Linux distributions, Gtk 2 and 3 are usually preinstalled.
NiGui uses Gtk 3 as backend under Linux.
Qt is a popular cross-platform GUI toolkit written in C++.
It uses a preprocessor for the C++ code, therefore it cannot be used with other programming languages like C or Nim.
wxWidgets is a cross-platform GUI toolkit written in C++.
Unlike NiGui, under Windows the user has to install wxWidgets, or you have to ship the DLL files with your application, or you can statically link wxWidgets into your application.
The wxWidgets DLL files for Windows takes about 20 MB (about the same overhead applies to static linking).
wxWidgets can be used in Nim (https://github.com/Araq/wxnim/).
IUP is a cross-platform GUI toolkit written in C (http://webserver2.tecgraf.puc-rio.br/iup/).
Like NiGui, IUP uses Gtk and Win32 as backends.
IUP can be used in Nim (https://github.com/nim-lang/iup).
Using a C library in Nim is better than most languages but not perfect. For example the user has to install the library according to the instructions from the wrapper. With a pure Nim project you only need to install the package.
libui is a cross-platform GUI toolkit written in C (https://github.com/andlabs/libui).
Like NiGui, libui uses Gtk and Win32 as backends and uses native controls.
Like NiGui, libui is in the early development phase (at least no documentation is written).
libui can be used in Nim (https://github.com/nim-lang/ui).
Using a C library in Nim is better than most languages but not perfect. For example the user has to install the library according to the instructions from the wrapper. With a pure Nim project you only need to install the package.
nimx is a cross-platform GUI toolkit written in Nim (https://github.com/yglukhov/nimx).
It uses OpenGL as backend and also works in a web browser.
There are no native controls.
Like NiGui, nimx is in the early development phase (at least no documentation is written).