| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- IMPLEMENTATION MODULE ListWrite;
- (*
- * REPERTOIRE
- * Release 1.6
- * By Charles Bradford and Cole Brecheen
- * (c) Copyright 1985-1992 PMI
- * Green Bay, Wisconsin
- * All rights reserved
- * (414) 468-6040
- *
- * $Header: D:/logfiles/mods/listwrit.mov 1.5 10 Mar 1991 15:29:04 coleb $
- *
- *)
- IMPORT Editor;
- IMPORT GenLists;
- IMPORT Numbers;
- IMPORT ScrnTypes;
- IMPORT StrConv;
- IMPORT SYSTEM;
- IMPORT WindowPrims;
- VAR
- Initialized : BOOLEAN;
- PROCEDURE Init();
- BEGIN
- IF Initialized THEN
- RETURN;
- ELSE
- Initialized := TRUE;
- END;
- Editor.Init();
- GenLists.Init();
- Numbers.Init();
- ScrnTypes.Init();
- StrConv.Init();
- WindowPrims.Init();
- END Init;
- PROCEDURE ShowList(TheList : GenLists.GenList);
- CONST
- col1 = 40;
- row1 = 2;
- VAR
- SavedScreen : WindowPrims.ScreenType;
- LineSize, dumtype, maxlength, BottomEdRow, TextRow1, CursorCol,
- CursorRow : CARDINAL;
- dumint : INTEGER;
- dumadr : SYSTEM.ADDRESS;
- TmpList : GenLists.GenList;
- ChangeMade, OldDoCounting : BOOLEAN;
- DummyFrame: ScrnTypes.DisplayFrame;
- BEGIN
- DummyFrame := NIL;
- OldDoCounting := Editor.DoCounting;
- Editor.DoCounting := FALSE;
- maxlength := 10;
- BottomEdRow := 1;
- WHILE BottomEdRow<=GenLists.ListLength(TheList) DO
- GenLists.GetElmtAdr(TheList, BottomEdRow, dumadr, LineSize, dumtype);
- IF LineSize>maxlength THEN
- maxlength := LineSize;
- END;
- INC(BottomEdRow);
- END;
- BottomEdRow := Numbers.Between(5,BottomEdRow,15);
- maxlength := Numbers.Between(10,maxlength,35);
- WindowPrims.ScreenSave(SavedScreen, col1, row1, maxlength+col1, BottomEdRow+
- row1);
- GenLists.CopyList(TheList, TmpList);
- TextRow1 := 1;
- CursorCol := 1;
- CursorRow := 1;
- dumint := Editor.ScrnEdit(col1,row1,maxlength,BottomEdRow,TmpList,
- TextRow1,CursorCol,CursorRow, ChangeMade, TRUE,
- DummyFrame);
- GenLists.DisposeList(TmpList);
- WindowPrims.ScreenRestore(SavedScreen, col1, row1);
- Editor.DoCounting := OldDoCounting;
- END ShowList;
- BEGIN
- Initialized := FALSE;
- Init();
- END ListWrite.
|