Complete Samples

IUP - Portable User Interface

Complete Samples

Standard Controls

The following example creates a dialog with virtually all of IUP’s elements as well as some variations of them, with some attributes changed. The same example is implemented in C, LED and Lua. Both screens presented are from the same example, one in Windows 95 and the other in IRIX.

The C code is ready to compile. The LED code can be loaded and viewed in the IupView application. The Lua code can be loaded and executed in the IupLua standalone application.

in C

 

in LED

 

in IupLua

sample.c

 

sample.led

 

sample.lua


The Result in Windows 2000

The Result in Windows XP

The Result in Motif

IupView and IupLua Executables

The IupView application can be used to test LED files, load and save images for IupImage or for ICONS, display all images and test them when disabled, display dialogs and popup menus.

The IupLua console can load and execute Lua scripts using the IupLua binding. Lua print calls are output in the console. The executable also include the LuaGL, CDLua and IMLua bindings.

Since the libraries are statically linked the Lua "require" does not work. To build the IupLua executables with dynamic loading enabled in Windows we use:

iup/srclua5> tecmake dll "MF=iuplua" "USE_DLL=Yes"

These are available in a separate folder together with all the necessary DLLs.

For the IupView and IupLua applications see the distribution files, source code and pre-compiled binaries are available at the Download.

All Samples

The IUP samples are spread in the documentation. Each control, dialog, menu has its own set of examples in C, LED and Lua.

You can browse the examples here.

External Samples

The CD and IM libraries have samples that use IUP, check in their documentation.

Some freely available applications also use IUP:

IMLAB - Image Processing Laboratory

EdPatt - Pattern Editor

Ftool - Two-dimensional Frame Analysis Tool