IUP/Motif - características

IUP - Portable User Interface

Motif System Driver 

Driver for the X-Windows/Motif 2.x environment. But it can run in Motif 1.x.

Environment Variables

QUIET

When this variable is set to NO, IUP will generate a message in console indicating the driver’s version when initializing. Default: YES.

DEBUG

This variable’s existence makes the driver operate in synchronous mode with the X server. This slows down all operations, but allows immediately detecting errors caused by X.

Default Values – Resource Files

Some default values used by the driver, such as background color, foreground color and font, can be set by the user by means of a resource file called Iup. It must be in the user’s home or in a directory pointed to by the XAPPLRESDIR environment variable. Below you can see an example of this file’s contents:

*background: #ff0000
*foreground: #a0ff00
*fontList: -misc-fixed-bold-r-normal-*-13-*

The values used in the example above are the ones used by IUP if these resources are not defined.

Tips

  • During linking in the Solaris environment: Can not find libresolv.so.2

This error occurs if the system does not have an applied patch containing this library.

This library is important for all installations of Solaris 2.5 and 2.5.1 (SunOS 5.5 and 5.5.1, respectively). It is a correction of the DNS system, involving security.

The web address to get these patches is SunSolve’s http://sunsolve1.sun.com/sunsolve/pubpatches/patches.html. Select the Solaris version you wish (2.5 or 2.5.1 for Sparc) and download the patches 103667-09, 102980-17, 103279-03, 103708-02, or more recent for 2.5 (the number after the ‘-’ is the patch version, and the more recent number is the patch), or 103663-12, 103594-14, 103680-02 and 103686-02 for 2.5.1. All of them have a README file explaining installation, and groups have to be installed together.

  • TrueColor canvas

Whenever a canvas is created, one tries to create it with a TrueColor resolution Visual. This is not always possible, since it is subject to many conditions, such as hardware (graphics board) and the X server’s configuration.

The xdpyinfo program informs which Visuals are available in the X server where the display is being made, so that you can see if your X allows creating a canvas with a TrueColor Visual. In some platforms, however, the X server may not make a TrueColor Visual available, even though the graphics board is able to display it. In this case, restart the server with parameters that force this. Below is a table with such parameters to some systems where the IUP library has been tested. If the command does not work, or if it is not possible, then the graphics library really does not support 24 bpp.

System Execution Command
Linux startx --bpp 24
AIX (not necessary)
IRIX (not necessary)
Solaris (not necessary)

Since color requests are “always” successful in TrueColor/24bpp windows, we have minimized visualization problems for images that make use of complex color palettes (when there is a high color demand, not always all colors requested can be obtained). The IUP applications also coexist more “peacefully” with other applications and among themselves, since the colors used by TrueColor/24bpp windows do not use the colormap cells used by all applications.

  • XtAddCallback failed

When a warning about XtAddCallback appears during the application initialization, and it aborts, this usually means that you are using a Motif with a different version than the Motif used to build IUP. Reinstall Motif or rebuild IUP using your Motif.

  • Some Control Sizes are wrong

Sometimes the control initialization is incomplete and its size is miscalculated. To solve this call IupMap(dialog) and set the dialog size to NULL "IupSetAttribute(dlg, IUP_SIZE, NULL);" before calling IupShow. This will fix the sizes. We hope to solve this problem in future versions.