UI Overview: 4.2 Using the Visible Classes: The Visible Object Document

Up: GEOS SDK TechDocs | Up | Prev: 4.1 Visible Objects and the GenView | Next: 4.3 Visible Object Abilities

Visible objects exist in an object tree and draw themselves in the GEOS graphic space. Every visible object knows where in the graphic coordinate space it sits and how big it is. The top object of the object tree, the VisContent, manages the entire tree. Composite objects (of class VisCompClass ) can be used as organizational objects that control other objects.

Using the VisContent, the VisComp, and the standard Vis objects, you can create just about any interactive document you want. (There are other available object libraries such as the spreadsheet and ruler libraries, and they are based on these three building blocks.)

Every visible object knows what its bounds are; that is, each object knows exactly how big it is and where it sits in the graphics document. The bounds are always rectangular in the base VisClass format, though a subclass of VisClass could easily be created to handle more complex shapes. Bounds are in the standard graphics coordinates (i.e. 16-bit numbers based on a 72 dpi grid). Vis objects may also exist in large documents (32-bit coordinates), but the objects must handle the majority of the extra coordinate manipulation on their own.

Visible objects do not inherently know how to draw themselves. However, the GenView, when resized or scrolled (for example), will send MSG_META_EXPOSED to the VisContent. The VisContent object will then send a MSG_VIS_DRAW message to itself and to all its visible object children, directing them to draw themselves in the proper place. For the visible object to draw itself, it must handle MSG_VIS_DRAW . In its handler, it can call any normal graphics commands to draw anything wherever it wants (not just within its bounds).

For examples of visible objects that know their bounds and that handle MSG_VIS_DRAW , see A UI Example .


Up: GEOS SDK TechDocs | Up | Prev: 4.1 Visible Objects and the GenView | Next: 4.3 Visible Object Abilities