Global Attributes


General 

LANGUAGE

The language used by some pre-defined dialogs.

Can have the values ENGLISH and PORTUGUESE. Default: ENGLISH. Can also be set by IupSetLanguage.

VERSION (read-only)

Returns the name of IUP's version.

The value follows the "major.minor.micro" format, major referring to broader changes, minor referring to smaller changes, and micro referring to corrections only. Ex.: "1.7.2".

COPYRIGHT (read-only)

Returns the IUP's copyright.

 Ex: "Copyright (C) 1994-2004 Tecgraf/PUC-Rio and PETROBRAS S/A".

DRIVER (read-only)

Informs the current driver being used.

Two drivers are available now, one for each platform: "GTK", "Motif" and "Win32".

System Control

LOCKLOOP

When the last visible dialog is closed the IupExitLoop function is called. To avoid that set LOCKLOOP=YES before hiding the last dialog. Possible values: "YES" or "NO". Default: "NO".

CURSORPOS

The cursor position in absolute coordinates relative to the upper left corner of the screen. Accept values in the format "XxY", example "200x200". Can be set only in GTK 2.8.

SHIFTKEY (read-only) (since 3.0)

Returns the state of the Shit keys (left and right). Possible values: "ON" or "OFF".

CONTROLKEY (read-only) (since 3.0)

Returns the state of the Control keys (left and right). Possible values: "ON" or "OFF".

MODKEYSTATE (read-only) (since 3.0)

Returns the state of the keyboard modifier keys: Shift, Ctrl, Alt and sYs(Win/Apple). In the format of 4 characters: "SCAY". When not pressed the respective letter is replaced by a space " ".

KEYPRESS (write-only) (since 3.0)

Sends a key press message to the element with the focus. The value is a key code. See the Keyboard Codes table for a list of the possible values.

KEYRELEASE (write-only) (since 3.0)

Sends a key release message to the element with the focus. The value is a key code. See the Keyboard Codes table for a list of the possible values.

KEY (write-only) (since 3.0)

Sends a key press and a key release messages to the element with the focus. The value is a key code. See the Keyboard Codes table for a list of the possible values.

AUTOREPEAT [Motif Only]

Turns on/off  ("YES" or "NO") the autorepeat of keyboard keys in the whole system - may be used as an optimization in high performance applications.

UTF8AUTOCONVERT [GTK Only]

GTK uses UTF-8 as its charset for all displayed text, so IUP will automatically convert all strings to (SetAttribute) and from (GetAttribute) UTF-8. Default: YES. If the default locale is already UTF-8, but the given string is not UTF-8 then it will be assumed that the string uses the ISO8859-1 charset.

 

System Information

SYSTEMLANGUAGE (read-only)

Return respectively a text with a description of the system language.

SYSTEM (read-only)

Informs the current operating system. On UNIX, it is equivalent to the command "uname -s" (sysname). On Windows, it identifies if you are on Windows 2000, Windows XP or Windows Vista. Some known names:

SYSTEMVERSION (read-only)

Informs the current operating system version number.

On UNIX, it is equivalent to the command  "uname -r" (release). On Windows, it identifies the system version number and service pack version.

GTKVERSION (read-only) [GTK Only]

Returns the run time version of the GTK toolkit. This is the version being used at the time of the IupOpen function was called by the application.

GTKDEVVERSION (read-only) [GTK Only]

Returns the development version of the GTK toolkit. This is the version at the time the IUP library was compiled.

MOTIFVERSION (read-only) [Motif Only]

Returns the version of the run time Motif.

MOTIFNUMBER (read-only) [Motif Only]

Returns the number of the Motif Version if full form, e.x: 2.2.3 = "2203".

COMPUTERNAME (read-only)

Returns the hostname.

USERNAME (read-only)

Returns the user logged in.

XSERVERVENDOR (read-only) [GTK and Motif Only] (since 3.0)

X-Windows Server Vendor string.

XVENDORRELEASE (read-only) [GTK and Motif Only] (since 3.0)

X-Windows Server Vendor release number.

Screen Information

FULLSIZE (read-only)

Returns the full screen size in pixels.

String in the "widthxheight" format.

SCREENSIZE (read-only)

Returns the screen size in pixels available for dialogs, i.e. not including menu bars, task bars, etc. In Motif has the same value as the FULLSIZE attribute.

String in the "widthxheight" format.

SCREENDEPTH (read-only)

Returns the screen depth in bits per pixel.

TRUECOLORCANVAS (read-only)

Indicates if the display allows creating TrueColor (> 8bpp) IupCanvas controls, even if PseudoColor is the default, i.e. even if SCREENDEPTH<=8 . Returns "YES" or "NO". Usefull in Motif.

VIRTUALSCREEN (read-only) (since 3.0) [Win32 and GTK Only]

Returns the virtual screen position and size in pixels. It is the virtual space defined by all monitors in the system.

String in the "x y width height" format.

MONITORSINFO (read-only) (since 3.0) [Win32 and GTK Only]

Returns the position and size in pixels of all monitors. Each monitor information is terminated by a "\n" character.

String in the "x y width height\nx y width height\n..." format.

System Data 

HINSTANCE (read-only) [Win32 Only]

This attribute returns a handle (HINSTANCE) that identifies the application in the native system.

DLL_HINSTANCE [Win32 Only] (since 3.0)

This attribute changes and returns a handle (HINSTANCE) that identifies the dll where resources are stored.

APPSHELL (read-only) [Motif Only] (since 3.0)

Returns the shell Widget created by XtOpenApplication.

XDISPLAY (read-only) [GTK and Motif Only] (since 3.0)

Returns the X-Windows Display.

XSCREEN (read-only) [GTK and Motif Only] (since 3.0)

Returns the X-Windows Screen.

Default Attributes

DLGBGCOLOR

The default background color for all elements that have the background similar of the dialog.

DLGFGCOLOR (since 3.0)

The default foreground color for all elements that have text over the background of the dialog or similar. Usually is "0 0 0".

MENUBGCOLOR (since 3.0)

The default menu background color. Usually is "255 255 255".

MENUFGCOLOR (since 3.0)

The default menu foreground color. Usually is "0 0 0".

TXTBGCOLOR (since 3.0)

The default background color for editable text, also used by lists and tree. Usually is "255 255 255".

TXTFGCOLOR (since 3.0)

The default foreground color for editable text, also used by lists and tree. Usually is "0 0 0".

DEFAULTFONT

The default font used by all elements, except for menus.

DEFAULTFONTSIZE (since 3.0)

Auxiliar attribute to retrieve and set the default font size used by all elements. It retrieves the size from DEFAULTFONT. When changed will actually change the DEFAULTFONT.