File: GraphPrivate.mesa
Copyright © 1985 by Xerox Corporation. All rights reserved.
Last Edited:
Sweetsun Chen, November 21, 1985 8:08:18 pm PST
DIRECTORY
Basics USING [BYTE],
Imager USING [ConstantColor, Context, Rectangle],
IO USING [STREAM],
Graph USING [AutoType, CaretIndex, ColorIndex, GRAPH, Entity, EntityGroup, FontIndex, GraphColors, GraphFonts, GraphHandle, GraphProc, NullRect, PaintAction, ROPE, Text, XY, ValueList, Viewer],
Menus USING [Menu];
GraphPrivate: CEDAR DEFINITIONS = { OPEN Graph;
GraphPlaceProc: TYPE = PROC [handle: GraphHandle, sx, sy: INTEGER];
GraphAtomProc: TYPE = PROC [handle: GraphHandle, atom: ATOM];
GraphNumberProc: TYPE = PROC [handle: GraphHandle, number: INT];
GraphStreamProc: TYPE = PROC [s: IO.STREAM, graph: GRAPH];
types and signals for graph io.
RopeList: TYPE = LIST OF ROPE;
LVL: TYPE = LIST OF ValueList;
STREAM: TYPE = IO.STREAM;
BYTE: TYPE = Basics.BYTE;
CharPair: TYPE = MACHINE DEPENDENT RECORD[high, low: CHAR];
FourChars: TYPE = MACHINE DEPENDENT RECORD[lh, ll, hh, hl: CHAR];
ReadBeyondEOF: SIGNAL[message: ROPENIL];
SyntaxError: SIGNAL[message: ROPENIL];
DataError: SIGNAL[message: ROPENIL];
public vars -- exported from GraphViewer.mesa
defaultColors: GraphColors;
defaultFonts: GraphFonts;
systemColor: ARRAY ColorIndex OF Imager.ConstantColor;
procedures
implemented by GraphController:
ShowController: GraphProc;
IsController: PROC [viewer: Viewer] RETURNS [BOOL];
implemented by GraphDisplay:
PaintAll: PROC [handle: GraphHandle, clear, clientOnly: BOOLTRUE];
PaintAllCurves: PROC [handle: GraphHandle, clear: BOOLFALSE];
PaintRect: PROC [handle: GraphHandle, action: PaintAction ← paint, clear: BOOLTRUE, rect: Imager.Rectangle ← NullRect];
PaintText: PROC [handle: GraphHandle, action: PaintAction ← paint, text: Text ← NIL];
PaintEntity: PROC [handle: GraphHandle, action: PaintAction ← paint, entity: Entity ← NIL, withLegend: BOOLTRUE];
PaintTails: PROC [handle: GraphHandle, action: PaintAction ← paint, v1, v2: ValueList ← NIL, x1, x2: REAL ← 0.0, reversed: BOOLTRUE];
PaintTarget: PROC [handle: GraphHandle, action: PaintAction ← paint, choice: XY ← x];
PaintGrids: PROC [handle: GraphHandle, action: PaintAction ← paint, choice: XY ← x];
PaintLegend: PUBLIC PROC [handle: GraphHandle, action: PaintAction ← paint, start: Entity, onlyOne: BOOLFALSE];
PaintClient: GraphProc;
implemented by GraphDraw:
Draw: PROC [context: Imager.Context, handle: GraphHandle];
implemented by GraphEdit:
SwitchAuto: PROC [handle: GraphHandle, type: AutoType];
SwitchCaretVisibility,
SwitchCaretBlinking: PROC [handle: GraphHandle, index: CaretIndex ← primary];
SwitchTarget,
SwitchGrid: PROC [handle: GraphHandle, xy: XY];
SelectPoint,
SelectEntity,
SlideOnSameCurve,
SelectText,
MoveSelText,
ZoomIn,
ZoomOut,
ZoomPoint: GraphPlaceProc;
ErasePrimary,
MoveXhair2To1,
EraseSelEntity,
ShowSelEntityOnSpec,
JumpLeftAnyCurve,
JumpRightAnyCurve,
JumpUpAnyCurve,
JumpDownAnyCurve,
JumpLeftSameCurve,
JumpRightSameCurve,
EraseSelText,
SwitchSlope,
ShowSelTextOnSpec,
ZoomWithZoomPts,
ClearZoomBox: GraphProc;
RotateSelTextCW,
RotateSelTextCCW,
SlideLeftNSteps,
SlideRightNSteps: GraphNumberProc;
implemented by GraphMenus:
ChartMenus, ControllerMenus: PROC [] RETURNS [menu: Menus.Menu];
implemented by GraphMonitor:
IsLocked: PROC [handle: GraphHandle] RETURNS [BOOL];
CallWithLock: PROC [handle: GraphHandle, proc: GraphProc];
LockedPlaceProc: PROC [handle: GraphHandle, sx, sy: INTEGER, proc: GraphPlaceProc];
LockedAtomProc: PROC [handle: GraphHandle, atom: ATOM, proc: GraphAtomProc];
Wait: PROC;
UserEditAllowed: PROC [handle: GraphHandle] RETURNS [BOOL];
implemented by GraphOperations:
Operate: GraphAtomProc;
implemented by GraphPanel:
FlipToggle: GraphAtomProc;
MakeSpec,
MakeRule,
MakeXYValues: GraphPlaceProc;
implemented by GraphRead:
HandleFromFile: PROC [file: ROPE] RETURNS [handle: GraphHandle, msg: ROPE];
GetGraph: PROC [handle: GraphHandle, file: ROPE] RETURNS [msg: ROPE];
implemented by GraphReadAscii:
ReadAsciiFile: PROC [handle: GraphHandle, s: IO.STREAM] RETURNS [msg: ROPENIL];
implemented by GraphRemove:
SpecRemove: GraphAtomProc;
RemoveText: PROC[handle: GraphHandle, text: Text];
RemoveEntity: PROC[handle: GraphHandle, entity: Entity];
RemoveAllCurves: GraphProc;
implemented by GraphResume:
ResumeFromPanel: GraphAtomProc;
ShowText: PROC [handle: GraphHandle, text: Text];
ShowEntity: PROC [handle: GraphHandle, entity: Entity];
ResumeTextFields: PROC[handle: GraphHandle, text: Text];
ResumeEntityFields: PROC [handle: GraphHandle, entity: Entity];
implemented by GraphTable:
MakeTable: GraphPlaceProc;
AddTextButton: PROC [handle: GraphHandle, text: Text];
AddEntityButton: PROC [handle: GraphHandle, entity: Entity];
AddGroupButton: PROC [handle: GraphHandle, entityGroup: EntityGroup];
UpdateTextButton: PROC [handle: GraphHandle, text: Text];
UpdateEntityButton: PROC [handle: GraphHandle, entity: Entity];
implemented by GraphUpdate:
Update: GraphAtomProc;
implemented by GraphViewer:
ShowChart: GraphProc;
IsGraphViewer: PROC [viewer: Viewer] RETURNS [BOOL];
implemented by GraphWrite
WriteGraphFile: PROC [handle: GraphHandle, file: ROPE, plottedOnly: BOOLTRUE] RETURNS [msg, newName: ROPE];
WriteTextFile: PROC [handle: GraphHandle, file: ROPE] RETURNS [msg: ROPE];
}.
CHANGE LOG.
SChen, created at October 9, 1985 5:50:44 pm PDT.