Graphical user interfaces
We'll show you how it's done!
What is a graphical user interface? What is a dialog and an event?
Graphical user interfaces (GUIs) are the central element of every modern application. Let's face it - who voluntarily slogs through a sequence of commands when he or she can click? Probably the minority, although knowing a few console commands can speed up interaction. Graphical user interfaces, then, provide the user with a visually appealing interface that responds to his or her input and clicks. It can contain lists, menus, buttons and many more elements. Basically, there are two main types of graphical interfaces: dialogs and event-based interfaces.
A dialog (created with the dialog command) is a graphical interface that stops the program until the user closes the dialog. Typical examples are file selection dialogs or message boxes. They are used wherever a program needs information from the user for further work, without which continuation is not meaningful. If a file selection dialog is displayed, the program needs a file name for further continuation.
An event-based interface, on the other hand, does not block the continuation of the program. Instead, it responds to user input and then executes the appropriate functionality. Event-based interfaces are defined in NumeRe in a layout ... endlayout block in a NumeRe layout (*.nlyt). In addition, you need at least one event handler procedure that can call the graphical interface when the user performs an interaction.