DIRECTORY IO, ViewerClasses, CharDisplays; SimpleDisplays: CEDAR DEFINITIONS = { FlushModeType: TYPE = { FlushOnBlock, FlushOnScroll, FlushOnChangeCount }; SimpleDisplayState: TYPE = REF SimpleDisplayStateRep; SimpleDisplayStateRep: TYPE = MONITORED RECORD [ paintDone: CONDITION, sdvData: REF ANY, -- viewers client data topViewer, aViewer: ViewerClasses.Viewer, theLines: REF LinesRep, flushMode: FlushModeType ¬ FlushOnBlock, changeCount: INT ¬ 0, -- how many changes since last flush changeCountLimit: INT ¬ 250, -- flush after this many changes out: IO.STREAM, -- transcript logging: BOOLEAN ¬ FALSE, driver: IO.STREAM, -- UnixFileDescriptorStream of the Unix fd where emphs: CharDisplays.Emphs, hasSomeEmphasis: BOOLEAN ¬ FALSE, debugChars: BOOLEAN ¬ FALSE, debugCM: BOOLEAN ¬ FALSE, debugOps: BOOLEAN ¬ FALSE, debugScroll: BOOLEAN ¬ FALSE, debugViewers: BOOLEAN ¬ FALSE, debugEmph: BOOLEAN ¬ FALSE ]; LinesRep: TYPE = RECORD [ SEQUENCE count: NATURAL OF REF LineRep ]; ModificationType: TYPE = { new, unchanged, insert1, delete1, over1, tail }; LineRep: TYPE = RECORD [ hasSomeEmphasis: BOOLEAN ¬ FALSE, emphs: REF LineEmphsRep, chars: REF TEXT, modified: ModificationType ¬ new, relativeScreenPosition: INT ¬ 0, screenLine: INT ¬ 0, tailStartColumn: INT ¬ 0 ]; LineEmphsRep: TYPE = RECORD [ SEQUENCE count: NATURAL OF CharDisplays.Emphs ]; SimpleDisplaysViewer: PROC [sd: SimpleDisplayState, cd: CharDisplays.CharDisplay] RETURNS [v: ViewerClasses.Viewer, fromD: IO.STREAM]; LogTranscriptLine: PROC [sd: SimpleDisplayState, chars: REF TEXT]; SDChangeDetails: PROC [cd: CharDisplays.CharDisplay, new: CharDisplays.DisplayDetails]; ResizeTerminal: PROC [ cd: CharDisplays.CharDisplay, sd: SimpleDisplayState, r,c: INT ]; }. Z SimpleDisplays.mesa Copyright Σ 1990, 1992 by Xerox Corporation. All rights reserved. Norman Adams, March 4, 1990 3:28 pm PST Spreitze, April 3, 1990 1:47 pm PDT Last tweaked by Mike Spreitzer on April 4, 1990 12:20:05 pm PDT -- In control of flushing accumulated changed to the display -- plumb get characters to write to the screen Κί–(cedarcode) style•NewlineDelimiter ™code™Kšœ Οeœ6™BK™'K™#K™?—K˜KšΟk œžœ˜*K™KšΠlnœžœž œ˜%˜Kšœžœ7˜J—˜Kšœžœžœ˜5šœžœžœ˜0Kšœ ž œ˜K˜Kšœ žœžœΟc˜)Kšœ)˜)Kšœ žœ ˜K˜K™žœ˜XK˜—Kšœ˜—…—ΰ