<> <> <> DIRECTORY Buttons USING [Button], Graph USING [BackgroundIndex, Chart, ColorIndex, Controller, Entity, EntityGroup, EntityGroupList, EntityList, GraphHandle, NullRect, NullVec, OutputType, ROPE, SegmentDataList, Text, Texts, ValueList, Viewer, XY], Imager USING [Box, ConstantColor, Rectangle, VEC], ImagerColor USING [RGB], ImagerColorDefs USING [ConstantColor], ImagerFont USING [Font]; GraphUtil: CEDAR DEFINITIONS = { OPEN Graph; <> Error: SIGNAL[atom: ATOM, info: ROPE _ NIL]; RaiseError: PROC [atom: ATOM, msg: ROPE _ NIL]; BlinkMsg: PROC [msg: ROPE _ NIL]; HandleNotNil: PROC [handle: GraphHandle, msg: ROPE _ NIL, debug: BOOL _ FALSE] RETURNS [ok: BOOL]; ChartNotNil: PROC [chart: Chart, msg: ROPE _ NIL, debug: BOOL _ FALSE] RETURNS [ok: BOOL]; ViewerNotNil: PROC [viewer: Viewer, msg: ROPE _ NIL, debug: BOOL _ FALSE] RETURNS [ok: BOOL]; GraphViewerExits: PROC [handle: GraphHandle, msg: ROPE _ NIL, debug: BOOL _ FALSE] RETURNS [ok: BOOL]; ControllerNotNil: PROC [c: Controller, msg: ROPE _ NIL, debug: BOOL _ FALSE] RETURNS [ok: BOOL]; ControllerViewerExits: PROC [handle: GraphHandle, msg: ROPE _ NIL, debug: BOOL _ FALSE] RETURNS [ok: BOOL]; BoundsValid: PROC [box: Imager.Box] RETURNS [BOOL]; DivisionsValid: PROC [divX, divY: INT] RETURNS [BOOL]; RectangleValid: PROC[rect: Imager.Rectangle _ NullRect] RETURNS [BOOL]; <<>> <> ColorValueOk: PROC [value: REAL _ 0.0, blinkMsg: BOOL _ TRUE] RETURNS [ok: BOOL _ TRUE]; ForegroundColor: PROC [background: BackgroundIndex _ white, output: OutputType _ screen] RETURNS [Imager.ConstantColor]; BackgroundColor: PROC [background: BackgroundIndex _ white, output: OutputType _ screen] RETURNS [Imager.ConstantColor]; UseMyColors: PROC [handle: GraphHandle]; SetColor: PROC [index: ColorIndex _ 0, rgb: ImagerColor.RGB _ [0, 0, 0]] RETURNS [ImagerColorDefs.ConstantColor]; UseDefaultColors: PROC [handle: GraphHandle _ NIL]; UseCedarColors: PROC []; SetCursorForBackgroundIndex: PROC [bkgnd: BackgroundIndex _ white]; UseDefaultFonts: PROC [handle: GraphHandle]; <> UseMyFonts: PROC [handle: GraphHandle]; <> <> InViewer: PROC [viewer: Viewer _ NIL, x, y: INTEGER _ 0] RETURNS [BOOL]; CrossSegment: PROC [xseg, yseg: SegmentDataList _ NIL, at: REAL _ 0.0] RETURNS [ok: BOOL _ FALSE, v1, v2: Imager.VEC _ NullVec]; InterOrExtraPolate: PROC [v1, v2: Imager.VEC _ NullVec, x: REAL _ 0.0] RETURNS [REAL]; Crosssection: PROC [xseg, yseg: SegmentDataList _ NIL, at: REAL _ 0.0] RETURNS [ok: BOOL _ FALSE, value: REAL]; RealToScreen: PROC [handle: GraphHandle, r: REAL _ 0.0, xy: XY _ x] RETURNS [REAL]; RealToScreenI: PROC [handle: GraphHandle, r: REAL _ 0.0, xy: XY _ x] RETURNS [INTEGER]; RealToScreenRel: PROC [handle: GraphHandle, r: REAL _ 0.0, xy: XY _ x] RETURNS [REAL]; RealVecToScreenVec: PROC [handle: GraphHandle, vec: Imager.VEC _ NullVec] RETURNS [Imager.VEC]; ScreenToReal: PROC [handle: GraphHandle, s: REAL _ 0.0, xy: XY _ x] RETURNS [REAL]; ScreenIToReal: PROC [handle: GraphHandle, s: INTEGER _ 0, xy: XY _ x] RETURNS [REAL]; ScreenIToRealVec: PROC [handle: GraphHandle _ NIL, sx, sy: INTEGER _ 0] RETURNS [Imager.VEC _ NullVec]; TextPosToChartPos: PROC [axesRect: Imager.Rectangle _ NullRect, textPos: Imager.VEC _ NullVec] RETURNS [chartPos: Imager.VEC _ NullVec]; ChartPosToTextPos: PROC [axesRect: Imager.Rectangle _ NullRect, chartPos: Imager.VEC _ NullVec] RETURNS [textPos: Imager.VEC _ NullVec]; TextRect: PROC[text: Text _ NIL, font: ImagerFont.Font _ NIL, axesRect: Imager.Rectangle _ NullRect] RETURNS [rect: Imager.Rectangle _ NullRect, hotPoint: Imager.VEC _ NullVec]; <<>> <> SetToggleColor: PROC[switch: Buttons.Button _ NIL, on: BOOL _ TRUE, paint: BOOL _ TRUE] RETURNS [BOOL]; SetIntField: PROC [field: Viewer _ NIL, value: INT _ 0]; GetIntField: PROC [field: Viewer _ NIL, showMsg: BOOL _ TRUE] RETURNS [msg: ROPE _ NIL, int: INT _ 0]; SetRealField: PROC [field: Viewer _ NIL, value: REAL _ 0.0]; GetRealField: PROC [field: Viewer _ NIL, showMsg: BOOL _ TRUE] RETURNS [msg: ROPE _ NIL, real: REAL _ 0.0]; <> FullName: PROC [entity: Entity] RETURNS [fullName: ROPE]; FontHeight: PROC [font: ImagerFont.Font] RETURNS [height: REAL]; RopeSize: PROC [rope: ROPE, font: ImagerFont.Font] RETURNS [width, height: REAL]; RemoveTextFromList: PROC [text: Text, texts: Texts]; RemoveEntityFromList: PROC [entity: Entity, entityList: EntityList]; TextFromId: PROC [texts: Texts, id: INT] RETURNS [text: Text]; EntityFromId: PROC [entityList: EntityList, id: INT] RETURNS [entity: Entity]; SpecIndexedText: PROC [controller: Controller, texts: Texts] RETURNS [text: Text]; SpecIndexedEntity: PROC [controller: Controller, ref: REF ANY _ NIL] RETURNS [entity: Entity]; <> ReverseTexts: PROC [old: Texts, killOld: BOOL _ TRUE] RETURNS [new: Texts]; ReverseEntityList: PROC [old: EntityList, killOld: BOOL _ TRUE] RETURNS [new: EntityList]; ReverseValueList: PROC [old: ValueList, killOld: BOOL _ TRUE] RETURNS [new, last: ValueList]; CopyValueList: PUBLIC PROC [old: ValueList, killOld: BOOL _ TRUE] RETURNS [new, last: ValueList]; ReverseSDL: PROC [old: SegmentDataList, killOld: BOOL _ TRUE] RETURNS [new, last: SegmentDataList _ NIL]; -- killOld only "partially" kill the old. InitSegEnd: PROC [entity: Entity]; SetSegments: PUBLIC PROC [entity: Entity]; -- called when x and y's segment.end's are intialized. InitSegAll: PROC [entity: Entity]; UpdateSegEnd: PROC [entity: Entity, values: ValueList]; UpdateSegAll: PROC [entity: Entity, values: ValueList]; LengthOfVL: PROC [valueList: ValueList] RETURNS [INT]; LengthOfEL: PROC [entityList: EntityList, group: EntityGroup _ NIL] RETURNS [INT]; LengthOfSDL: PROC [segmentDataList: SegmentDataList _ NIL] RETURNS [INT]; AppendX: PROC [xEntity: Entity, newx: REAL] RETURNS [oldx: REAL]; AppendY: PROC [entity: Entity, y, x1, x2: REAL] RETURNS [oldy: REAL]; AppendTexts: PROC [first, second: Texts] RETURNS [new: Texts]; AppendEntityList: PROC [first, second: EntityList] RETURNS [new: EntityList]; AppendEGL: PROC [first, second: EntityGroupList] RETURNS [new: EntityGroupList]; NewTextId: PROC [handle: GraphHandle, tryId: INT] RETURNS [newId: INT]; NewEntityId: PROC [handle: GraphHandle, tryId: INT] RETURNS [newId: INT]; NewGroupId: PROC [handle: GraphHandle, tryId: INT] RETURNS [newId: INT]; <> <> <> <<>> <> FileFromSelection: PROC [wDir: ROPE _ NIL] RETURNS [file, msg: ROPE _ NIL]; ReplaceFileExt: PROC [file: ROPE, extension: ROPE _ NIL] RETURNS [new: ROPE]; WDirOfViewer: PROC [viewer: Viewer] RETURNS [wDir: ROPE _ NIL]; <> HandleFromViewer: PROC [viewer: Viewer _ NIL] RETURNS [GraphHandle]; VanillaHandle: PROC [] RETURNS [GraphHandle]; Cleanup: PROC [handle: GraphHandle, full: BOOL _ TRUE] RETURNS [GraphHandle]; <> <> <<>> <> Almost: PROC [p, q: REAL] RETURNS [a: BOOL _ TRUE]; DataBounds: PROC [entityList: EntityList, old: Imager.Box] RETURNS [Imager.Box]; Print: PROC[handle: GraphHandle, file: ROPE] RETURNS [msg: ROPE _ NIL]; NotANumber: PROC [r: REAL] RETURNS [BOOL] = INLINE { RETURN[LOOPHOLE[r, LONG CARDINAL] = 17740000001B]}; NotANan: PROC [r: REAL] RETURNS [BOOL] = INLINE { RETURN[LOOPHOLE[r, LONG CARDINAL] # 17740000001B]}; }. LOG. SChen, August 14, 1985 7:30:22 pm PDT, created.