VisComp: 2.1 VisCompClass Instance Data: VCI_comp

Up: GEOS SDK TechDocs | Up | Prev: 2 VisCompClass Instance Data | Next: 2.2 VCI_gadgetExcl

Normal visible objects have just one instance field for tree construction: the VI_link field that points to the object's next sibling. For an object to have children, it must also have an instance field declared with the keyword @composite ; this field, in VisCompClass , is VCI_comp . The composite field contains the optr of the object's first child; the link field contains a pointer to either the object's next sibling or its parent.

Applications should never access the VI_link or VCI_comp fields directly at run-time; instead, these fields can be altered or queried with the following messages (all defined in VisClass ):

MSG_VIS_ADD_CHILD
This message adds a new child object to the composite.
MSG_VIS_REMOVE_CHILD
This message removes a child from the composite.
MSG_VIS_MOVE_CHILD
This message moves a child within the composite's list of children.
MSG_VIS_GET_PARENT
This message returns a pointer to the object's parent.

Several other messages may also be used to change or query any visible object's VI_link and VCI_comp fields. These are discussed in the VisClass chapter.


Up: GEOS SDK TechDocs | Up | Prev: 2 VisCompClass Instance Data | Next: 2.2 VCI_gadgetExcl