DIRECTORY TiogaDisplayTable, TiogaNode USING [Location, Path, Span]; TiogaDisplayTableImpl: CEDAR PROGRAM EXPORTS TiogaDisplayTable = BEGIN OPEN TiogaDisplayTable; StorePageRectangle: PUBLIC PROC [dt: DisplayTable, index: INTEGER, pr: PageRectangle] = BEGIN IF index>dt.objects.maxRectangle THEN SetSize[dt, MIN[1, dt.objects.maxRectangle]*2]; dt.objects[index] _ pr; dt.lastY _ MAX[dt.lastY, pr.yBaseline+pr.bottomExtent]; dt.lastIndexUsed _ MAX[dt.lastIndexUsed, index]; END; InvalidateSpan: PUBLIC PROC [dt: DisplayTable, span: TiogaNode.Span] = BEGIN ERROR; -- Not Yet Implemented END; InvalidateChildren: PUBLIC PROC [dt: DisplayTable, parent: TiogaNode.Path] = BEGIN ERROR; -- Not Yet Implemented END; InvalidateBranch: PUBLIC PROC [dt: DisplayTable, node: TiogaNode.Path] = BEGIN ERROR; -- Not Yet Implemented END; VerticalScroll: PUBLIC PROC [dt: DisplayTable, upLines: INTEGER] = BEGIN ERROR; -- Not Yet Implemented END; Resolve: PUBLIC PROC [dt: DisplayTable, x, y: INTEGER, useClosest: BOOL _ TRUE] RETURNS [index: INTEGER _ notFound, mappedX, mappedY: INTEGER] = BEGIN ERROR; -- Not Yet Implemented END; New: PUBLIC PROC [nEntries: INTEGER] RETURNS [dt: DisplayTable] = BEGIN dt _ NEW[DisplayTableRec]; dt.objects _ NEW[PageRectangleSequenceRec[nEntries]]; END; SetSize: PUBLIC PROC [dt: DisplayTable, nEntries: INTEGER] = BEGIN oldObjects: REF PageRectangleSequenceRec _ dt.objects; dt.objects _ NEW[PageRectangleSequenceRec[nEntries]]; FOR i: INTEGER IN [0..MIN[nEntries, dt.lastIndexUsed]) DO dt.objects[i] _ oldObjects[i]; ENDLOOP; END; END. Æ-- TiogaDisplayTableImpl.mesa; Written by S. McGregor, June 1983 -- Edited by McGregor, August 23, 1983 4:01 pm ***** Partial invalidation of display tables ***** ***** Partial invalidation of display tables ***** -- invalidate lines for children of node -- invalidate lines for children of node ***** Coordinate to rectangle mapping ***** ***** Table size management ***** copy old info (someday, figure out how to do a safe BLT here instead) Ê«˜JšÏc7œ ™@Jšœ™.J˜šÏk ˜ Jšœ˜Jšœ žœ˜'J˜—šœžœž˜$Jšžœžœžœ˜9—J˜šœ2™2J˜š Ïnœžœžœžœž˜]Jšžœžœ žœ ˜UJšœ˜Jšœ žœ)˜7Jšœžœ˜0Jšžœ˜——J™šœ2™2J˜šŸœžœžœ,ž˜LJšžœ˜Jšžœ˜J˜—šŸœžœžœ.ž˜RJš(™(Jšžœ˜Jšžœ˜—J˜šŸœžœžœ,ž˜NJš(™(Jšžœ˜Jšžœ˜J™—š Ÿœžœžœžœž˜HJšžœ˜Jšžœ˜——J™šœ+™+J˜š Ÿœžœžœžœžœžœ˜Ošžœ žœžœž˜FJšžœ˜Jšžœ˜———J™šœ!™!J˜š Ÿœžœžœ žœžœž˜GJšœžœ˜Jšœ žœ%˜5Jšžœ˜J˜—š Ÿœžœžœžœž˜BJšœ žœ'˜6Jšœ žœ%˜5JšœE™Eš žœžœžœžœž˜9Jšœ˜Jšžœ˜—Jšžœ˜J˜——Jšžœ˜J˜J˜—…—& —