VisComp: 3 Using VisCompClass

Up: GEOS SDK TechDocs | Up | Down | Prev: 2 VisCompClass Instance Data | Next: 3.1 Managing Geometry

With the exception of the geometry flags mentioned above and the management of children, the use of VisCompClass is little different from the use of VisClass . In fact, most of the functionality designed for VisCompClass is built directly into VisClass ; for example, nearly all geometry management and object tree management messages are defined in VisClass . Some reminders are listed below, however.

Not all composite objects will have something to draw. Some composites will be used simply as grouping objects to manage visible children. In these cases, you will not have to subclass VisCompClass but can instead use the class directly.

Many composite objects will have something to draw, though. For example, a composite may want to draw a box around its children or wash a different background color behind them. If this is the case, the object must be a subclass of VisCompClass and must handle MSG_VIS_DRAW .

One of the primary functions of VisCompClass is to pass input events and other messages down and up the tree to the proper objects. This is done automatically. You can, however, change this behavior by subclassing VisCompClass and intercepting the messages in which the object will be interested.


Up: GEOS SDK TechDocs | Up | Down | Prev: 2 VisCompClass Instance Data | Next: 3.1 Managing Geometry