IupGLScrollBox (since 3.11)

Creates an embedded OpenGL container that allows its child to be scrolled. It inherits from IupGLSubCanvas. It exists only inside an IupGLCanvasBox.

Creation

Ihandle* IupGLScrollBox(Ihandle* child); [in C]
iup.glscrollbox{child: ihandle} -> (elem: ihandle) [in Lua]
glscrollbox(child) [in LED]

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

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

Attributes

The IupGLScrollBox element handle all attributes defined for a IupGLSubCanvas control.

It contains automatic scrollbars that are shown or hidden accordingly if the child natural size fits the client size. See the Scrollbars Attributes for IupGLControls for more details.


EXPAND (non inheritable): The default value is "YES".

POSX: Position of the thumb in the horizontal scrollbar. Default: "0.0". DX is the visible horizontal area and XMAX is set to the child natural width.

POSY: Position of the thumb in the vertical scrollbar. Default: "0.0". DY is the visible vertical area and YMAX is set to the child natural height.


CLIENTSIZE, CLIENTOFFSET: also accepted.

Notes

The box allows the application to create a virtual space for the dialog that is actually larger than the visible area. The current size of the box defines the visible area. The natural size of the child (and its children) defines the virtual space size. So the IupGLScrollBox does not depend on its child size or expansion, and its natural size is always 0x0.

The user can move the box contents by dragging the background. Also the mouse wheel scrolls the contents vertically.

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

Examples

Browse for Example Files