home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1994 #1
/
monster.zip
/
monster
/
CLIPPER
/
NCCLIB.ZIP
/
NCCVIEW.ZIP
/
G_SUMM.PRG
< prev
next >
Wrap
Text File
|
1993-11-06
|
3KB
|
94 lines
//═══════════════════════════════════════════════════════╕
// Program .....: G_Summ │
// CopyRight ...: 1993 National Computer Consultants │
// All rights are reserved. │
// Author ......: Greg Rice │
//═══════════════════════════════════════════════════════╛
#include "inkey.ch"
static func skipper( o, n )
local nActualSkipped := 0, nDirection := if(n>0,1,-1)
if n == 0
Return 0
endif
while nActualSkipped # n
if nDirection == 1
o:userslot++
if ! o:While()
o:userslot--
exit
endif
nActualSkipped++
else
o:userSlot--
if ! o:While()
o:userslot++
exit
endif
nActualSkipped--
endif
enddo
Return( nActualSkipped )
Function g_summary()
local xh := setcolor(), nSel := 0, scrn := savescreen(), lscrn, ;
p, o, i, n := {}, xTop, xBottom
setColor( popup_color() )
for i = 1 to len( Windows() )
aadd( n, str(i,2) + ". " + padr(winFilename(i),30,' ') )
next
xTop := int(((maxrow()/2) - 6 ))
xBottom := xTop + 12
p := NccViewit():New(xTop,38,xBottom,69)
p:InverseColor := p:StandardColor
p:Statusblock := { || "" }
p:userslot := 1
p:Datablock := { || if( Empty( WinIndexfiles(o:CurrentItem)[1] ), "", ;
padr( str(p:userslot,1) + ". " + ;
winindexfiles( o:CurrentItem )[p:userslot], ;
p:rightcolumn - p:leftcolumn + 1, " " ;
) ;
) ;
}
p:GoTopBlock := { || p:userslot := 1 }
p:GoBottomBlock := { || p:userslot := len( winindexfiles( o:CurrentItem ) ) }
p:WhileBlock := { || p:userslot > 0 .and. p:userslot <= len( winindexfiles( o:CurrentItem ) ) }
p:SkipBlock := { |n| Skipper( p, n ) }
nSel := arraydsp( n, ;
'Environment Summary', ;
'OPEN DATA FILES │ OPEN INDEX FILES ' ;
,xTop,04,xBottom,71, ;
0, ;
0, ;
.t., ;
, ;
{ |a| o := a, ;
MouseSys():Hide(), ;
p:RefreshAll(), ;
MouseSys():Show(), ;
dView_MouseReader(a,xTop,04,xBottom,71) ;
} ;
)
restscreen(,,,,scrn)
setcolor( xh )
Return( NIL )