home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Interactive Guide
/
c-cplusplus-interactive-guide.iso
/
c_ref
/
csource1
/
chint
/
useful07.hnt
< prev
next >
Wrap
Text File
|
1992-06-09
|
3KB
|
97 lines
/**************************************************************************
How to modify the DataBoss skeleton so that only the current window is
present on the screen, inactive windows are always swithced off.
Copy DBC.SKL to ONEWIN.SKL and then modify the following three procedures.
void switch_file(char mode)
void displayall(void)
void afteradjdisp(int fno)
The new code line are enclosed in "(**)" and any old code that is no
longer necessary has been commented out.
***************************************************************************/
void switch_file(char mode)
{
int fno,incr;
scrn_active = True;
if (mode == '+') incr = 1; else if (mode == '-') incr = -1; else incr = 0;
fno = filno;
do {
filno += incr;
if ((filno < 1) || (filno > maxfilno)) {
incr = -incr; filno += incr;
audible(Warning);
}
} while (!filinuse[filno] && (filno != fno));
if (scrno < winforfile[filno]) displayrec(filno,scrno);
/**/if (scrno <> winforfile[filno]) { /**/
/**/ hidewin(T_OFF,uw.wa[scrno]); /**/
/**/ scrno = winforfile[filno]; /**/
/**/ hidewin(T_ON,uw.wa[scrno]); /**/
/**/} /**/
/*
while (scrno > winforfile[filno]) {
hidewin(T_OFF,uw.wa[scrno]);
scrno--;
}
while (scrno < winforfile[filno]) {
scrno++;
hidewin(T_ON,uw.wa[scrno]);
}
*/
if (!status_ok(filno)) top_record(); else ok = True;
ⁿIFDEF TABLESⁿ
switchtab = True;
displayrec(filno,scrno);
switchtab = False;
ⁿELSEDEFⁿ
displayrec(filno,scrno);
ⁿENDDEFⁿ
}
void displayall(void)
{
int i;
for (i=1; i <= filno; i++) (uw.wa[winforfile[i]])->disp = False;
ⁿIFDEF TABLESⁿ
link = No_Link;
for (i=1; i <= scrno; i++) displayrec(0,i);
link = Up_N_Down;
ⁿELSEDEFⁿ
for (i=1; i <= scrno; i++) displayrec(filno,i);
ⁿENDDEFⁿ
/**/hidewin(T_ON,uw.wa[winforfile[filno]]); /**/
/* for (i=1; i <= filno; i++) hidewin(T_ON,uw.wa[winforfile[i]]); */
}
void afteradjdisp(int fno)
{
int i;
/**/bool savdisd /**/
for (i = 1; i <= fno; i++) if (afteradj[fno][i] > 0) {
/**/savdisp = uw.wa[winforfile[i]]->disp; /**/
(uw.wa[winforfile[i]])->disp = False;
ⁿIFDEF TABLESⁿ
link = No_Link;
displayrec(0,winforfile[i]);
link = Up_N_Down;
ⁿELSEDEFⁿ
displayrec(filno,winforfile[i]);
ⁿENDDEFⁿ
afteradjdisp(i);
/**/uw.wa[ainforfile[i]]->disp = savdisp; /**/
/**/if (savdisp) hidewin(T_ON,uw.wa[ainforfile[i]]); /**/
/* hidewin(T_ON,uw.wa[winforfile[i]]); */
}
}