Subversion Repositories oidplus

Compare Revisions

Regard whitespace Rev 746 → Rev 747

/trunk_dos/LISTTEST.PAS
3,7 → 3,7
(************************************************)
(* LISTTEST.PAS *)
(* Author: Daniel Marschall *)
(* Revision: 2022-02-13 *)
(* Revision: 2022-02-16 *)
(* License: Apache 2.0 *)
(* This file contains: *)
(* - Example how to use lists and selection CUI *)
10,7 → 10,7
(************************************************)
 
uses
Crt, StrList, VtsCui;
Crt, Drivers, StrList, VtsCui;
 
var
items: PStringList;
17,8 → 17,11
i, itemIndex: integer;
sTmp: string;
begin
InitList(items);
InitVideo;
CursorOff;
 
CreateList(items);
 
(* Fill the list for testing *)
for i := 1 to 5 do
begin
28,13 → 31,14
 
(* Do inserts and deletions to test their functionality *)
ListInsert(items, 'TEST', 0);
ListDeleteElement(items, 0);
ListDeleteElement(items, 0);
ListDeleteElementByIndex(items, 0);
ListDeleteElementByIndex(items, 0);
ListInsert(items, 'FirstElement', 0);
 
(* Test the selection GUI unit *)
ClrScr;
itemIndex := DrawSelectionList(3, 5, 15, 10, items, true, 0);
itemIndex := DrawSelectionList(3, 5, 15, 10, items, true, '', 0);
ResetDefaultDosColors;
ClrScr;
if itemIndex = -1 then
begin
49,4 → 53,7
FreeList(items);
 
ReadLn;
 
CursorOn;
DoneVideo;
end.