Vendetta/helium/api/iup insert
From Quasar-RCE
Jump to navigationJump to search
Intended to behave like iup.Append(), but the child is put within an arbitrary location instead of after other children.
Definition
helium.util.iup_insert(root_ihandle, child_ihandle, position) -> nil
Arguments
root_ihandle: type *iup_object: dialog or other iup element item to add the child into. child_ihandle: type *iup_object: iup element item to be inserted at top of the root object's stack. position: type number: index of target placement of the child.
Notes
- In order to insert elements, this function iterates and detaches all existing items before adding the new element, and then re-attaches all the other elements in order. As such, extremely large iup structures may be expensive to insert items into; if inserting elements into a long list of items, consider using the asynchronous version of this function to retain client functionality.
- Similar to table.insert, positive numbers index from the start of the iup children list, while negative numbers index from the end of the list. If an item is out of bounds, it is inserted at the relevant end of the list.