Hardware manual
ShowDisplayStream(s, how [DSbelow], otherStream [dsp]): This procedure controls the presentation of a
chain of display control blocks on the screen. If how id DSbelow, the stream will be displayed
immediately below otherStream; if DSabove, immediately above; if DSalone, it will be the only stream
displayed; if DSdelete, the stream s will be removed from the screen. The third argument is not needed for
DSalone or DSdelete.
If you wish to construct your own "stream" for purposes of passing it to ShowDisplayStream, it is sufficient
that s>>DS.fdcb point to the first DCB of a list and that s>>DS.ldcb point to the last DCB. These are the
only entries referenced by ShowDisplayStream (note that fdcb and ldcb are the first two words of a stream
structure).
3. Current-line operations
ResetLine(ds): erases the current line and resets the current position to the left margin.
GetFont(ds): returns the current font of ds.
SetFont(ds, pfont): changes the font of the display stream ds. Pfont is a pointer to word 2 of a font, which
is compatible with GetFont. Characters which have been written into the stream already are not affected;
future characters will be written in the new font. If the font is higher than the font initially specified,
writing characters may cause unexpected alteration of lines other than the line being written into. if
pFont!-2 is negative, then pFont!-1 is a pointer to a font (word 3, remember) and subsequent characters
put to the stream will be shown in synthetic bold face by scan converting the character, moving over one
bit and scan converting it again.
GetBitPos(ds): returns the bit position in the current line. The bit position is normally initialized to 8.
SetBitPos(ds, pos): sets the bit position in the current line to pos and returns true, if pos is not too large;
otherwise, returns false. Pos must be less than 606 (the display width) minus the width of the widest
character in the current font. Resetting the bit position does not affect the bitmap; characters displayed at
overlapping positions will be "or"ed in the obvious manner.
EraseBits(ds, nbits, flag): changes bits in ds starting from the current position. Flag=0, or flag omitted,
means set bits to 0 (same as background); flag=1 means set bits to 1 (opposite from background); flag=-1
means invert bits from their current state. If nbits is positive, the affected bits are those in positions pos
through pos+nbits-1, where pos is GetBitPos(ds); if nbits is negative, the affected positions are pos+nbits
through pos-1. In either case, the final position of the stream is pos+nbits.
Here are two examples of the use of EraseBits. If the last character written on ds was ch, EraseBits(ds,
-CharWidth(ds, ch)) will erase it and back up the current position (see below for CharWidth). If a word of
width ww has just been written on ds, EraseBits(ds, -ww, -1) will change it to white-on-black.
4. Inter-line operations
GetLinePos(ds): returns the line number of the current line; the top line is numbered 0. Unlike the
present operating system display streams, which always write into the bottom line and scroll up, the display
streams provided by this package start with the top line and only scroll when they reach the bottom.
SetLinePos(ds, pos): sets the current line position in ds to pos. If the line has not yet been written into, or
if it has zero width, or if it is indented as the result of compacting on the left, SetLinePos has no effect and
returns false; otherwise, SetLinePos returns true. Note that if you want to get back to where you were
before, you must remember where that was (using GetLinePos and GetBitPos).
InvertLine(ds, pos): Inverts the black/white sense of the line given by pos. Returns the old sense (0 is
black-on-white).
ds>>DS.cdcb: points to the DCB for the current line. You may (at your own risk) fiddle with this to
achieve various effects.
5. Scrolling
Display stream package February 20, 1979 46
For Xerox Internal Use Only -- December 15, 1980










