Copyright Ó 1985 , 1992by Xerox Corporation. All rights reserved.
AdobeToolContext.mesa
MXF x
RSF 20-Mar-85 16:18:10
JCS 12-Sep-85 14:17:17
Philip James, February 19, 1991 4:34 pm PST
DIRECTORY
AdobeOps USING [ARNumber, ARSystemHandle, EnumeratedSequence,
FieldList, FieldType, KeyedPossibilities, ToolType],
ARAccess USING [ARStorage],
BasicTime USING [GMT],
IO USING [STREAM],
Rope USING [ROPE];
Stream USING [Handle],
Time USING [Packed];
AdobeToolContext: CEDAR DEFINITIONS =
BEGIN
DefaultType: TYPE = {systemMust, userDefault};
raised if GetBlock called with block size less than 2
BlockTooSmall: ERROR;
raised from calls to GetFieldValue, GetFieldValuePair and ReadAR
StreamError: ERROR [type: Type];
Type: TYPE = {
fieldListEmpty, fieldNameNotFound, badValueField, badFieldNameField,
missingFieldNameField, missingValueField};
EnumError: ERROR [why: EnumProblemType];
EnumProblemType: TYPE = {noMatch};
CreateStream: PROCEDURE[fL: AdobeOps.FieldList] RETURNS[ARAccess.ARStorage];
DisplayType: TYPE = {displayedField, nonDisplayedField};
Indices: TYPE = [1..50);
UserContextHandle: TYPE = REF UserContextObject;
UserContext: TYPE = REF UserContextRec;
UserContextRec: TYPE = RECORD[
arSH: AdobeOps.ARSystemHandle,
context: SEQUENCE length: CARDINAL OF UserContextObject];
UserContextObject: TYPE = REF UserContextObjectRec;
UserContextObjectRec: TYPE = RECORD[
dirty: BOOLEAN ¬ FALSE,
body:
SELECT type: DisplayType FROM
nonDisplayedField => [readOnlyField: Rope.ROPE],
displayedField => [editableField: UserContextBody],
ENDCASE];
UserContextBody: TYPE = REF UserContextBodyRec;
UserContextBodyRec: TYPE = RECORD [
SELECT type: AdobeOps.FieldType FROM
arId => [arn: AdobeOps.ARNumber],
fixedLengthString, string => [s: Rope.ROPE],
dateTime => [temp: Rope.ROPE, dt: BasicTime.GMT],
numeric => [num: CARDINAL],
enumerated => [value: CARD16],
ENDCASE];
InitializeUserContext: PROCEDURE[arSH: AdobeOps.ARSystemHandle,
tool: AdobeOps.ToolType] RETURNS[userContext: UserContext];
FreeUserContext: PROCEDURE[uCPtr: REF UserContext];
ResetUserContext: PROCEDURE[uC: UserContext];
ClearUserContext: PROCEDURE[uC: UserContext];
FindPossibilities: PROCEDURE[value: CARDINAL, possibilities: AdobeOps.KeyedPossibilities]
RETURNS[AdobeOps.EnumeratedSequence];
GetValueFromEnumString: PROCEDURE[s: Rope.ROPE, uC: AdobeToolContext.UserContext, index: CARDINAL] RETURNS[value: CARDINAL];
GetEnumValueFromUC: PROCEDURE[uC: AdobeToolContext.UserContext, index: CARDINAL]
RETURNS[value: CARDINAL];
ConvertStreamDataToUserContext: PROCEDURE[sH: IO.STREAM, to: UserContext];
ConvertUserContextToStreamData: PROCEDURE[sH: IO.STREAM, from: UserContext];
For Report to use in getting strings from an AR file
GetValuePairFromTable: PROCEDURE[index: CARDINAL, sH: ARAccess.ARStorage --IO.STREAM--]
RETURNS[value: Rope.ROPE];
For Report. Resets the length of value to 0.
ResetDataTableValues: PROCEDURE[sH: IO.STREAM];
END...