Download Portable User Interface
Transcript
19/11/2014 IUP Portable User Interface Returns: the actual parent if the interface element was successfully inserted. Otherwise returns NULL (nil in Lua). Notice that the desired parent can contains a set of elements and containers where the child will be actually attached so the function returns the actual parent of the element. Notes This function can be used when elements that will compose a container are not known a priori and should be dynamically constructed. The new child can NOT be mapped. It will NOT map the new child into the native system. If the parent is already mapped you must explicitly call IupMap for the appended child. If the actual parent is a layout box (IupVbox, IupHbox or IupZbox) and you try to insert a child that it is already at the parent child list, then the child is moved to the insert position. The elements are NOT immediately repositioned. Call IupRefresh for the container* to update the dialog layout (* or any other element in the dialog). See Also IupAppend, IupDetach, IupHbox, IupVbox, IupZbox, IupMenu, IupMap, IupUnmap, IupRefresh IupReparent (Since 3.0) Moves an interface element from one position in the hierarchy tree to another. Both new_parent and child must be mapped or unmapped at the same time. If ref_child is NULL, then it will append the child to the new_parent. If ref_child is NOT NULL then it will insert child before ref_child inside the new_parent. Parameters/Return int IupReparent(Ihandle* child, Ihandle* new_parent, Ihandle* ref_child); [in C] iup.Reparent(child, new_parent, ref_child: ihandle) > error: number [in Lua] child: Identifier of the element to be moved. new_parent: Identifier of the new parent. ref_child: Identifier of the element to be used as reference, where the child will be inserted before it. Can be NULL. (since 3.3) Returns: IUP_NOERROR if successfully, IUP_ERROR if failed. Notes This function is faster and easier than doing the sequence unmap, detach, append/insert and map. The elements are NOT immediately repositioned. Call IupRefresh for the container (or any other element in the dialog) to update the dialog layout. Motif does not support the reparent function, but we simulate a reparent doing a unmap/map sequence. But some attributes may be lost during the operation, mostly attributes that are id dependent. See Also IupAppend, IupInsert, IupDetach, IupMap, IupUnmap, IupRefresh IupGetParent Returns the parent of a control. Parameters/Return Ihandle* IupGetParent(Ihandle *ih); [in C] iup.GetParent(ih: ihandle) > parent: ihandle [in Lua] ih: identifier of the interface element. Returns: the handle of the parent or NULL if does not have a parent. See Also IupGetChild, IupGetNextChild, IupGetBrother IupGetChild file:///D:/tecgraf/iup/html/wb/iup.html 163/362