[Oberon] SystemV - Viewer Scroll

Joerg joerg.straube at iaeth.ch
Tue Mar 19 13:23:08 CET 2019


Tomas

Forward scrolling: when you detected a line break, you know the line starts. You immediately can draw characters one by one until you detect the second line break. You reached the line end, and the line is drawn already (single pass)

Backward scrolling: when you detect a line break, you know it’s the line END. You cannot start displaying the character as you don't know neither the line start nor its length. First, you have to search for the second line break in backward direction. Then, you know the line start and can start drawing the characters of the line in a second pass in forward direction.

br
Jörg

-----Original Message-----
From: Oberon <oberon-bounces at lists.inf.ethz.ch> On Behalf Of Andreas Pirklbauer
Sent: Tuesday, March 19, 2019 12:31 PM
To: ETH Oberon and related systems <oberon at lists.inf.ethz.ch>
Subject: [Oberon] SystemV - Viewer Scroll

   > For backward scrolling, there are indeed other strategies thinkable
   > to find line breaks compared to the current implementation.
   > Jörg

For example…

(1) One is to read the source text twice - the first pass just counts the number of line endings and computes the total displacement dY, while the second pass (which is fast since it reads from the file buffer in memory) does the actual scrolling. This is the approach chosen in EO.

(2) I have also played with generalizing the Files.Read operation to allow reading in both directions (i.e. forward and backward) - then only one pass is needed, at the expense of making module Files more complex. But it doesn’t really speed up things much, given that in (1) an in-memory file buffer is accessed during the second read operation.


--
Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon



More information about the Oberon mailing list