IupGLBackgroundBox (since 3.18)

Creates a simple native container with no decorations, but with OpenGL enabled. It inherits from IupGLCanvas.

OBS: this is identical to the IupBackgroundBox element, but with OpenGL enabled.


Ihandle* IupGLBackgroundBox(Ihandle* child); [in C]
iup.glbackgroundbox{child: ihandle} -> (ih: ihandle) [in Lua]
glbackgroundbox(child) [in LED]

child: Identifier of an interface element which will receive the box. It can be NULL (nil in Lua), not optional in LED.

Returns: the identifier of the created element, or NULL if an error occurs.


Inherits all attributes and callbacks of the IupGLCanvas, but redefines a few attributes.

BGCOLOR: by default will use the background color of the native parent, but can be set to a custom value (since 3.11).

BORDER (creation only): the default value is "NO".

CANVASBOX (non inheritable): enable the behavior of a canvas box instead of a regular container. This will affect the EXPAND attribute, the Natural size computation, and child layout distribution. Can be Yes or No. Default: No. (since 3.19)

CHILDOFFSET (non inheritable): Allow to specify a position offset for the child. Available for native containers only. It will not affect the natural size, and allows to position controls outside the client area. Format "dxxdy", where dx and dy are integer values corresponding to the horizontal and vertical offsets, respectively, in pixels. Default: 0x0. (since 3.14)

DECORATION (non inheritable): Enable a decoration area around the child. Can be Yes or No. Default No. (since 3.20)

DECORSIZE (non inheritable): total size of the decoration in the format "WidthxHeight" (in C "%dx%d). Used only when DECORATION=Yes. (since 3.20)

DECOROFFSET (non inheritable): decoration offset from left border and top border in the format "XxY" (in C "%dx%d). Used only when DECORATION=Yes. (since 3.20)

EXPAND (non inheritable):  behaves as a container. See CANVASBOX attribute.

CANFOCUS (non inheritable): the default is changed to NO. But it can receive the focus (since 3.19).



The box can be created with no elements and be dynamic filled using IupAppend or IupInsert.

The ACTION callback can be defined and the application can draw bellow other children inside the GLBackgroundBox, but only with the OpenGL API. To avoid overlapping the drawing areas it is recommended that children must be inside native containers.


Browse for Example Files