QTAtoms QT Atom commands

QT_InsertChild

QT_InsertChild(containerRef; parentAtomOffset; atomType; atomID; atomIndex; atomOffset):error
containerRef Longint Atom container reference
parentAtomOffset Longint Parent atom offset
atomType String4 Atom type
atomID Longint Atom ID
atomIndex Longint Atom index
atomOffset Longint Atom offset
error Longint Error result

Creates a new child atom for the specified parent atom.

Parameter containerRef specifies the atom container. It must have been previously obtained with a call to QT_NewAtomContainer.

Parameter parentAtomOffset specifies the parent atom within the atom container. To reference the root level atom, set parentAtomOffset to 0.

Parameter atomType specifies the type of the new atom to be inserted.

Parameter atomID pecifies the ID of the new atom to be inserted. This ID must be unique among atoms of the same type for the specified parent. If you set this parameter to 0, a unique ID is assigned to the atom, and the ID is returned to the caller.

Parameter atomIndex specifies the index of the new atom among atoms with the same parent. To insert the first atom for the specified parent, you should set the index parameter to 1. To insert an atom as the last atom in the child list, you should set the index parameter to 0. If atomIndex is set to 0, the new index is returned to the caller.

Parameter atomOffset receives the offset of the new atom.

Related commands

QT_InsertChildren Inserts a container of atoms as children of the specified parent atom
QT_RemoveAtom Removes an atom and its children from the specified atom container

QTAtoms © Escape
Generated by QDoc 2.8 on Tue, Jan 27, 2009 20:29:48