GraphFileKeys.mesa, Copyright © 1985 by Xerox Corporation. All rights reserved.
Last edited:
Sweetsun Chen, November 1, 1985 5:48:48 pm PST
DIRECTORY
Basics USING [BYTE];
GraphFileKeys: CEDAR DEFINITIONS = {
BYTE: TYPE = Basics.BYTE;
EndOfListKey, EndOfRecordKey: BYTE = 0;
TrueKey, NoneKey, LeftKey, TopKey, OneByOneKey: BYTE = 1;
FalseKey, RoundKey, CenterKey: BYTE = 2;
SquareKey, RightKey, BottomKey: BYTE = 3;
DiamondKey: BYTE = 4;
CrossKey, CrossSectionsKey: BYTE = 5;
DollarKey: BYTE = 6;
PercentKey: BYTE = 7;
TextKey, NameKey, PrimaryKey, XKey, ValueKey, RKey, MaxKey, NamesKey:
BYTE = 1;
TextsKey, PlaceKey, SecondaryKey, YKey, WidthKey, GKey, BoldKey, MinKey, EntityKey:
BYTE = 2;
CaretsKey, FontIndexKey, TextCaretKey, BKey, ItalicKey, MarkKey, DataKey, EntityListKey:
BYTE = 3;
ShowSlopeKey, VFontSizeKey, ColorIndexKey, NELKey, EntityGroupKey:
BYTE = 4;
TargetsKey, RotationKey, PFontScaleKey, ValuesKey, NestedEntitiesKey:
BYTE = 5;
GridsKey, JustificationsKey, GroupIdKey:
BYTE = 6;
DivisionsKey, TextIdKey, EntityIdKey, LengthKey:
BYTE = 7;
BoundsKey, LevelKey, TailsKey:
BYTE = 8;
AutoKey:
BYTE = 9;
ColorsKey:
BYTE = 10;
FontsKey, MarksKey, CommentKey:
BYTE = 11;
EntityGroupListKey, WidthsKey, OnKey:
BYTE = 12;
}..
LOG.
SChen, created at October 9, 1985 6:01:16 pm PDT
Convension: "->" below means "is followed by".
Graph:= [
-- Name(file name)(1, -> rope),
Texts(2, -> a series of Text, which is [
Name(1, -> rope),
Place(2, -> vec),
FontIndex(3, -> byte),
ColorIndex(4, -> byte),
Rotation(5, -> real),
Justifications(6, -> Justification, which is [
X(1, -> either left(1), center(2), or right(3))
Y(2, -> either top(1), center(2), or bottom(3))
];
),
TextId(7, int)
],
Carets(3, -> Carets, which is [
Primary(1, Caret, which is [ -- real, real, bool for now
Place(2, -> vec)
On(12, -> bool), (for text input, default changed from false to true if Caret is specified.)
];
),
Secondary(2, -> Caret),
TextCaret(3, -> Caret)
];
),
Slope(4, bool),
Targets(5, -> Targets, which is [ -- real, real, byte, bool, real, real, byte, bool for now.
X(1 -> Target, which is [
Value(1, -> real),
Width(2, -> real)
ColorIndex(4, -> byte),
On(12, -> bool) (for text input, default changed from false to true if Target is specified.)
];
Y(2, -> Target)
];
),
Grids(6, -> Grids, which is:
a) for binary file, bool(for x), bool(for y);
b) for text file, [
X( -> bool), (default changed from false to true if X is specified.)
Y( -> bool) (default changed from false to true if Y is specified.)
];
)
Divisions(7, -> Divisions, which is:
a) for binary file, byte(for x), byte(for y);
b) for text file, [
X( -> byte),
Y( -> byte)
];
),
Bounds(8, -> Bounds, which is:
a) for binary file, real, real, real, real (for xmin, ymin, xmax, ymax, respectively);
b) for text file, [
xmin( -> real)
ymin( -> real)
xmax( -> real)
ymax( -> real)
];
),
Auto(9, -> Auto, which is:
a) for binary file, bool(for div), bool(for bounds)
b) for text file, [
Division( -> bool), default changed ...
Bounds( -> bool), default changed ...
]
Colors(10, -> Colors, which is array[0..NumberOfColors) of Color, which is:
a) for binary file, real(R), real(G), real(B);
b) for text file, [
R(1, -> real),
G(2, -> real),
B(3, -> real)
];
),
Fonts(11, -> Fonts, which is array[0..NumberOfFonts) of Font, which is:
a) for binary file,
rope(for font family), bool(for bold), bool(for italic), byte(for vfont size), and real(for p font scale);
b) for text file, ...
Entities(12, -> OneByOne(1), CrossSections(5), or EntityGroupList(3), where
OneByOne -> a series of SimpleEntity, which is [ -- the first is the x entity, not supported yet.
Name(1, -> rope)
ColorIndex(4, -> byte)
Mark(3, -> byte, which is none(1), round(2), square(3), diamond(4), cross(5), dollar(6), or percent(7).
Width(2, -> real)
Values(5, -> a series of real)
];
CrossSections(5, ... -> [ -- not supported yet.
Names(1 -> a series of rope), --> infer NumEntities.
Data(3 -> a series of real),
NumEntities(4 -> int),
XId(2, -> int),
Colors(10, -> a series of byte)
Marks(11, -> a series of byte(for mark))
Widths(12, -> a series of real)
]
EntityGroupList is a series of EntityGroup, which is [
-- Name(1, -> rope),
-- XId(2, -> int),
XEntity(2, -> Entity, which is [ -- x
Name(1, -> rope)
ColorIndex(4, -> byte)
Mark(3, -> mark, which is none(1), round(2), square(3), diamond(4), cross(5), dollar(6), or percent(7).
Width(2, real)
-- Values(5, a series of real)
-- GroupId(6, int)
-- Parent
EntityId(7, int)
-- Level(8, int)
]; -- the first entity on list is the x entity.
),
NEL(4, NestedEntitiesList, which is [ -- ys
Name(1, -> rope)
EntityList(3, EntityList, which is a series of Entity),
-- Parent
Children(4, NestedEntitiesList)
];
CrossSections(5, a series of (Tails(8) followed by a series of real) followed by EOL.
GroupId(6, int)
Length(7, int)