home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD (UK) 2000 March / pcp161b.iso / handson / archive / Issue160 / files / SyntaxEditor / editconsts.pas next >
Encoding:
Pascal/Delphi Source File  |  1999-10-18  |  1.9 KB  |  49 lines

  1. unit editconsts;
  2. interface
  3.  
  4. uses Graphics; // needed for TTextAttributes constants such as clBlue;
  5.  
  6. const
  7.  
  8.        CR = #13;
  9.        LF = #10;
  10.        CRLF = #13#10;
  11.        TERMINATOR : char = '}';
  12.        SLASH : char = '\';
  13.        PARCODE = '\par ';
  14.        KWCODE = '\fs16\b ';  // bold for keywords
  15.        COMMENTCODE = '\fs16\cf2\b ';  // bold fuschia for comments
  16.        STRINGCODE = '\fs16\cf1\b ';  // blue bold for strings
  17.        PLAINCODE = '\plain\fs16\cf0 ';  // plain black for other text
  18.        SPECIALRTFCHARS = ['{','}','\'] ;
  19.        ALPHANUMERIC =['a'..'z', 'A'..'Z', '_', '0'..'9'];
  20.        RTFHEADER = '{\rtf1\ansi\ansicpg1252\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}'+CRLF+'{\f2\fswiss MS Sans Serif;}{\f3\fswiss\fprq2 System;}}'+CRLF;
  21.        RTFCTABLE = '{\colortbl\red0\green0\blue0;\red0\green0\blue255;\red255\green0\blue255;\red0\green128\blue0;}'+CRLF+'\deflang2057\pard\plain\f0\fs16\cf0 ';
  22.  
  23.        // Use these colours for on-the-fly colouring
  24.        STRINGCOL = clBlue;
  25.        STRINGSTYLE = [fsBold];
  26.        COMMENTCOL = clFuchsia;
  27.        COMMENTSTYLE = [fsBold];
  28.        PLAINCOL = clBlack;
  29.        PLAINSTYLE = [];
  30.        KWCOL = clBlack;
  31.        KWSTYLE = [fsBold];
  32.  
  33.   NUMKEYWORDS = 50;
  34.   Keywords : array[0..NUMKEYWORDS] of string =
  35.               ( 'and', 'array', 'as', 'begin', 'case', 'class', 'const',
  36.               'constructor', 'destructor', 'div', 'do', 'downto', 'else',
  37.               'end', 'except', 'file', 'finally', 'for', 'function', 'if',
  38.               'implementation', 'in', 'inherited', 'interface', 'is', 'mod',
  39.               'nil', 'not', 'object', 'of', 'on', 'or', 'private', 'procedure',
  40.               'program', 'property', 'public', 'published', 'repeat', 'set',
  41.               'string', 'then', 'to', 'try', 'type', 'unit', 'until', 'uses',
  42.               'var', 'while', 'with');
  43.  
  44.  
  45.  
  46. implementation
  47.  
  48. end.
  49.