home *** CD-ROM | disk | FTP | other *** search
- { =========================================================================== }
- { Pullwork.pas - Work Window procedures for main work area. ver 2.0, 01-12-87 }
- { }
- { This file contains all the procedures executed for the Work Window. These }
- { are the main steps of your program. They are organized by WorkWindowStep }
- { number. }
- { (c) 1987, 1988 James H. LeMay }
- { =========================================================================== }
-
- {$R-,S-,I-,D-,T-,F-,V-,B-,N-,L+ }
-
- UNIT PullWork;
-
- INTERFACE
-
- uses
- CRT,Qwik,WndwVars,Wndw,PullVars,Pull,PullStat,PullProc;
-
- procedure WorkWndw;
-
- IMPLEMENTATION
-
- { ***************************** STEP 7 ********************************* }
- { This procedure will have all the procedures for the Work window(s). }
-
- procedure ClearRow (Row: byte);
- begin
- Qfill (Row,2,1,CRTcols-2,-1,' ');
- end;
-
- procedure WorkWndw;
- var TempString: MaxString;
- i,j: byte;
- begin
- ShowMsg (1);
- if TopWndwStat.WSname=Window1 then
- begin
- Qfill (18,46,1,12,yellow+MagentaBG,' ');
- Qwrite (18,24,-1,'File name selected = '+FileName);
- end;
- case WorkWndwStep of
- 0: begin
- DataPad.NewData:=true; { Clear pad for new entry }
- ClearRow (20);
- Str (WorkWndwInteger:4,TempString);
- Qwrite (19,24,-1,'Work window integer = '+TempString);
- Qwrite (20,27,-1,'Press CR to enter new value:');
- GotoRC (20,55);
- ReadKbd (ExtKey,Key);
- if HelpKeyPressed then PullHelpWndw (1,'work window');
- if Key=RetKey then
- begin
- WorkWndwStep:=1;
- ClearRow (20);
- Qwrite (20,29,-1,'Enter integer:')
- end
- end;
- 1: begin
- repeat
- WorkWndwEntry (20,46,4,WorkWndwInteger,Integers,Right,
- ord(NumericHW),'Work window entry');
- if (WorkWndwInteger<-300) or (WorkWndwInteger>4000) then
- RestoreData (WorkWndwInteger,4); { Sets Key=#00 }
- until DataPad.DataStored or (Key>#00);
- if Key=RetKey then
- begin
- ClearRow (20);
- Str (WorkWndwInteger:4,TempString);
- Qwrite (19,46,-1,TempString);
- Qwrite (20,22,-1,'Press CR for multi-level work windows:');
- GotoRC (20,60);
- WorkWndwStep:=2
- end
- end;
- 2: begin
- ReadKbd (ExtKey,Key);
- if HelpKeyPressed then PullHelpWndw (1,'work window');
- if Key=RetKey then
- begin
- for i:=0 to 1 do
- for j:=0 to 4 do
- begin
- MakeWindow (5+j*2+i*2,23+j*8-i*18,8,21,black+GreenBG,
- lightgreen+BlackBG,SingleBrdr,aWindow);
- Str (LI,TempString);
- TitleWindow (Top,Center,' Work Window '+TempString+' ');
- with TopWndwStat do
- begin
- Qwrite (WSrow+3,WScol+5, -1,'Press CR or');
- Qwrite (WSrow+4,WScol+5, -1,'pull menus')
- end
- end;
- WorkWndwStep:=3
- end
- end;
- 3: begin
- ReadKbd (ExtKey,Key);
- if HelpKeyPressed then PullHelpWndw (1,'work window');
- if Key=RetKey then
- begin
- for i:=LI downto 2 do RemoveWindow;
- WorkWndwStep:=0
- end
- end;
- end { case }
- end;
-
- BEGIN
- AddrWorkWndw:=@WorkWndw;
- END.