Synex ViewPort API Overview

The API is the control panel of the Synex ViewPort™ engine. It consists of:

 

Object Types

The Synex ViewPort™ API uses a few object types that represent the basic objects of the kernel. Using the API is mainly a matter of investigating, manipulating, and combining the Synex ViewPort™ objects.

There are five fundamental objects:

These object types have already been introduced.

Synex ViewPort™ also contains five sub-object types:

An HENT represents an entity declaration. These objects reside in HDTDs (as general and parameter entities) and in HDOCs (as general entities). HENTs are, for instance, used in SGML to identify and reference external entities, such as other SGML documents, graphics, audio, etc.

An HNOT represents a notation declaration. These objects reside in HDTDs and HDOCs, and can be attached to HENTs. An HNOT is a format declaration, specifying the data type of an HENT.

An HTAG represents an element—a tag—in the SGML tree of an HDOC, or rather a location, as the HTAG object can be moved around in the tree. An HTAG can also identify—or position itself at—pseudo elements and NDATA entities.

An HTAGSET is a container where a collection of HTAGs can be stored. An HTAGSET can both be manually created, element by element, or built by an SGML query, collecting the sought elements—for instance all <ANIMAL> elements containing the word cat. An HTAGSET can be passed on to the hardcopy generator, constraining the hardcopy output to the contained elements.

An HANCHOR represents an anchor in an HWEB. The anchor concept was introduced in a previous section.

Synex ViewPort™ also defines an HPAGE object type. An HPAGE object is a rectangular area where a document or a zoomable graphics is displayed. The HPAGE object is not part of the Synex ViewPort™ kernel, but part of the windowing environment of the platform:

This illustration shows the objects and their internal relations:

Synex ViewPort objects and their relations

Relations of Synex ViewPort™ objects

API Functions

There are about 300 functions available in the C API.

 

Callbacks

Whenever Synex ViewPort™ needs advice or information from the main application, it invokes callbacks. By responding to callbacks it becomes possible to:

Synex ViewPort™ also uses callbacks to inform the main application about state changes, such as when the user has made a text selection or scrolled a page. This allows the main application to synchronize its logical state and behavior at all times.