The Text Objects: 3.3 The Text Object Library: Storage Flags

Up: GEOS SDK TechDocs | Up | Prev: 3.2 Paragraph Attribute Definitions | Next: 4 Text Object Chunks

As you have seen, the Text Object Library provides a multitude of character and paragraph attributes to use in the display of text. The library also provides a number of different subsets of attributes and ways to store these attributes.

A simple text object may only need a 16-bit record (such as VisTextDefaultCharAttr or VisTextDefaultParaAttr ) to store its text attributes; a highly complex text object may need a chunk array of several 30+ byte elements. The manner in which these attributes are stored is specified in the VisTextStorageFlags of the text object.

Code Display 10-15 VisTextStorageFlags

typedef ByteFlags VisTextStorageFlags;
#define VTSF_LARGE				0x80
#define VTSF_MULTIPLE_CHAR_ATTRS				0x40
#define VTSF_MULTIPLE_PARA_ATTRS				0x20
#define VTSF_TYPES				0x10
#define VTSF_GRAPHICS				0x08
#define VTSF_DEFAULT_CHAR_ATTR				0x04
#define VTSF_DEFAULT_PARA_ATTR				0x02
#define VTSF_STYLES				0x01
VTSF_LARGE
This flag states that this text object is using the large model for its data. In this case, the rest of the settings in VisTextStorageFlags are ignored. The large model is a highly complex text formatting tool; you should avoid it entirely until you are familiar with other aspects of the text object.
VTSF_MULTIPLE_CHAR_ATTRS
This flag specifies that the text may display multiple character attributes. Each character may then display its own character attributes independent of other characters. If this flag is set, VTSF_DEFAULT_CHAR_ATTRS must be not set.
VTSF_MULTIPLE_PARA_ATTRS
This flag specifies that the text may display multiple paragraph attributes. Each paragraph may then display its own attributes independent of other paragraphs. If this flag is set, VTSF_DEFAULT_PARA_ATTRS must not be set.
VTSF_TYPES
This flag specifies that this text object contains a types run.
VTSF_GRAPHICS
This flag specifies that this text object contains a graphics run.
VTSF_DEFAULT_CHAR_ATTRS
This flag specifies that this text object only uses a set of provided default character attributes. These default attributes are represented by a record of type VisTextDefaultCharAttrs . If this flag is not set, the text object will use the larger VisTextCharAttr structure to store its character attributes instead.
VTSF_DEFAULT_PARA_ATTRS
This flag specifies that this text object only uses a set of provided default paragraph attributes. These default attributes are represented by a record of type VisTextDefaultParaAttrs . If this flag is not set, the text object will use the larger VisTextParaAttr structure to store its paragraph attribute.
VTSF_STYLES
This flag specifies that this text object contains a styles run.

Up: GEOS SDK TechDocs | Up | Prev: 3.2 Paragraph Attribute Definitions | Next: 4 Text Object Chunks