June 21, 2018

First look on glade


Programming a GUI application in Linux is hard. There are lots of standards available (gtk+, Qt, mono develop, Python Window) and it is unclear which of them is a here to stay. The hypothesis is, that the combination of: C++, gtkmm and the Glade GUI designer is the best practice method to develop own apps easily. But I'm not sure how this works in detail. Today, I only want to take an introductionary look into the Glade GUI designer and evaluate what is possible with the tool.
The installation is easy. A simple “dnf install glade” is enough to fetch the 3 MB size file onto the local Fedora machine. After starting the program the user sees a screen like this one:

In the menu, the user can drag&drop his GUI application which works like in a painting program. And he can execute the preview function to show, how the GUI will look like.


But, there is one part, which i haven't figured out right now. How to use the GUI in C++ program. As far as i know, the file is stored in the working directory with the “.glade” extension. It is an XML formatted file which can be used inside Python, C or C++ apps.

But the details are unclear right now. Nevertheless, the glade tool itself, seems very powerful. The above example GUI-window was created in under 5 minutes with simple point&click mouse movements. The user selects first the window type, specify a grid and moves them the elements like a menu bar, the textfield and the button into the window. Then he can give names for activation events for example “pressbutton”. These event should be parsed later in the C++ program.

No comments:

Post a Comment