home *** CD-ROM | disk | FTP | other *** search
/ Black Box 4 / BlackBox.cdr / editors / tde150.arj / CFGMODES.H < prev    next >
C/C++ Source or Header  |  1992-04-01  |  3KB  |  108 lines

  1. #define Ins     0
  2. #define Ind     1
  3. #define Tab     2
  4. #define Write_Z 3
  5. #define Crlf    4
  6. #define Trim    5
  7. #define Eol     6
  8. #define WW      7
  9. #define Left    8
  10. #define Para    9
  11. #define Right   10
  12. #define Size    11
  13. #define Backup  12
  14. #define Ruler   13
  15.  
  16.  
  17. /*
  18.  * cursor size
  19.  */
  20. #define SMALL_INS       0
  21. #define BIG_INS         1
  22.  
  23.  
  24. /*
  25.  * "mode_infos" contain the editor mode variables.  The configuration
  26.  *  utility modifies this structure to custimize the start-up tde
  27.  *  configuration
  28.  */
  29. typedef struct {
  30.    int  color_scheme;           /* color to start out with */
  31.    int  sync;                   /* sync the cursor movement command? */
  32.    int  sync_sem;               /* sync the cursor movement command? */
  33.    int  insert;                 /* in insert mode? */
  34.    int  indent;                 /* in auto-indent mode? */
  35.    int  tab_size;               /* characters between tab stops */
  36.    int  backup;                 /* copy file to .bak? */
  37.    int  enh_kbd;                /* type of keyboard */
  38.    int  cursor_size;            /* insert cursor big or small? */
  39.    char *eof;                   /* message to display at end of file */
  40.    int  control_z;              /* write ^Z - t or f */
  41.    int  crlf;                   /* <cr><lf> toggle CRLF or LF */
  42.    int  trailing;               /* remove trailing space? T or F */
  43.    int  show_eol;               /* show lf at eol? T or F */
  44.    int  word_wrap;              /* in word wrap mode? */
  45.    int  left_margin;            /* left margin */
  46.    int  parg_margin;            /* column for 1st word in paragraph */
  47.    int  right_margin;           /* right margin */
  48.    int  do_backups;             /* create backup or ".bak" files? T or F */
  49.    int  ruler;                  /* show ruler at top of window? T or F */
  50. } MODE_INFO;
  51.  
  52.  
  53. /*
  54.  * flags used for opening files to write either in binary or text mode.
  55.  * crlf is for opening files in text mode - Operating System converts
  56.  * lf to crlf automatically.  in binary mode, lf is not translated.
  57.  */
  58. #define CRLF            1
  59. #define LF              2
  60.  
  61.  
  62. char *mode_screen[] = {
  63. "                      Default editor modes ",
  64. " ",
  65. "            Insert/Overwrite mode: ",
  66. "                      Indent mode: ",
  67. "                         Tab Size: ",
  68. "                ^Z at end of file: ",
  69. "       End of line on file output: ",
  70. "                   Trailing space: ",
  71. "    Display end of line character: ",
  72. "                   Word wrap mode: ",
  73. "                      Left margin: ",
  74. "                 Paragraph margin: ",
  75. "                     Right margin: ",
  76. "               Insert cursor size: ",
  77. "         Create .bak backup files: ",
  78. "           Ruler at top of window: ",
  79. "  ",
  80. "  ",
  81. "  \x1b, \x1a = change values   \x18, \x19 = move cursor   F3 = Quit   F10 = Save and Quit",
  82. NULL
  83. };
  84.  
  85.  
  86. struct {
  87.    int line;
  88.    int col;
  89.    int mode;
  90.    void (*show_me)( void );
  91. } mode[14] = {
  92.    {  5, 36, 0, show_insert_mode },
  93.    {  6, 36, 0, show_indent_mode },
  94.    {  7, 36, 0, show_tabsize },
  95.    {  8, 36, 0, show_controlz },
  96.    {  9, 36, 0, show_eol_out },
  97.    { 10, 36, 0, show_trail },
  98.    { 11, 36, 0, show_eol_display },
  99.    { 12, 36, 0, show_ww },
  100.    { 13, 36, 0, show_left },
  101.    { 14, 36, 0, show_para },
  102.    { 15, 36, 0, show_right },
  103.    { 16, 36, 0, show_cursor_size },
  104.    { 17, 36, 0, show_backup_mode },
  105.    { 18, 36, 0, show_ruler_mode }
  106. };
  107.  
  108.