Free/Open Source GUI designer with xml output that could be customized (screensize, widgets)? - user-interface

we are developing GUI using eGUI under MQX RTOS (ARM Cortex M4). Instead of hardcoding widgets, callbacks etc on each screen we would like to use a tool to desing GUI screens graphically, then generate XML description file that could serve as a basis for GUI code generator (as a second part of a tool).
QTDesigner is something very like that, but cannot be customized to another, custom set o widgets. So we're looking for any GUI designer that could offer options for customization (at least screen size and widgets set) and produce xml output file with description of desing.
Then we can develop code generator out of this xml file...
Any idea, pointer, advice ?
Thanks in advance,
Bule.

Pencil's native file format is based on XML.
http://pencil.evolus.vn/
This is nowhere near ideal, but with the right scripting (Ruby and Nokogiri for instance) you could convert the pencil file in to a more cleaned up and direct XML file, which you then use in a separate step to generate GUIs.

Unfortunately, most GUI Designers are closely tied with their widget toolkits. Qt Designer -> Qt, Glade -> GTK+, wxFormBuilder -> wxWidgets. Customizing a different designer to your library is not easy. The best option is to choose a GUI library that comes with a designer. The two main pre-supported graphics libraries for MQX RTOS are eGUI and PEG. Only the PEG Graphics Library has a GUI designer and the only free version (for NXP Silicon only) is PEG-Lite. If you're using STM32 hardware, it's probably best to use TouchGFX which has a designer and is free for STM32 devices only.
TotalCross have developed a tool that converts Android XML built by Android Studio's Layout Editor to their Java API that runs on TotalCross VM. It's all explained in this video. The tool has not been officially released on their product page but it's on GitHub. Here is a list of GUI libraries for embedded. Half of them have GUI designers.

Related

Does every window running use System.Windows.Forms.Form?

Does every window running use System.Windows.Forms.Form?
The title says it. From Java to C++ to Visual Basic to Console Apps. Does every compiled window use the class System.Drawing.Forms.Form?
No.
In .NET, System.Windows.Forms is (essentially) just a tool to draw windows, but it is not the only tool. Other languages have their own tools; Java has the Swing libraries, Python and Perl have several other GUI toolkits, each which do things differently. Console Apps use an entirely different way of presenting information. How things are drawn not only depends on the language, but also the GUI API used. For example, a window might be entirely drawn using C++ and DirectX and custom drawing routines; these would not use .NET at all, nor any underlying tools that .NET uses. That same window might be drawn with C++ and Open GL; the same data might be displayed, but the routines invoked to draw it would be different. In fact, you could do all the drawing with assembly if you were really masochistic!
Short answer No.
System.Windows.Forms.Form is an abstraction used by the WinForms .Net library to interact with the actual Windows provided by the OS.
Other languages have other abstractions: Java could use Swing or AWT or any other UI library which offer different ways to draw forms.
Likewise C++ could employ an abstraction over the OS provided objects (i.e. the MFC library) or use the Windows API directly.
All the UI libraries need in the end to use the Windows API to draw their windows, but not all of them do it to the same extent, so .Net's UI libraries will use some of the same API calls as Java's or C++'s UI libraries.
I'll update this answer if I find a good explanation of how the UI and UI libraries work on windows.
I remember reading a good one not long ago with some of the history and the changes in Windows 8 but don't remember where.

How are GUI frameworks actually developed

