## 1. Introduction

Hello and welcome to the IUP Tutorial. Our goal is to provide a walkthrough guide to develop IUP applications focused in people that haven't used IUP before. First of all it is necessary to describe what IUP is and how it can help you develop your application. IUP stands for "Interface com Usuário Portátil" in Portuguese, which translates to "Portable User Interface". It is a multi-platform toolkit for building graphical user interfaces, offering a simple API in two main languages C/C++ and Lua, and its purpose is to allow the user interface source code of an application to be compiled in different systems without any modification. Supported systems include: GTK+, Motif and Windows. As main advantages, IUP offers: high performance since it uses native interface elements, and a fast learning curve due to the simplicity of its API. Also, IUP uses an abstract layout model based on the boxes-and-glue paradigm from the TeX text editor making the dialog creation task more flexible and independent from the graphics system resolution.

IUP has 3 concepts that any user has to understand: Elements, Attributes and Callbacks.

Elements are every kind of interface element present in the application. IUP contains several user interface elements. The library's main characteristic is the use of native elements. This means that the drawing and management of a button or text box is done by the native interface system, not by IUP. This makes the application's appearance more similar to other applications in that system. On the other hand, the application's appearance can vary from one system to another. Besides, some additional controls are drawn by IUP, and are independent from the native system. Dialogs are special elements that represent every window created by IUP. Any application that uses IUP will be composed by one or more dialogs. Every dialog can contains one or more controls inside.

Attributes are used to change or consult properties of elements. Each element has a set of attributes that affects its behavior or its appearance. Each attribute may work differently for each elements, but usually attributes with the same name work the same. Attribute names are always upper case. But attribute values like "YES", "NO", "TOP", are case insensitive, so "Yes", "no", "top", and other variations will work.

Callbacks are functions which notify the application that some user interface event occurred. Usually callbacks will be called only when the user interacts with the application elements. If the application register the callback function, then the function will be called every time the event occurs.

All we have seen until now is a short summary of what is behind the IUP toolkit and concepts that the developer needs to be familiarized with when programming with IUP. From now on, we are going to present how to build an IUP application from the most simple example possible to a complex and full of different resources application.

Previous | Index | Next