// Copyright (c) 1993-2005 "Компания БЭСТ". Все права сохраняются.
#include "inkey.ch"
#include "s_public.ch"


FUNCTION SaveSet(nTop, nLeft, nBottom, nRight)
If nTop==NIL
  nTop:=0
EndIf
If nLeft==NIL
  nLeft:=0
EndIf
If nBottom==NIL
  nBottom:=MAXROW()
EndIf
If nRight==NIL
  nRight:=MAXCOL()
EndIf
RETURN {SetColor(), SaveScreen(nTop, nLeft, nBottom, nRight), SetCursor(), Select(), Row(), Col(), help_code}

FUNCTION RestSet(aArray, nTop, nLeft, nBottom, nRight)
If nTop==NIL
  nTop:=0
EndIf
If nLeft==NIL
  nLeft:=0
EndIf
If nBottom==NIL
  nBottom:=MAXROW()
EndIf
If nRight==NIL
  nRight:=MAXCOL()
EndIf
SetColor(aArray[1])
RestScreen(nTop, nLeft, nBottom, nRight, aArray[2])
SetCursor(aArray[3])
Select(aArray[4])
SetPos(aArray[5],aArray[6])
help_code := aArray[7]
RETURN NIL



FUNCTION SAVESETKEY()
Local aSave := HB_SetKeySave()
Local i
Local aRest := {}
      For i := 1 to len(aSave)
          if aSave[i][1] == K_F1.or.;
             aSave[i][1] == K_ALT_F1.or.;
             aSave[i][1] == K_ALT_Z.or.;
             aSave[i][1] == K_ALT_K.or.;
             aSave[i][1] == K_ALT_INS.or.;
             aSave[i][1] == K_ALT_V
             aadd(aRest,aSave[i])
          else
             setkey(aSave[i][1],nil)
          endif
      Next
      if !Empty(aRest)
         HB_SetKeySave(aRest)
      endif

Return aSave
//
FUNCTION RESTSETKEY(aKeySet)
HB_SetKeySave()
HB_SetKeySave(aKeySet)
Return .t.