I worked mainly in web development but occasionally do some C/C++ or Java programming. I am very curious how these frameworks actually produce the graphics used in their GUI. Were the GUI elements (title bar, window frame, status bar, buttons, etc...) designed by a designer in Photoshop then a developer adds that graphic to the framework? Or do the developers actually build the elements programatically with the direction of a designer?
If someone could give me an overview that would be awesome!
Great question, Lark ! Since we're in Qt Framework branch, I'll tell you how its done in Qt, but I'm sure you can apply to similar frameworks or libraries like GTK, etc.
So Qt started a framework that would provide one API for a variety of platforms making it very easy to port your applications from one platform to another while providing native look and feel on those platform. So for example on MacOSX a push button would have this blue Aqua style while on Windows XP it would look like a button on Windows platform. Trolltech put a lot of effort and did a great job on making the GUI look native. So how it works ? Well, all Qt widgets use QStyle and its derivatives to render themselves. Depending on the style, a widget would look differently. All the standard widgets follow the guides of those platforms they are designed for. There are probably some small graphics designer work behind that, but I believe its not that significant. The main source of the look and feel is the platform guides that describe how UI elements on those platforms should look like and their behavior.
But Qt has been developing very fast and the trolls came with a very promising technology called Qt Quick. Its an amazing technology which allows designers and developers tightly work together providing the best UI. Its highly oriented on using artwork made in Photoshop, GIMP or similar tools in the code. And its much easier to use mock ups from designers with Qt Quick than with C++/Qt cause Qt Quick is initially designed for that.
Hope that helps
The basic low level functionality of most GUI frameworks is quite old, the result of a great deal of very hard work by earlier developers working with primitives - literally drawing things on terminal screens, etc, at very low levels, using C or Assembler. Slowly, libraries for abstraction of these processes, and frameworks and class hierarchies for refining them and organizing come into being. All Linux GUI's (in fact, nearly all contemporary GUI frameworks) are based on XWindows, for example:
X originated at the Massachusetts Institute of Technology (MIT) in
1984. The protocol version has been X11 since September 1987....X primarily defines protocol and graphics primitives - it deliberately
contains no specification for application user-interface design, such
as button, menu, or window title-bar styles. Instead, application
software – such as window managers, GUI widget toolkits and desktop
environments, or application-specific graphical user interfaces –
define and provide such details. As a result, there is no typical X
interface and several different desktop environments have become
popular among users.
See more there, for some good information about this topic.

How to design a portable modularized GUI applications?

There are a lot of flexible, complete, cross-platform, et cetera, graphical user interface frameworks. Most of them provide many tools to turn software development easier. When building a desktop application in Qt environment, for example, one usually would have different file types, headers, implementation files, and user-interface files (.ui).
Normally, a developer design an application and, once compiled, no changes can be made to user interface.
I would like to know how to create an portable modularized application that could dynamically load personalized user-interfaces (from .ui or binary files, for example).
The system design would be such that the core controller would somehow load it's presentation from remote source.
My question is: Are there any library that could provide this kind of flexibility in GUI applications development? How to implement such a architecture?
Thank you in advance for responses.
You can use QUiLoader to load .ui files at runtime.
You can have a GUI based on html which can be modified at run time.
The new version of Qt has a gui/themes based on an html like design language - Qt quick or something?

Best approach for building a multiplattform graphical interface for a command-line application

