[Oberon] SystemV - Viewer Scroll

Tomas Kral thomas.kral at email.cz
Tue Mar 19 17:15:40 CET 2019


On Tue, 19 Mar 2019 13:23:08 +0100
Joerg <joerg.straube at iaeth.ch> wrote:

> Forward scrolling:

Taken from `Show' proc, this is forward reading in single chars from
`Texts' stream.

  Texts.OpenReader(R, F.text, org); Texts.Read(R, nextCh);
  WHILE ~L.eot & (curY >= botY) DO
    NEW(L0); DisplayLine(F, L0, R, F.X + F.left, curY, 0);
    L.next := L0; L := L0; curY := curY - lsp
  END;

> Backward scrolling:

Reading backward by a single char does not seem possible, or does it?

EDIT below is certainly wrong but possibly carries the idea.

WHILE ~L.eol DO
 Texts.OpenReader(R, F.text, org-1); Texts.Read(R, prevCh);
 L.prev := L; ... DEC(org)
END ;


-- 
Tomas Kral <thomas.kral at email.cz>


More information about the Oberon mailing list