home *** CD-ROM | disk | FTP | other *** search
/ Power CD-ROM!! 7 / POWERCD7.ISO / prgmming / clipper / gt_setup.prg < prev    next >
Text File  |  1993-10-14  |  3KB  |  118 lines

  1. /*
  2.     File......: GT_Setup.prg
  3.     Author....: Martin Bryant
  4.     BBS.......: The Dark Knight Returns
  5.     Net/Node..: 050/069
  6.     User Name.: Martin Bryant
  7.     Date......: 05/02/93
  8.     Revision..: 1.0
  9.  
  10.     This is an original work by Martin Bryant and is placed
  11.     in the public domain.
  12.  
  13.     Modification history:
  14.     ---------------------
  15.  
  16.     Rev 1.0 05/02/93
  17.     PD Revision.
  18. */
  19. /*  $DOC$
  20.  *  $FUNCNAME$
  21.  *      GT_SETUP()
  22.  *  $CATEGORY$
  23.  *      General
  24.  *  $ONELINER$
  25.  *      A general purpose Setup function.
  26.  *  $SYNTAX$
  27.  *      GT_Setup() -> lSuccess
  28.  *  $ARGUMENTS$
  29.  *      None
  30.  *  $RETURNS$
  31.  *      lSuccess
  32.  *  $DESCRIPTION$
  33.  *      A general purpose Setup function.
  34.  *  $EXAMPLES$
  35.  *      IF .NOT. GT_Setup()
  36.  *          GT_Quit()
  37.  *      ENDIF
  38.  *  $SEEALSO$
  39.  *
  40.  *  $INCLUDE$
  41.  *
  42.  *  $END$
  43.  */
  44.  
  45. #include "GT_LIB.ch"
  46.  
  47. FUNCTION GT_Setup()
  48.  
  49. LOCAL lSuccess := .T.
  50.  
  51. //  No alternate file in use
  52. Set(_SET_ALTERNATE,.F.)
  53. //  Bell off
  54. Set(_SET_BELL,.F.)
  55. //  Leaving GETs
  56. Set(_SET_CONFIRM,.T.)
  57. //  CONSOLE == Do ?/?? go to the SCREEN ?
  58. Set(_SET_CONSOLE,.F.)
  59. //  Turn cursor off
  60. GT_NoCursor()
  61. //  British date
  62. Set(_SET_DATEFORMAT, 'dd/mm/yyyy')
  63. //  Default to 2 decimals
  64. Set(_SET_DECIMALS,4)
  65. // Current directory is default
  66. Set(_SET_DEFAULT,'')
  67. //  Don't show deleted records
  68. Set(_SET_DELETED,.T.)
  69. //  Delimitors on GETs
  70. Set(_SET_DELIMITERS,.F.)
  71. //  DEVICE == Where do the @ SAY's go to ?
  72. Set(_SET_DEVICE,'SCREEN')
  73. //  Esc works
  74. Set(_SET_ESCAPE,.T.)
  75. //  Exact match not required
  76. Set(_SET_EXACT,.F.)
  77. //  Multi user
  78. Set(_SET_EXCLUSIVE,.F.)
  79. //  ??
  80. Set(_SET_FIXED,.F.)
  81. //  Screen
  82. Set(_SET_INTENSITY,.T.)
  83. //
  84. Setcancel(.F.)
  85.  
  86. //  Set standard keys
  87. SetKey(K_F1,{ | cProc, nProcLine, cVarName | ;
  88.     GT_Help(cProc,nProcLine,cVarName) } )
  89. SetKey(K_ALT_C,{ | cProc, nProcLine, cVarName | GT_AskQuit() } )
  90.  
  91. //  Printer margin
  92. Set(_SET_MARGIN,0)
  93. //  Dir path
  94. Set(_SET_PATH,'')
  95. //  PRINT == Do ?/?? go to the PRINTER ?
  96. Set(_SET_PRINTER,.T.)
  97. //  dBase Scoreboard
  98. Set(_SET_SCOREBOARD,.F.)
  99. //  Use softseek
  100. Set(_SET_SOFTSEEK,.T.)
  101. //  Keyboard buffer
  102. Set(_SET_TYPEAHEAD,40)
  103. //  Menu wrapping
  104. Set(_SET_WRAP,.T.)
  105.  
  106. /*
  107.     Set the Ins key so that when the cursor is off it has no
  108.     effect but when it is on it is large for insert and
  109.     small for overtype.
  110. */
  111. SetKey(K_INS,{|| If(SETCURSOR()=0,NIL,SETCURSOR(;
  112.     If(READINSERT(!READINSERT()),1,2))) })
  113.  
  114. /*
  115.     End of GT_Setup()
  116. */
  117. RETURN(lsuccess)
  118.