IupGLFrame (since 3.11)

Creates an embedded OpenGL container, which draws a frame with a title around its child. It inherits from IupGLSubCanvas. It exists only inside an IupGLCanvasBox.

Creation

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

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

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

Attributes

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


ALIGNMENT (non inheritable): horizontal and vertical alignment. Possible values: "ALEFT", "ACENTER" and "ARIGHT",  combined to "ATOP", "ACENTER" and "ABOTTOM". Default: "ACENTER:ACENTER". Partial values are also accepted, like "ARIGHT" or ":ATOP", the other value will be used from the current alignment.

BACKCOLOR (non inheritable): color used as background when TITLE and IMAGE are not defined. Can have an alpha component. Default: NULL. Used instead of BGCOLOR to avoid inheritance problems.

BACKIMAGE (non inheritable): image name to be used as background when TITLE and IMAGE are not defined.  It will be zoomed to fill the background (it does not includes the border). Use IupSetHandle or IupSetAttributeHandle to associate an image to a name. See also IupImage. (Since 3.11.1)

BACKIMAGEINACTIVE (non inheritable): background image name of the element when inactive. If it is not defined then the BACKIMAGE is used and its colors will be replaced by a modified version creating the disabled effect. (since 3.11.2)

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

FORECOLOR (non inheritable): Text color. Can have an alpha component. Default: "0 0 0". Used instead of FGCOLOR to avoid inheritance problems.

FRAMECOLOR (non inheritable): color used to draw the frame border. Can have an alpha component. Default: "50 150 255".  Used instead of BORDERCOLOR to avoid inheritance problems.

FRAMEWIDTH (non inheritable): line width of the frame border. Default: 1.  Used instead of BORDERWIDTH to avoid inheritance problems.

IMAGE (non inheritable): Image name. Use IupSetHandle or IupSetAttributeHandle to associate an image to a name. See also IupImage.

IMAGEHIGHLIGHT (non inheritable): Image name of the element in highlight state. If it is not defined then the IMAGE is used.

IMAGEINACTIVE (non inheritable): Image name of the element when inactive. If it is not defined then the IMAGE is used and its colors will be replaced by a modified version creating the disabled effect.

IMAGEPRESS (non inheritable): Image name of the element in pressed state. If it is not defined then the IMAGE is used.

IMAGEPOSITION (non inheritable): Position of the image relative to the text when both are defined. Can be: LEFT, RIGHT, TOP, BOTTOM. Default: LEFT.

MOVEABLE (non inheritable): enable the frame to be interactively moved when it is a direct child of the IupGLCanvasBox. Default: NO.

MOVETOTOP (non inheritable): when MOVEABLE=Yes and the frame is moved then its ZORDER is also set to TOP. (Since 3.11.1)

PADDING (non inheritable): internal margin for the title area. Default value: "2x0".

SPACING (non inheritable): defines the spacing between the image and the title. Default: "2".

TITLE (non inheritable): Text the user will see at the top of the frame. 

TITLEBACKIMAGE (non inheritable): image name to be used as background on the title area. Works only when TITLEBOX=Yes. Use IupSetHandle or IupSetAttributeHandle to associate an image to a name. See also IupImage. (Since 3.11.1)

TITLEBACKIMAGEINACTIVE (non inheritable): background image name of the element when inactive. If it is not defined then the TITLEBACKIMAGE is used and its colors will be replaced by a modified version creating the disabled effect.  (Since 3.11.2)

TITLEBOX (non inheritable): enable a different visual style for the frame. Instead of the traditional round frame that starts and ends at the title area, it will draw a filled box for the title area and a regular rectangle around the child. Default: NO.

TITLEOFFSET (non inheritable): horizontal offset from the left border to start the title area. Default: 5.


CLIENTSIZE, CLIENTOFFSET: also accepted.

Callbacks

The IupGLFrame element handle all callbacks defined for the IupGLSubCanvas control.


MOVE_CB: Called after the frame was moved on the IupGLCanvasBox, when MOVEABLE=Yes. The coordinates are the same as the POSITION attribute.

int function(Ihandle *ih, int x, int y); [in C]
elem:trayclick_cb(x, y: number) -> (ret: number) [in Lua]

ih: identifier of the element that activated the event.
x, y: coordinates of the new position.

Notes

The IupGLFrame can contain text and image simultaneously at the title area.

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