The Text Objects: 1.1 The Text Objects: Which Object Should I Use?

Up: GEOS SDK TechDocs | Up | Prev: 1 The Text Objects | Next: 1.2 How this Chapter is Organized

The VisText object is the more complex of the two objects. In general, a VisText object may exhibit any of the many features present within the text object library; the GenText object may only exhibit a subset of this behavior. The GenText object is not a low-level object, however; in most cases, GenTextClass may use most of the messages provided with VisTextClass . It is only in more complex text operations (such as drawing text to regions or incorporating complex graphics into text) that a GenText object is not as useful.

Typically, geodes that want full-featured word processing will use a VisText object (typically within a scrollable GenView and a VisContent). Simple text editing and input (within a database field, for example) are normally done with an editable GenText object. For other cases, it is up to you. There are advantages to either approach. GenText is easier to use, but VisText is more versatile.

Typically, the makeup of your user interface will decide which text object is more appropriate. GenText objects should be attached to the generic tree; VisText objects should instead be attached to the visible tree. Most of the features listed below are described with respect to VisText objects; in most cases, however, they are equally applicable to the GenText.

The main functional difference between a VisText and a GenText object is the ability of VisText to use what is known as the large text model. The large model allows a text object to define flow regions, provide for text to be stored within a VM file, and offers several other rather complex features. This behavior is essential for providing complex text formatting features. It is usually not required for most text needs, however.

The GenText object does not support this text model. In cases where you feel you need to use functionality of the large model, you should use a VisText object within a visible tree. Luckily, most of these capabilities are automatic when using a VisText object. (You will rarely set up a VisText object already using this model, for instance; instead, whenever the VisText is forced to use operations requiring the large model, the application will force it to convert itself.)


Up: GEOS SDK TechDocs | Up | Prev: 1 The Text Objects | Next: 1.2 How this Chapter is Organized