Up: GEOS SDK TechDocs | Up | Prev: NameArrayFind() ... | Next: ObjCompProcessChildren() ...

ObjCompFindChildByOptr()

word	ObjCompFindChildByOptr(
        optr	obj,		/* parent's optr */
        optr	childToFind,		/* optr of child to find */
        word	masterOffset,		/* offset to master part */
        word	compOffset,		/* offset to comp field in master part */
        word	linkOffset);		/* offset to link field in master part */

This routine returns the zero-based child number of an object given its optr and its parent's optr. The returned number represents the child's position in its parent's child list. For example, a return value of zero indicates the object is the parent's first child. You will not likely use this routine; instead, you will probably use the messages shown below under "See Also."

The parameters for this routine are listed below:

obj
The optr of the parent object.
childToFind
The optr of the child whose number is to be returned. If the child is not found, the routine will return -1.
masterOffset
The offset within the parent's instance chunk to the master group's offset. (The value that would appear in the parent class' Class_masterOffset field in its ClassStruct structure.)
compOffset
The offset within the parent's instance chunk to the composite field.
linkOffset
The offset within the parent's instance chunk to the link field.

Include: metaC.goh

See Also: MSG_GEN_FIND_CHILD, MSG_VIS_FIND_CHILD.

ObjCompMoveChild()

void	ObjCompMoveChild(
        optr	obj,		/* parent's optr */
        optr	objToMove,		/* optr of child to move */
        word	flags,		/* CompChildFlags */
        word	masterOffset,		/* offset to master part */
        word	compOffset,		/* offset to comp field in master part */
        word	linkOffset);		/* offset to link field in master part */

This routine moves the specified child within its parent's child list. This routine will not move a child from one parent to another, but it can reorganize a parent's children. You will not likely use this routine, but you may often use the messages listed under "See Also" below.

The parameters of this routine are shown below:

obj
The optr of the parent object.
objToMove
The optr of the child to be moved. If the optr does not point to a valid child, behavior is undefined and an error is likely.
flags
A record of CompChildFlags indicating the new position of the child and whether the link should be marked dirty.
masterOffset
The offset within the parent's instance chunk to the master group's offset. (The value that would appear in the parent class' Class_masterOffset field in its ClassStruct structure.)
compOffset
The offset within the parent's instance chunk to the composite field.
linkOffset
The offset within the parent's instance chunk to the link field.

Warnings: This routine may cause LMem and/or Object Blocks to move or to shuffle their chunks, thereby invalidating any segment addresses or pointers.

Include: metaC.goh

See Also: MSG_GEN_MOVE_CHILD, MSG_VIS_MOVE_CHILD.


Up: GEOS SDK TechDocs | Up | Prev: NameArrayFind() ... | Next: ObjCompProcessChildren() ...