IupMap

Creates (maps) the native interface objects corresponding to the given IUP interface elements.

It will also create the native element of all the children in the element's tree.

The element must be already attached to a container if not a dialog.

Parameters/Return

int IupMap(Ihandle* ih); [in C]
iup.Map(ih: ihandle) -> ret: number [in Lua]

ih: Identifier of an interface element.

Returns: IUP_NOERROR if successful. If the element was already mapped returns IUP_NOERROR. If the native creation failed returns IUP_ERROR.

Notes

If the element is a dialog then the abstract layout will be updated even if the element is already mapped. If the dialog is visible the elements will be immediately repositioned. Calling IupMap for an already mapped dialog is the same as only calling IupRefresh for the dialog.

If you add new elements to an already mapped dialog you must call IupMap for that elements. And then call IupRefresh to update the dialog layout.

If the WID attribute is NULL, it means the element was not already mapped. Some containers do not have a native element associated, like VBOX and HBOX. In this case their WID is a fake (-1) value.

A child is only mapped if its parent is already mapped.

This function is automatically called before the dialog is shown in IupShow, IupShowXY or IupPopup

It is usefull for the application to call IupMap when the value of the WID attribute must be known, or the native element must exist, before a dialog is made visible.

The MAP_CB callback is called just after the native element is created and the dialog layout updated, so it can also be used to create other things that depend on the WID attribute.

See Also

IupAppend, IupDetach, IupUnmap, IupCreate, IupDestroy, IupShowXY, IupShow, IupPopup, MAP_CB