home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 24 / CD_ASCQ_24_0995.iso / dos / tools / aurora21 / cfgedit2.aml < prev    next >
Text File  |  1995-08-10  |  3KB  |  96 lines

  1. /* ------------------------------------------------------------------ */
  2. /* Macro:        CFGEDIT2.AML                                         */
  3. /* Written by:   nuText Systems                                       */
  4. /*                                                                    */
  5. /* Description:  This macro displays a configuration dialog box for   */
  6. /*               edit options 2.                                      */
  7. /* ------------------------------------------------------------------ */
  8.  
  9.   include bootpath "define.aml"
  10.  
  11.   define
  12.     set default_eotline  "≡≡≡≡≡≡ End of Text ≡≡≡≡≡≡"
  13.   end
  14.  
  15.   var enterins
  16.   var enterovl
  17.   var options
  18.   var eotline
  19.  
  20.   // create dialog box
  21.   dialog "Edit Options 2" 63 19 "cp"
  22.  
  23.   // insert mode <enter> key
  24.   groupbox 'Enter in Insert Mode:' 3 2
  25.     (menu ''
  26.        item " ( ) &Split Line"
  27.        item " ( ) &Insert Line"
  28.        item " ( ) Go to &Next Line "
  29.      end) '' (if? _EnterIns _EnterIns 'n') "sin"
  30.  
  31.   // overstrike mode <enter> key
  32.   groupbox 'Enter in Overstrike Mode:' 26 2
  33.     (menu ''
  34.        item " ( ) &Split Line"
  35.        item " ( ) &Insert Line"
  36.        item " ( ) Go to &Next Line"
  37.      end)  '' (if? _EnterOvl _EnterOvl 'n') "sin"
  38.  
  39.  
  40.   // option switches
  41.   groupbox 'Options:' 3 7
  42.     (menu ''
  43.        item " [ ] Shift &Text on TabLeft/TabRight in Insert Mode "
  44.        item " [ ] &Join Lines on Delete Character at End-of-Line"
  45.        item " [ ] Join Lines on &Backspace at Column One"
  46.        item " [ ] &Rubout on Backspace in Overstrike Mode"
  47.        item " [ ] Copy/Move/Paste Line Blocks &Above the Current Line   "
  48.        item " [ ] Repeat Current Line on &Copyblock with no Mark"
  49.        item " [ ] Delete Current Line on &Deleteblock with no Mark"
  50.        item " [ ] &Highlight the Cursor Line"
  51.      end) '' (if? _TabShift == 'y' 'a') + (if? _DelJoin  == 'y' 'b') +
  52.              (if? _BakJoin  == 'y' 'c') + (if? _BakOvl   == 'y' 'd') +
  53.              (if? _InsAbove == 'y' 'e') + (if? _CopyLine == 'y' 'f') +
  54.              (if? _DelLine  == 'y' 'g') + (if? _CurHigh  == 'y' 'h')
  55.              'abcdefgh'
  56.  
  57.   // end-of-text line
  58.   field "&End-of-Text Line:"  3 17 58
  59.         (if? _EOTLine _EOTLine default_eotline)
  60.  
  61.   // ok/cancel buttons
  62.   button "O&k"    53  3 8
  63.   button "Cancel" 53  5 8
  64.  
  65.   // display dialog box
  66.   if (getdialog ref enterins ref enterovl ref options
  67.                 ref eotline) == 'Ok' then
  68.     setobj EnterIns   enterins      'prf'
  69.     setobj EnterOvl   enterovl      'prf'
  70.     setobj TabShift   (if? (pos 'a' options) 'y' 'n')  'prf'
  71.     setobj DelJoin    (if? (pos 'b' options) 'y' 'n')  'prf'
  72.     setobj BakJoin    (if? (pos 'c' options) 'y' 'n')  'prf'
  73.     setobj BakOvl     (if? (pos 'd' options) 'y' 'n')  'prf'
  74.     setobj InsAbove   (if? (pos 'e' options) 'y' 'n')  'prf'
  75.     setobj CopyLine   (if? (pos 'f' options) 'y' 'n')  'prf'
  76.     setobj DelLine    (if? (pos 'g' options) 'y' 'n')  'prf'
  77.     setobj CurHigh    (if? (pos 'h' options) 'y' 'n')  'prf'
  78.     setobj EOTLine    (if? eotline <> default_eotline eotline)  'prf'
  79.  
  80.     // apply CurHigh and EOTLine immediately
  81.     w = getcurrwin
  82.     while w do
  83.       if wintype? "edit" w then
  84.         colorcursor (getpalette (if? _CurHigh == 'y' 4 2)) (getwincurs w)
  85.         if _EOTLine then
  86.           settitle _EOTLine 'z' 4 w
  87.           eotstring 4 w
  88.         else
  89.           eotstring -1 w
  90.         end
  91.       end
  92.       w = getprevwin w
  93.     end
  94.   end
  95.  
  96.