File information: | |
File name: | WManPosition.mesa_Oct77.pdf [preview WManPosition.mesa Oct77] |
Size: | 233 kB |
Extension: | |
Mfg: | xerox |
Model: | WManPosition.mesa Oct77 🔎 |
Original: | WManPosition.mesa Oct77 🔎 |
Descr: | xerox mesa 3.0_1977 listing WManPosition.mesa_Oct77.pdf |
Group: | Electronics > Other |
Uploaded: | 12-02-2020 |
User: | Anonymous |
Multipart: | No multipart |
Information about the files in archive: | ||
Decompress result: | OK | |
Extracted files: | 1 | |
File name WManPosition.mesa_Oct77.pdf WManPosition.mesa 25-0CT-77 15:24:43 Page 1 --File: WManPosition.mesa --Edited by Sandman October 7, 1977 12:34 PM DIRECTORY AltoDefs: FROM "altodefs", DoubleDefs: FROM "doubledefs", InlineDefs: FROM "inlinedefs", StreamDefs: FROM "streamdefs", MenuDefs: FROM "menudefs", RectangleDefs: FROM "rectangledefs", WindowDefs: FROM "windowdefs". WManagerDefs: FROM "wmanagerdefs"; DEFINITIONS FROM StreamDefs. MenuDefs, RectangleDefs. WindowDefs. WManagerDefs; WManPos it i on: PROGRAM[WMSta te: WMDataHand 1e] IMPORTS DoubleDefs, StreamDefs, RectangleDefs, WindowDefs, WManagerOefs EXPORTS WManagerDefs SHARES StreamDefs. WManagerDefs = BEGIN OPEN WMState; CR: CHARACTER = 15C; Space: CHARACTER = 40C; PositionFile: PUBLIC PROCEDURE[w: WindowHandle. x: xCoord. y: yCoord]= BEGIN OPEN DoubleDefs; -- Declare Locals height: CARDINAL; bytepos, eof: LongCARDINAL; index: StreamIndex; -- compute position in file and set it SetCursor[arrow]; ButtonWait; SetCursor[hourglass]; x ~ xcursorloc~; y ~ ycursorloc~; [x. y] ~ Curs~rToRectangleCoords[w.rectangle. x. y]; -- if out of jump bar then no scrolling IF NOT CheckForSlop[w. x. y] THEN BEGIN SetJumpStripe[w. FALSE]; RETURN; END; IF y < default1ineheight+l OR w.eofindex.byte = 177777B THEN index ~ [0. 0] ELSE BEGIN OPEN InlineDefs, AltoDefs; height ~ w.rectang1e.ch-(defaultlineheight+l}; y ~ MIN[LOOPHOLE[y-(defaultlineheight+l}. CARDINAL]. height]; IF y = height THEN index ~ w.eofindex ELSE BEGIN eof ~ DAdd[LongMult[w.eofindex.page. BytesPerPage]. LongCARDINAL[w.eofindex.byte. 0]]; bytepos ~ DDivide[DMultip1y[eof. LongCARDINAL[y. 0]]. LongCAROINAL[height, O]].quotient; [index.page, index.byte] ~ LongDivMod[bytepos. BytesPerPage] ; IF index.page > w.eofindex.page OR (index.page w.eofindex.page AND index.byte > w.eofindex.byte) THEN index .. w.eofindex: END; END; DoTheScroll[w, index]; END; ScrollUpFile: PUBLIC PROCEOURE[w: Windowlland1e, x: xCoord, y: yCoord]= BfGIN -- Declare Locals index: StreamIndex; line: INTEGER; -- compute position in file and set it SetCursor[uparrow]; ButtonWait; SetCursor[hourg1ass]; x ~ xcursorloct: y ~ ycursorloc t : [1 ine . . . index] ~ Reso1veAugToPosition[w. x. y]: [x. y] ~ CursorToRectangleCoords[w.reclangle, x, y]; -- if out of Jump bar then no scroll in9 W~anPosition,mesa 25-0CT-77 15:24:43 Page 2 IF NOT CheckForSlop[w. x. y] OR line = 1 THEN BEGIN SetJumpStripe[w. FALSE]; RETURN; END; DoTheScroll[w. index]; END; ScrollDownFile: PUBLIC PROCEDURE[w: WindowHandle. x: xCoord. y: yCoord]= BEGIN OPEN OoubleOefs. InlineDefs; -- Declare Locals index. pos |
Date | User | Rating | Comment |