Global Attributes
Global attributes are not associated with any particular element. They represent and affect the global behavior of the toolkit.
To access global attributes, use the IupGetGlobal and IupSetGlobal functions. In C, the functions IupGetAttribute and IupSetAttribute can also be used with a NULL element handle.
The environment variable IUP_name sets the global attribute name when IupOpen is called, and it takes precedence over IupSetGlobal. Available for APPEARANCE, EFLACCEL, EFLTHEME, FLTKTHEME, GNUSTEPTHEME and HELPAPP.
General
LANGUAGE
The language used by some pre-defined dialogs.
Can have the values ENGLISH, PORTUGUESE, SPANISH, CZECH, RUSSIAN, GERMAN, FRENCH, CHINESE, JAPANESE or ITALIAN. Default: ENGLISH. It 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-2025 Tecgraf/PUC-Rio, 2022-2026 gen2brain".
DRIVER (read-only)
Informs the current driver being used.
Available drivers: "Win32", "WinUI", "GTK", "GTK4", "Motif", "Qt", "QML", "FLTK", "EFL", "Cocoa", "CocoaTouch", "Android", "Haiku" and "WASM".
APPID
Application identifier used by the desktop environment. Also used by
IupConfig as a last fallback when
neither APP_NAME nor APPNAME is set. In X11, it is the WM_CLASS instance
name, and in Wayland the application id (the XDG desktop file ID). Can
be set once. Used by the desktop environment in GTK, GTK 4, Qt, QML,
FLTK, EFL and Motif; only stored in the other drivers. In Haiku, the
BApplication MIME signature is the one stored in the
executable, "application/x-vnd.iup-Application" when it has none. When
not set, GTK, GTK 4, Qt, QML, FLTK, EFL and Motif use the executable
name. In Android, it is read-only and reflects the app's manifest
application id. In iOS, it is read-only and reflects
CFBundleIdentifier from the app's Info.plist.
APPNAME
Application name used by the system. In Windows, it is used for the
taskbar and tray. In macOS, it is used for the dock. Also used by IupConfig as a fallback when APP_NAME
is not set (APPNAME is checked first, then APPID). In X11, it is the
WM_CLASS class name, except in GTK 4, which always uses the instance
name, and in FLTK, which uses the capitalized instance name. Used by the
system in Win32, WinUI, macOS, Qt, QML, GTK, EFL and Motif; only stored
in the other drivers. In Android, it is read-only and reflects the app's
manifest label. In iOS, it is read-only and reflects
CFBundleDisplayName (or CFBundleName if not
set) from the app's Info.plist.
ICON
Name of the image used as the dialog icon by IupAlarm, IupGetFile, IupGetText, IupGetColor and IupListDialog.
PARENTDIALOG
Name of the dialog used as the parent by IupAlarm, IupGetFile, IupGetText, IupGetColor and IupListDialog.
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".
EXITLOOP
Disable the IupExitLoop function when IupMainLoopLevel is 0 or 1. Used when the application runs secondary dialogs that behave as full applications but sharing the same IUP environment. Possible values: "YES" or "NO". Default: "YES".
CUSTOMQUITMESSAGE [Win32 Only]
Enable a custom quit message instead of using WM_QUIT.
LASTERROR [Windows Only] (read-only)
If an error is found, returns a string with the system error description. Available in Win32 and WinUI.
UTF8MODE
By default, IUP uses strings in the current locale (See FONT attribute). To use UTF-8 strings, set this attribute to YES. Default: NO. Not supported in iOS.
UTF8AUTOCONVERT
The inverse of UTF8MODE. Default: YES. Supported in GTK, GTK 4, Qt, QML, FLTK, WinUI, macOS, iOS, Haiku and WebAssembly.
UTF8MODE_FILE [Win32 and Motif Only]
By default, IUP uses file names in the current locale, even when UTF8MODE=YES. To use UTF-8 file names, set this attribute to YES. Default: NO.
The main places affected by this attribute are IupFileDlg attributes, such as VALUE, FILE and DIRECTORY, and the DROPFILES_CB callback.
IUP uses the fopen based functions to read and write files. In Windows, fopen expects the file name in the ANSI encoding by default. If the file name, including the path, has characters that cannot be converted to ANSI, fopen fails to open the file. This is an IUP limitation in Windows.
Avoid special characters in folder and file names in Windows.
Another option is to call:
setlocale(LC_ALL, ".UTF8");
It works for fopen only with Visual Studio 2017 or newer Microsoft compilers (setlocale returns NULL with other compilers). fopen then opens UTF-8 file names with special characters, so both UTF8MODE and UTF8MODE_FILE can be set to YES.
Setting the console code page to UTF-8 with "chcp 65001" on the command line displays printf output of UTF-8 strings properly. It works with all Microsoft compilers in Windows, and with MinGW, even when setlocale returns NULL. Some font packages must be installed for all characters to display (for instance, Chinese, Japanese and Korean, and some symbols).
From the fopen documentation in MSDN: "You can use either forward slashes (/) or backslashes (\) as the directory separators in a path".
DEFAULTPRECISION
The default number of decimal places used in floating point output by some controls (IupMatrixEx and IupGetParam). Local attributes may overwrite the default. Default: 2.
DEFAULTDECIMALSYMBOL
Symbol used for decimal separator in numeric values used in floating point output by some controls (IupMatrixEx, IupGetParam and IupPlot). Can be "." or "," only. Default uses the one defined by the system locale.
SB_BGCOLOR [GTK, GTK 4 and Motif Only]
By default, the scrollbars will not be affected by the BGCOLOR in native controls. If set to YES, the system will try to render scrollbars in the same color of the BGCOLOR, which may affect scrollbars visibility. This affects IupCanvas, IupList, IupText and IupTree.
SHOWMENUIMAGES
Force the display of images in menus. Default: YES. Supported in GTK, GTK 4, Qt, QML, EFL, WinUI, FLTK and Haiku.
OVERLAYSCROLLBAR [GTK and GTK 4 Only]
Allow the overlay scrollbar in IupCanvas to use a minimum space. By default, IUP will use a regular scrollbar space even when overlay scrollbar is enabled in the system.
GLOBALMENU [GTK Only] (read-only)
Flag indicating that GTK is using a global menu instead of a per window menu.
GLOBALLAYOUTRESIZEKEY
Flag to enable the global keys Ctrl+'+' and Ctrl+'-' that change the FONTSIZE and refresh the layout of the dialog. If element sizes are NOT set using RASTERSIZE, their sizes will be automatically increased and decreased. Images are not changed.
IMAGEAUTOSCALE
If defined, automatically scale all IupImage elements by a given real factor. If "DPI" value is used, then the factor will be automatically calculated from the ratio between screen resolution and IMAGESDPI. The minimum resulted size when automatically resized is 24 pixels height.
IMAGESDPI
Defines the resolution of the images of the application. Common values are 96, 144, 192, and 288 DPI. Default: 96. Used when IMAGEAUTOSCALE=DPI.
IMAGESTOCKSIZE [GTK and GTK 4 Only]
Height, in pixels, of the images loaded from the icon theme by name. Rounded up to 24, 32 or 48. By default, the size is calculated from the screen resolution: up to 144 DPI size = 24, up to 192 DPI size = 32, else size = 48.
TREEIMAGE24
Forces the 24x24 default images in IupFlatTree. Default: NO.
PROCESSWINDOWSGHOSTING [Win32 Only]
If set to NO will disable the window ghosting feature for the duration of the process, cannot be enabled again. When disabled, the application dialogs cannot be moved or resized while the application is not responding, and "Not Responding" is not shown in the title bar.
SINGLEINSTANCE
Restricts the number of instances of the application by using a name to identify it. The first dialog that has a COPYDATA_CB callback will receive the command line of the second instance. When consulted returns NULL if inside the second instance. So usually in the application initialization after IupOpen, set SINGLEINSTANCE and then consult its value, if NULL abort the second instance by calling IupClose and returning from main.
In Windows (Win32 and WinUI), it uses a named mutex for detection and WM_COPYDATA for communication. In Unix (GTK, GTK4, Qt, QML, Motif, FLTK, EFL), it uses D-Bus session bus name ownership. In macOS, it uses CFMessagePort. In Haiku, it uses a named-port rendezvous. In Android, single instance is enforced by the Activity launchMode in the manifest, so the SINGLEINSTANCE attribute and COPYDATA_CB are not implemented. Not supported in iOS and WebAssembly.
NETWORK [Android and iOS Only]
Network used by the application connections. Can be "DEFAULT",
"CELLULAR" or "WIFI". Default: "DEFAULT". In Android, sockets created
through the C library use that network while it is available. With
"CELLULAR" mobile data stays connected while Wi-Fi is the default
network. In iOS, it only selects the network returned by NETWORKHANDLE.
Sockets created with direct system calls, and all sockets in iOS, must
be bound to NETWORKHANDLE. The application must declare
ACCESS_NETWORK_STATE and CHANGE_NETWORK_STATE
in the Android manifest.
NETWORKHANDLE [Android and iOS Only] (read-only)
Identifier of the network selected with NETWORK while it is available, NULL otherwise. In Android, it is the net_handle_t for android_setsocknetwork. In iOS, it is the interface index for the IP_BOUND_IF and IPV6_BOUND_IF socket options.
KEEPAWAKE
When "YES" the screen saver and display sleep are inhibited. Possible values: "YES" or "NO". Default: "NO". An IupVideo playing a video also inhibits them, independently of KEEPAWAKE. In Linux and FreeBSD, this requires the org.freedesktop.ScreenSaver D-Bus service or an X11 session.
HAPTIC [Android and iOS Only] (write-only)
Plays a haptic feedback. Can be "LIGHT", "MEDIUM", "HEAVY" or
"SELECTION". In Android, nothing is played when the system touch
feedback is off. The application must declare VIBRATE in
the Android manifest.
System Mouse and Keyboard
CURSORPOS
Controls and returns the cursor position in absolute coordinates relative to the origin of the main screen. The origin of the main screen is the top-left corner of its work area, the area not covered by task bars, docks, panels and the macOS menu bar. Accept values in the format "XxY" (in C "%dx%d), example "200x200". In GTK and Motif, it also generates mouse motion messages. In Wayland, it returns the position relative to the top-left corner of the contents of the dialog under the cursor, below the title bar.
MOUSEBUTTON (write-only)
Simulates a mouse button press, release or motion at the given coordinates. The position is in absolute coordinates relative to the top-left corner of the screen. Accept values in the format "XxY button state" (in C "%dx%d %c %d"), example "200x200 1 1". button can be one of the IUP_BUTTON1, ... definitions. state can be 2=double click, 1=pressed, 0=released, or -1=motion. The cursor position is always updated. In Windows, button can be 'W' and state=delta, so a wheel button scroll is simulated.
Not fully working. In Windows and GTK, menu items are not activated. Although submenus open, menu items even in the menu bar are not activated. In Windows, inside the IupFileDlg dialog, clicks in the folder navigation list are not correctly interpreted.
SHIFTKEY (read-only)
Returns the state of the Shift keys (left and right). Possible values: "ON" or "OFF".
CONTROLKEY (read-only)
Returns the state of the Control keys (left and right). Possible values: "ON" or "OFF".
MODKEYSTATE (read-only)
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)
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)
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)
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, FLTK and EFL Only]
Turns on/off ("YES" or "NO") the auto-repeat of keyboard keys in the whole system. It may be used as an optimization in high performance applications.
SHORTCUTKEY [Haiku Only] (read-only)
Primary shortcut modifier from the active Haiku keymap: "CTRL" (Windows-style) or "ALT" (BeOS default).
INPUTCALLBACKS
Turn on/off ("YES" or "NO") the global callbacks used to intercept global mouse and keyboard events. The callbacks must be set using the IupSetFunction function using the following names: GLOBALKEYPRESS_CB, GLOBALMOTION_CB, GLOBALBUTTON_CB and GLOBALWHEEL_CB (not supported in GTK, Motif and Android). Their parameters are the same as the standard callbacks, but without the Ihandle* parameter. Not supported in GNUstep, iOS and WebAssembly.
System Information
SYSTEM (read-only)
Informs the current operating system. In Unix, it is equivalent to the command "uname -s" (sysname). Some known names:
- "macOS"
- "iOS"
- "Android"
- "FreeBSD"
- "Linux"
- "SunOS"
- "Solaris"
- "AIX"
- "HP-UX"
- "Win10"
- "Win11"
- "Haiku"
- "WebAssembly"
SYSTEMVERSION (read-only)
Informs the current operating system version number.
In Unix, it is the kernel release, the same as the command "uname -r". In Windows, it is the system version number, e.g. "10.0.26200", followed by the service pack when there is one. In macOS and iOS, it is the system version, e.g. "26.1". In Android, it is the Android release, e.g. "15". In WebAssembly, it is the browser name and version.
SYSTEMLANGUAGE (read-only)
Returns the user's preferred user interface language as a BCP 47 tag, like "en-US", "pt-BR" or "sr-Latn-RS". Returns NULL when the system has no language, like the "C" locale on Unix. In Linux and BSD, it is taken from the LANGUAGE, LC_ALL, LC_MESSAGES or LANG environment variables, the first one that is set.
SYSTEMLOCALE (read-only)
Returns the character encoding used by the C runtime, like "UTF-8". In Windows, it is the ANSI code page, like "CP1252", or "UTF-8" when that is the code page.
FONTLIST (read-only)
Returns the names of the font families available in the system, sorted alphabetically. Each name is terminated by a "\n" character.
MONOSPACEFONTLIST (read-only)
Same as FONTLIST, restricted to the families the system reports as monospaced. Drivers whose toolkit does not expose that information compare the advance of "W" and "i" instead.
SCROLLBARSIZE (read-only)
Returns the width of the vertical scrollbar (the same as the height of the horizontal scrollbar).
COMCTL32VER6 [Win32 Only] (read-only)
Returns YES or NO if the Windows common controls are using Visual Styles or not.
DARKMODE (read-only)
Returns "YES" when the application is in dark mode, "NO" otherwise. Follows the system setting unless APPEARANCE forces a value.
APPEARANCE
Forces the appearance of the application only, it never changes the
system setting. Can be: "SYSTEM" (follow the system setting), "LIGHT" or
"DARK". Default: "SYSTEM". Can also be set via the environment variable
IUP_APPEARANCE.
Re-seeds the global palette (DLGBGCOLOR, TXTBGCOLOR, MENUBGCOLOR and their foregrounds), applies the appearance to the native controls and re-applies the palette to every element that did not set its own BGCOLOR or FGCOLOR. Can be set before or after IupOpen. Set it before creating dialogs for a fully consistent result, some native controls pick their theme when they are created.
In Win32, the native file, font and month-calendar dialogs are not affected. In Qt, it needs Qt 6.8 or newer for the platform theme, older versions only get the palette. In Qt, a style with a "-dark" variant, such as Adwaita, switches to the variant that matches. In GTK and GTK 4, it selects the dark variant of the current theme, so a theme without one keeps its colors. In EFL and GNUstep, only the IUP palette follows it, the widgets keep the toolkit theme. In Haiku, the controls and menus of the IUP dialogs draw with the palette; the native dialogs, tooltips and the window frame keep the system colors. In GTK 3, Motif, FLTK, EFL and GNUstep on Linux and BSD, SYSTEM follows the color-scheme setting of the XDG Desktop Portal when the portal reports one.
The dialog APPEARANCECHANGED_CB is called when the appearance changes, whether from a live system switch or from this attribute.
WINDOWING (read-only)
Returns the native windowing system in use. Can be: "DWM", "X11", "WAYLAND", "QUARTZ", "ANDROID", "HAIKU" or "WEB".
COMPUTERNAME (read-only)
Returns the hostname. Not available in WebAssembly.
TOUCHREADY (read-only)
Informs if a touch input device is available. Always returns YES or NO. In Win32 and WinUI, it reflects the presence of a touch digitizer; in Android and iOS, it is always YES. The other drivers do not detect touch and report NO.
USERNAME (read-only)
Returns the user logged in. Not available in WebAssembly.
EXEFILENAME (read-only)
Returns the filename of the executable with full path. Depending on how the program is executed the argv[0] not always has the full executable path. In Android, it is the APK path, in iOS the bundle executable. Not available in WebAssembly.
ARGV0 (read-only)
The program path as received in argv[0]. Supported in GTK, GTK 4, Qt, QML, Motif, EFL, FLTK, WinUI and Haiku.
HELPAPP
The browser used by IupHelp. Can
also be set via the environment variable IUP_HELPAPP.
Supported in GTK, GTK 4, Motif, EFL, FLTK, GNUstep and Haiku.
SANDBOX (read-only)
Returns "FLATPAK", "SNAP" or "APPIMAGE" when the application runs inside one of those, NULL otherwise. Supported in GTK, GTK 4, Motif, Qt, QML, EFL and FLTK.
CACHEDIR, DATADIR, CONFIGDIR, TMPDIR (read-only)
Per-user standard directories. The returned path is absolute and has no trailing separator.
CACHEDIR is clearable storage; DATADIR is persistent; CONFIGDIR holds settings; TMPDIR is scratch space.
| Driver | CACHEDIR | DATADIR | CONFIGDIR | TMPDIR |
|---|---|---|---|---|
| Win32, WinUI | %LOCALAPPDATA% |
%LOCALAPPDATA% |
%LOCALAPPDATA% |
GetTempPathA |
| GTK, GTK 4, Motif, EFL, FLTK | $XDG_CACHE_HOME |
$XDG_DATA_HOME |
$XDG_CONFIG_HOME |
$TMPDIR, else /tmp |
| Qt, QML | GenericCacheLocation |
GenericDataLocation |
GenericConfigLocation |
TempLocation |
| Cocoa | ~/Library/Caches |
~/Library/Application Support |
same as DATADIR | NSTemporaryDirectory() |
| Cocoa Touch | Library/Caches |
Library/Application Support |
same as DATADIR | NSTemporaryDirectory() |
| Android | Context.getCacheDir() |
Context.getFilesDir() |
same as DATADIR | Context.getCacheDir() |
| Haiku | B_USER_CACHE_DIRECTORY |
B_USER_DATA_DIRECTORY |
B_USER_SETTINGS_DIRECTORY |
B_SYSTEM_TEMP_DIRECTORY |
| WebAssembly | $HOME/.cache |
$HOME/.local/share |
$HOME/.config |
/tmp |
In WebAssembly, the home directory is backed by IndexedDB, so CACHEDIR, DATADIR and CONFIGDIR survive a page reload. TMPDIR is in memory and does not.
RESOURCEDIR (read-only)
Directory of the files shipped with the application. The returned path is absolute and has no trailing separator.
| Platform | RESOURCEDIR |
|---|---|
| Windows | directory of the executable |
| macOS | <bundle>/Contents/Resources |
| Linux, BSD | <prefix>/share/<exe>, executable in
<prefix>/bin |
| iOS | directory of the executable |
| Android | Context.getNoBackupFilesDir()/resources, copy of the
APK assets/resources |
| Haiku | <root>/data/<exe>, executable in
<root>/apps/<name> |
| WebAssembly | /resources, copy of the site resources
folder listed in resources.json |
In macOS, Linux, BSD and Haiku, when that directory does not exist it is the directory of the executable. The Android copy is made again when the APK changes. The WebAssembly copy is made when the page starts.
GL_VERSION (read-only)
Returns the OpenGL version. Available only after the first call to IupGLMakeCurrent.
GL_VENDOR (read-only)
Returns the OpenGL vendor information. Available only after the first call to IupGLMakeCurrent.
GL_RENDERER (read-only)
Returns the OpenGL renderer information. Available only after the first call to IupGLMakeCurrent.
XSERVERVENDOR (read-only) [X11 Only]
X-Windows Server Vendor string. Available in GTK, GTK 4, Qt, QML, FLTK, EFL and Motif.
XVENDORRELEASE (read-only) [X11 Only]
X-Windows Server Vendor release number. Available in GTK, GTK 4, Qt, QML, FLTK, EFL and Motif.
Toolkit Versions and Themes
GTKVERSION (read-only) [GTK and GTK 4 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 and GTK 4 Only]
Returns the development version of the GTK toolkit. This is the version at the time the IUP library was compiled.
GSKRENDERER [GTK 4 Only]
Sets the GSK renderer used by GTK4 for drawing. Must be set
before any dialog is created (before
IupShow). Can also be set via the GSK_RENDERER
environment variable, but this attribute takes priority.
Possible values: "gl" (or "opengl"),
"vulkan", "cairo".
When read, returns the renderer name that was set, or NULL if using the automatic default.
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, for example 2.2.3 = "2203".
QTVERSION (read-only) [Qt and QML Only]
Returns the run time version of the Qt toolkit.
QTDEVVERSION (read-only) [Qt and QML Only]
Returns the development version of the Qt toolkit. This is the version at the time the IUP library was compiled.
QTBUILDTYPE (read-only) [Qt and QML Only]
Returns "Debug" or "Release", the build type of the Qt toolkit.
QTSTYLE [Qt and QML Only]
Sets the Qt widget style. Can be set before or after creating
dialogs. Value is any key from QStyleFactory::keys(), e.g.
"Fusion" or an installed style plugin. Unknown values are
ignored. Can also be set via the environment variable
QT_STYLE_OVERRIDE. In QML, the value is a Qt Quick Controls
style name, default "Fusion", set only before the first
control is created.
When read, returns the name of the active style.
FLTKVERSION (read-only) [FLTK Only]
Returns the run time version of the FLTK toolkit.
FLTKTHEME [FLTK Only]
Sets the FLTK visual theme. Can be set before or after creating
dialogs. Can also be set via the environment variable
IUP_FLTKTHEME.
Accepted values:
"none"or"base"- default FLTK appearance"gtk+"- GTK+ like appearance"plastic"- shiny plastic appearance"gleam"- modern gradient appearance"oxy"- oxygen-inspired appearance
When read, returns the current theme name (returns
"none" if using the default).
EFLVERSION (read-only) [EFL Only]
Returns the run time version of the EFL toolkit.
EFLTHEME [EFL Only]
Sets the EFL theme. Must be set before creating any dialogs. Can also
be set via the environment variable IUP_EFLTHEME. The value
is a theme name or path as accepted by elm_theme_set.
EFLTHEMEDATA [EFL Only]
Sets embedded theme data from memory. Used together with
EFLTHEMEDATALEN to load a theme from a binary buffer instead of a file.
Set EFLTHEMEDATALEN first, then set EFLTHEMEDATA to the pointer to the
.edj data. Can only be set once.
EFLTHEMEDATALEN [EFL Only]
Sets the byte length of the embedded theme data buffer. Must be set before EFLTHEMEDATA. Can only be set once.
EFLACCEL [EFL Only]
Sets the acceleration preference for new EFL windows. Must be set
before creating any dialogs. Can also be set via the environment
variable IUP_EFLACCEL.
Accepted values:
"gl","opengl"- use OpenGL acceleration"3d"- use 3D acceleration"hw","hardware","accel"- use any hardware acceleration (best available)"none"- use software rendering
Additional depth, stencil, and MSAA options can be appended with
colon separators. For example:
"gl:depth24:stencil8:msaa_mid". MSAA options are
"msaa", "msaa_low", "msaa_mid"
and "msaa_high".
When read, returns the current acceleration preference string.
EFLENGINE (read-only) [EFL Only]
Returns the name of the actual EFL rendering engine in use (e.g.
"opengl_x11", "software_x11",
"wayland_egl", "wayland_shm"). Only available
after a dialog has been created.
GNUSTEPTHEME [GNUstep Only]
Sets the active GNUstep theme. Can be set before or after creating
dialogs. Can also be set via the environment variable
IUP_GNUSTEPTHEME. The value is a theme name (e.g.
"Silver", "Neos") or an absolute path to a
.theme bundle. The theme applies to the running application
only and is not saved in the user defaults. Setting NULL or empty
restores the theme from the user defaults, or the built-in theme when
none is set.
When read, returns the current theme name; the built-in theme is
"GNUstep".
GNUSTEPVERSION (read-only) [GNUstep Only]
Returns the run time version of the GNUstep GUI library.
WINUIVERSION (read-only) [WinUI Only]
Returns the version of the Windows App Runtime in use followed by its
framework package version, e.g.
"1.8 (8000.994.2142.0)".
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 X11, it is the
_NET_WORKAREA of the window manager, or the same as
FULLSIZE when the window manager does not set it. In Wayland, it is the
same as FULLSIZE. The main screen size does not include additional
monitors.
String in the "widthxheight" format.
SCREENDEPTH (read-only)
Returns the screen depth in bits per pixel.
SCREENDPI (read-only)
Returns a real value with the screen resolution in pixels per inch (same as dots per inch - DPI).
SCREENSCALE (read-only)
Returns a real value with the number of screen pixels in a logical unit of the main screen: 1 at 100% scaling, 2 at 200%. An image created with this number of pixels per logical unit and SCALE set to it is shown without resampling. In Motif, it is always 1.
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". Useful in Motif.
DWM_COMPOSITION (read-only) [Win32 Only]
Returns the Desktop Window Manager Composition flag. Returns "YES" or "NO". Returns NULL if not supported.
VIRTUALSCREEN (read-only)
Returns the virtual screen position and size in pixels. It is the virtual space defined by all monitors in the system. Not supported in Motif.
String in the "x y width height" format.
MONITORSCOUNT (read-only)
Returns the number of monitors. Not supported in Motif.
MONITORSINFO (read-only)
Returns the position and size in pixels of all monitors. Each monitor information is terminated by a "\n" character. Not supported in Motif.
String in the "x y width height\nx y width height\n..." format.
System Data
HINSTANCE (read-only) [Win32 Only]
Returns a handle (HINSTANCE) that identifies the application in the native system.
DLL_HINSTANCE [Win32 Only]
Changes and returns a handle (HINSTANCE) that identifies the DLL where resources are stored.
APPSHELL (read-only) [Motif Only]
Returns the shell Widget created by XtOpenApplication.
XDISPLAY (read-only) [X11 Only]
Returns the X-Windows Display. Available in GTK, GTK 4, Qt, QML, FLTK, EFL and Motif.
XSCREEN (read-only) [X11 Only]
Returns the X-Windows Screen. Available in GTK, GTK 4, Qt, QML, FLTK, EFL and Motif.
WL_DISPLAY (read-only) [Wayland Only]
Returns the Wayland display (wl_display*). Available in GTK, GTK 4, Qt, FLTK and EFL when running on Wayland.
Default Attributes
DLGBGCOLOR
The default background color for all elements that have the background similar of the dialog.
DLGFGCOLOR
The default foreground color for all elements that have text over the background of the dialog or similar. Usually is "0 0 0" - black.
MENUBGCOLOR
The default menu background color. Usually is "255 255 255" - white.
MENUFGCOLOR
The system default menu foreground color. Usually is "0 0 0" - black.
TXTBGCOLOR
The default background color for editable text, also used by lists and tree. Usually is "255 255 255" - white.
TXTFGCOLOR
The default foreground color for editable text, also used by lists and tree. Usually is "0 0 0" - black.
TXTHLCOLOR
The default highlight color for editable text, also used by lists and tree. The highlight color is used when the text is selected. Usually is "0 0 0" in Motif, and "51 153 255" in Windows. It can be changed only in IupTree, and only in Windows and Motif. But it can be used for drawing selected areas in custom controls.
LINKFGCOLOR
The default foreground color for linked text. In GTK and Motif, it is "0 0 238".
ERRORCOLOR (read-only)
The color for error text and indicators, following the light or dark appearance. In GTK it is the theme error color, in macOS and iOS the system red, in Android the theme error color and in Haiku the failure color. In the other platforms it is "196 43 28", or "255 153 164" when the appearance is dark.
ACCENTCOLOR
The accent color, used for primary buttons, toggles, progress bars, focus indicators, and similar UI elements. Default: the system accent color, the user-selected theme accent color. It is not the text selection background (TXTHLCOLOR). Setting it colors the fill of IupProgressBar elements without FGCOLOR and the track of IupToggle with SWITCH=YES, including existing elements. In Android and WebAssembly, setting it replaces the theme accent. In Motif, FLTK, EFL and GNUstep on Linux and BSD, the default is the accent-color setting of the XDG Desktop Portal when the portal reports one. Setting it is not supported in macOS, iOS, Motif, FLTK, EFL and Haiku. In GTK 2, setting it colors only the switch track.
In some platforms, the default value is the same as TXTHLCOLOR.
DEFAULTFONT
The default font used by all elements, except for menus.
DEFAULTFONTFACE
Auxiliary attribute to retrieve and set the default font face used by all elements. It retrieves the typeface from DEFAULTFONT. When changed will actually change the DEFAULTFONT.
DEFAULTFONTSIZE
Auxiliary 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.
DEFAULTFONTSTYLE
Auxiliary attribute to retrieve and set the default font style used by all elements. It retrieves the style from DEFAULTFONT. When changed will actually change the DEFAULTFONT.
DEFAULTBUTTONPADDING
Default button padding used in pre-defined dialogs. Default: "12x4".
DEFAULTTHEME
Applies a default theme for all controls. See THEME attribute for more information.