Anchor markers

An anchor marker is a persistent marker or placeholder in a model's data. It is used to implement hypertext and hypermedia links within a document or between documents.

An anchor marker is capable of generating a selection on the data that it marks. An anchor marker can be linked to other anchor markers. An anchor marker can track changes in its peer anchor marker and manipulate the data attached to its peer.

Operations on anchor markers

Anchor markers can be created, deleted, and relocated. They can also be updated to reflect editing changes in the source or destination document.

Anchor marker creation and deletion

Anchor markers are almost always created outside of the model that will eventually own them. Create an anchor marker by giving it a selection to indicate the data it should mark. Then adopt it into the model that owns the anchor marker. Creation is done this way to support collaboration and command logging.

You can delete an anchor marker explicitly or it can be deleted by the Compound Document framework when the data it selects is deleted (at the option of the model containing the data).

Types of anchor markers

Anchor markers are either static or dynamic.

A static anchor marker always selects the same data. A static anchor marker tracks (stays with) static data across editing changes and location changes. A static anchor marker travels with the data selection that it marks. A Dynamic anchor marker has a data specification that can mark different data over its lifetime.

One example of a static anchor marker would be a text anchor marker. Text selections are associated with this type of anchor marker. The text selection would mark a range of characters in a text model. The text anchor marker would have to move (positionally) as the data in the model changed through the editing process.

An example of a Dynamic anchor marker would be a "maximum value" anchor marker in a spreadsheet which indicates the maximum value of a range of cells. As the maximum value changes, so would the actual cell associated with the anchor marker.

Anchor markers are responsible (and have member functions defined) for ensuring that their associated selections are persistent and locatable (a reference to them can be created) to the model in which they reside.


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker