Function CDM_DisplaceAnnotations


Definition:#include <CDM.h>
Prototype:int CDM_DisplaceAnnotations(CDM_Document Document, long offset, long displacement);
Arguments:

Document: A Document Object (CDM_Document)
offset: A character offset after which all offsets are modified (long)
displacement: The number of characters that offsets will be moved (long)


Prototype:CDM_AnnotationSet CDM_DisplaceAnnotations(CDM_AnnotationSet Set, long offset, long displacement);
Arguments:

Set: Annotation Set object (CDM_AnnotationSet)
offset: A character offset after which all offsets are modified (long)
displacement: The number of characters that offsets will be moved (long)

C/C++ API Sections
Tcl API Sections
Description
Return Value
Notes
See Also
Index

Description:

int CDM_DisplaceAnnotations(CDM_Document Document, long offset, long displacement):
This function displases or "moves" the Annotations of the specified Document by "displacement" characters. This function will iterate over all Annotations contained in the Document. For each Annotation, all spans contained in the span set will be examined: for each offset in the span (either start or end), if it is equal or greater than the value provided by the "offset" parameter, then the value of the "displacement" parameter will be added.

CDM_AnnotationSet CDM_DisplaceAnnotations(CDM_AnnotationSet Set, long offset, long displacement):
This function displases or "moves" the Annotations of the specified Annotation set by "displacement" characters. This function will iterate over all Annotations contained in the Annotation set. For each Annotation, all spans contained in the span set will be examined: for each offset in the span (either start or end), if it is equal or greater than the value provided by the "offset" parameter, then the value of the "displacement" parameter will be added.

Return Value:

int CDM_DisplaceAnnotations(CDM_Document Document, long offset, long displacement):
The return value from this function will be a standart Tcl completion code (of type int). As this function ignores any possible errors, the return value will always be TCL_OK.

CDM_AnnotationSet CDM_DisplaceAnnotations(CDM_AnnotationSet Set, long offset, long displacement):
This function returns an Annotation set object (of type CDM_AnnotationSet), that contains all the Annotations contained in the original set, where some of them may be displaced. The caller is responsible to free this object through Tcl_DecrRefCount or CDM_Free when it is not needed any more.

If an error occurs, then NULL will be returned and an error message will be left at the current active Tcl interpreter (CDM_Interp).

Notes:

int CDM_DisplaceAnnotations(CDM_Document Document, long offset, long displacement):
This function is equivelant to tip_DisplaceAnnotations (Tcl API).

CDM_AnnotationSet CDM_DisplaceAnnotations(CDM_AnnotationSet Set, long offset, long displacement):
This function is equivelant to tip_DisplaceAnnotations (Tcl API).

See Also:

int CDM_DisplaceAnnotations(CDM_Document Document, long offset, long displacement):
CDM_DisplaceAnnotation, tip_DisplaceAnnotations

CDM_AnnotationSet CDM_DisplaceAnnotations(CDM_AnnotationSet Set, long offset, long displacement):
CDM_DisplaceAnnotation, CDM_Free, Tcl_DecrRefCount, tip_DisplaceAnnotations


Generated by: petasis@aias on Wed Aug 16 10:31:57 PM EEST 2006.