1
0
mirror of synced 2026-01-13 07:29:52 +00:00
Interlisp.medley/docs/internal/sedit/linearizer.tedit

55 lines
2.7 KiB
Plaintext

SEdit Linearizer Internal Documentation
Fields in the context:
CurrentNode
The node whose linear form is currently being computed.
LinearPointer
Points to the "next" item in the linear form. This is the item with which the next generated item will be compared, and the item before which it will be inserted if it doesn't match.
LinearPrev
If LinearPrev is a cons, (CDR LinearPrev) is LinearPointer (LinearPrev is one behind LinearPointer in the linear form). Otherwise, it's a node, and (fetch LinearForm of LinearPrev) is LinearPointer. Used to fixup linear form.
CurrentLine
The LineStart most recently generated in the linear form.
CurrentX
The X coordinate at which the next linear item will be displayed.
RightMargin
The right margin for generating the linear form.
CurrentBlock
The LineBlock describing the most recently generated linear items on this line. Reset to FirstBlock at the end of each line displayed.
FirstBlock
The beginning of the LineBlock list. The LineBlocks from FirstBlock to CurrentBlock describe the segment of the linear form between CurrentLine and LinearPointer, indicating which parts are already available in the window for BITBLTing and which will have to be repainted.
Matching?
Means something like: the linear form we're generating has been matching the linear form that was already there (at least since the beginning of CurrentNode)
Below?
T if the linear form we're generating is definitely off the bottom of the screen. NIL if it might have to be displayed. 'new if we're redisplaying from scratch (nothing to BLT).
Visible?
T if we're matching and the bits we're matching are actually on the screen.
RelinearizationTimeStamp
NIL if we're prettyprinting, otherwise incremented by 1 each time we relinearize from the top. Used to determine the validity of cached info in LineStarts
RepaintStart
RepaintLine
RepaintX
If there are no bits to be reused at the end of a line, we postpone displaying it until we find something that needs to be moved (or we get to the end of the window). This can go on for many lines. during this time, RepaintStart records where the painting needs to start from, RepaintLine has the y information, and RepaintX records where the painting will start from. It may always be the case that
RepaintLine = (CAR RepaintStart)
RepaintX = (fetch Indent of RepaintLine)
Fields in EditNodes:
StartX
The X coordinate at the time this node was linearized. not sure what 0 means (something magic). \\reuse.linear.form seems to think this means that the node is atomic and hasn't been displayed before.
The coordinate system:
The top left corner is (1,-1) (or maybe (0,0)?). Therefore everything's displayed with positive x and negative y (bottom right quadrant).