I developed a command line application, whose binary runs in Linux, Windows and Mac OSX. It reads some text input files, but I realize that some special users can not handle this. I would then like to build some kind of graphical interface, where the user only finds buttons and scroll bars for selecting the input parameters, a big "run" button, and then it reads the output of the program and makes some figures.
I also need that everything gets finally packed in a single file, which uses only static libraries, so the user just needs to copy the file to his/her machine and run it.
I would like to know what is the best open source and multi-platform approach to do this. 10 years ago I played a bit with something similar on DEC machines, so I guess that nowadays the situation has probably improved a bit.
P.S. For designing the graphical interface, I am looking for a graphical approach, where you add buttons, scroll bars with the mouse
P.S. 2: the interface is really simple, just need less than 10 buttons, 5 text fields and 2 scrolla bars
Thanks
For advanced UIs, I would generally recommend writing a different UI for each platform (since each platform has its human inteface guidelines). However, is this going to be a simple UI, then one of the cross-platform UIs.
You also didn't mention what language you want to use.
Lastly your "1 exe file" is a bit of a myth - it applies only to Windows. On MacOSX, we use the magic app folders, so it doesn't matter how many files comprise your app, you still get drag-n-drop installs.
Look into GTK+ which originated on Linux, or wxWidgets.
Tcl/Tk is a perfect choice. No other language provides as good of a deployment solution. You can create a virtual filesystem that has your application along with icons, sound files, etc into a single file for each platform (called a 'starpack'). You can even include binary executables and libraries, though those have to be copied to the actual filesystem at runtime to be used.
You also have the option of a two-file deployment -- a platform-specific runtime called 'tclkit', and a platform-independent application file called a 'starkit'. The one starkit will work on all platforms without recompiling, rebundling, etc. It can even have platform-specific parts built-inside and chosen at runtime.
A professional Tcl/Tk developer could do a front end to a command line program in a day without a graphical GUI design tool, easily. If you're new to tcl it will obviously take longer, but that is true of any language. The point being, Tk is remarkably easy to use and doesn't require a graphical GUI designer.
For a cross platform UI, you can use GTK (if using C) or QT (if using C++).
If you can live with a rather huge application package to deliver be sure to look at https://electronjs.org/ You can keep your functionality in your commandline apps and build a modern look and feel UI using HTML5 CSS JS and before thinking "this is ridiculous" consider that Microsoft's Visual Studio code is built on this and compared to GTK / wxWidgets you can do wonders with this. It isn't even hard to do but you either love it or hate it. I'm still undecided...

How to decide GUI Framework for desktop application project

I am working on a new small utility desktop application but I am not really able to choose the GUI framework to use. I have worked on both JAVA,C# and C++, so language is not really a constraint. My criteria are:-
A very well designed architecture, something like QT. It's better if it follows typical C++ design methodologies.
Layout management should be easy, intuitive and not really cumbersome. I hate adjusting pixels on screen.
Its license should be open.
It should look good :)
Mentioned QT seems to comply to all your requirements. QT has "deploy everywhere" attribute, whilst Java needs no deploying at all (it depends on what is use of your utility).
Ad. 2 QT has really convenient GUI designer.
Ad. 3 LGPL. Usually it is enough.
Ad. 4 It is always matter of taste. IMO QT4 looks awesome under linux, but it's windows look'n'feel is correct at best. It's strong point is, that without additional tweaks it almost everywhere looks native.
I've been using Swing, and it works fine. NetBeans (a decent IDE by itself) even supports graphical GUI building.
It's well designed (basically
everything is done with listeners,
functions that are registered for a
certain event). It has bindings, so
you don't have to write code to set
up a value in a text field or read
it out
Layout is not perfect, but
acceptable within NetBeans. It's
WYSIWYG (almost). Look-and-feel can
be changed on the fly.
License is free. Source-code is not
available, I think.
Looks fine on Windows and Linux,
less so on OSX.
You could always try SWT. The advantages of Java with the standard L&F of supported operating systems.
Well designed. Lots of
documentation, and very easy to
develop with. (If you know Swing,
you can pick up SWT in no time.)
I believe layout managers do exist
that support SWT. I'm not positive
about this though, as I typically
don't use layout managers too much.
Uses the Eclipse Public
License. Should meet most of
your requirements.
From Wikipedia on SWT:
SWT is written in Java. To display GUI elements, the SWT implementation accesses the native GUI libraries of the operating system using JNI (Java Native Interface) in a manner that is similar to those programs written using operating system-specific APIs. Programs that call SWT are portable, but the implementation of the toolkit, despite the fact that it is written in Java, is unique for each platform.
Hope that helps you.
I'd suggest wxWidgets if you want to program in C++ or wxPython (the python language binding of wxWidgets if you know or don't mind learning Python.
Architecture is similar to QT I think.
Layout using sizers. Quite easy once you get the hang of it.
Liberal open source license.
Widgets are native on all platforms (Windows, Mac OS X, Linux).

Resources