<> <> <> <> <> DIRECTORY Imager USING [Context], <> ISToken USING [TVObject, TVHandle, InterscriptContext], ISBinding USING [Handle], Rope USING [ROPE], ViewerClasses USING [Viewer]; ISNode: CEDAR DEFINITIONS = BEGIN <> Handle: TYPE = REF Object; Object: TYPE = RECORD [ implementationChainHandle: --PRIVATE-- REF _ NIL, <<^^ ISNodeImpl.ImplementationChainHandle speeds search -->> empty: BOOLEAN _ FALSE, -- for marking empty nodes in pages -- parent: ISNode.Handle _ NIL, format: ATOM, --for PARA$-- text: Rope.ROPE, --for CHARS$-- looks: Rope.ROPE, --for CHARS$-- contextThread: ContextHandle _ NIL, printProc: TiogaPrintProc, taggedBindingsList: LIST OF ISBinding.Handle _ NIL, --Stores bindings assoc. with secondary tags, which have to stick around.-- seenSubnode: BOOL _ FALSE, --Used to tell if a CHARS$ child of a PARA$ should have ISContinuation property set in Tioga-- lastNodeEnd: INT _ 0, --Used in CHARS$ nodes to note end of previous node's text in temp file-- textIndex: INT _ 0, -- saves position of last character in first pass temp file -- primaryTag: ATOM, tag: ATOM, --tag currently being internalized, used by ISImplProcs.DefaultInternalizeProc-- tagThread: TagHandle _ NIL]; -- array of booleans for standardized -- <> ContextRecord: TYPE = RECORD [ type: ATOM, context: ISToken.InterscriptContext, next: ContextHandle ]; ContextHandle: TYPE = REF ContextRecord; TagRecord: TYPE = RECORD [tag: ATOM, next: TagHandle]; TagHandle: TYPE = REF TagRecord; <> ImplementationClass: TYPE = {primary, onlyBindings, onlyTag}; Implementation: TYPE = REF ImplementationObject; ImplementationObject: TYPE = RECORD [ internalize: InternalizeProc, externalize: ExternalizeProc, destroy: DestroyProc _ NIL, printTioga: TiogaPrintProc _ NIL, interpress: InterpressProc _ NIL, createWindow: CreateWindowProc _ NIL, enumerate: EnumerateChildrenProc _ NIL, copy: CopyProc _ NIL, getBinding: GetBindingProc _ NIL, setBinding: SetBindingProc _ NIL, getContentItem: GetContentItemProc _ NIL, coerceBindings: CoerceBindingsProc _ NIL, --added 22may85 rma-- implementationClass: ImplementationClass, mustInternalizeAllContent: BOOLEAN _ FALSE ]; <> InternalizeProc: TYPE = PROCEDURE [node: Handle, interscriptContext: ISToken.InterscriptContext]; <> TiogaPrintProc: TYPE = PROCEDURE [deltaLevel: INT, node: ISNode.Handle] RETURNS [nests: INT _ 0]; ExternalizeProc: TYPE = PROCEDURE [node: Handle, externalizeContext: --ISOut.Handle-- REF]; DestroyProc: TYPE = PROCEDURE [node: Handle]; InterpressClippingBox: TYPE = RECORD [x, y, w, h: REAL]; InterpressProc: TYPE = PROCEDURE [ node: Handle, interpressContext: Imager.Context, clippingBox: InterpressClippingBox ]; EditMode: TYPE = {galley, layout}; CreateWindowProc: TYPE = PROCEDURE [ node: Handle, editMode: EditMode, micasPerPixel: CARDINAL] RETURNS[ViewerClasses.Viewer]; EnumerateChildrenAnswerType: TYPE = {node, characters}; EnumerateChildrenAnswer: TYPE = RECORD [ body: SELECT type: EnumerateChildrenAnswerType FROM node => [handle: ISNode.Handle], characters => [ readerBody: Rope.ROPE, font: INTEGER, labels: SEQUENCE number: CARDINAL OF ATOM ], ENDCASE _ NULL ]; EnumerateChildrenCallback: TYPE = PROCEDURE [ child: EnumerateChildrenAnswer, context: REF ANY ] RETURNS [continue: BOOLEAN _ TRUE]; EnumerateChildrenProc: TYPE = PROCEDURE [ node: Handle, context: REF ANY, enumerationProc: EnumerateChildrenCallback ]; CopyProc: TYPE = PROCEDURE [ old, new: Handle ]; GetBindingProc: TYPE = PROCEDURE [node: Handle, binding: ATOM] RETURNS [ISToken.TVObject]; SetBindingProc: TYPE = PROCEDURE [ node: Handle, binding: ATOM, value: ISToken.TVHandle]; GetContentItemProc: TYPE = PROCEDURE [node: Handle, index: CARDINAL] RETURNS [ISToken.TVObject]; CoerceBindingsProc: TYPE = PROCEDURE [to, from: Handle, coercion: ISToken.TVHandle _ NIL]; ErrorCode: TYPE = {spare, extra}; Error: ERROR [code: ErrorCode]; SetImplementation: PROCEDURE [ -- Installation of an implementation -- tag: ATOM, family: ATOM, implementation: Implementation] RETURNS [oldImplementation: Implementation]; GetImplementation: PROCEDURE[ tag: ATOM, family: ATOM ] RETURNS [implementation: Implementation]; GetPrimaryImpl: PROCEDURE [Handle] RETURNS [Implementation]; GetPrimaryImplAndTag: PROCEDURE [Handle] RETURNS [implementation: Implementation, tag: ATOM]; <> Externalize: ExternalizeProc; Interpress: InterpressProc; CreateWindow: CreateWindowProc; Enumerate: EnumerateChildrenProc; Copy: PROCEDURE [old: Handle, with: Handle _ NIL] RETURNS [Handle]; Create: PROCEDURE [--with: ISNode.Handle--] RETURNS [Handle]; Destroy: PROCEDURE [REF Handle]; GetContext: PROCEDURE [node: Handle, type: ATOM] RETURNS [context: ISToken.InterscriptContext]; SetContext: PROCEDURE [node: Handle, type: ATOM, context: ISToken.InterscriptContext]; EnumerateContextsCallback: TYPE = PROCEDURE [node: Handle, type: ATOM, context: REF ] RETURNS [continue: BOOLEAN _ TRUE]; EnumerateContexts: PROCEDURE [node: Handle, enumerationProc: EnumerateContextsCallback, context: REF]; <> <> SetTag: PROCEDURE [node: Handle, tag: ATOM]; ClearTag: PROCEDURE [node: Handle, tag: ATOM]; HasTag: PROCEDURE [node: Handle, tag: ATOM] RETURNS [BOOLEAN]; AllocateInitialNode: PROCEDURE [session: REF] RETURNS [ISNode.Handle]; END.