home *** CD-ROM | disk | FTP | other *** search
/ Chip 1997 April / Chip_1997-04_cd.bin / prezent / cb / data.z / VCSPELL.PAS < prev    next >
Pascal/Delphi Source File  |  1997-01-16  |  33KB  |  808 lines

  1. unit VCSpell;
  2.  
  3. interface
  4.  
  5. uses Ole2, OleCtl, Classes, Graphics, OleCtrls;
  6.  
  7. const
  8.  
  9. { DictionaryCategories }
  10.  
  11.   VSCAT_STANDARD = 256;
  12.   VSCAT_IRLIST = 256;
  13.   VSCAT_CUSTOM = 512;
  14.   VSCAT_ENABLED = 1024;
  15.   VSCAT_DISABLED = 2048;
  16.  
  17. { DictionaryStatusBits }
  18.  
  19.   VSDSTAT_ENABLED = 1;
  20.   VSDSTAT_LOADED = 2;
  21.   VSDSTAT_IRLIST_ENABLED = 4;
  22.   VSDSTAT_UPDATEABLE = 8;
  23.   VSDSTAT_READONLY = 16;
  24.   VSDSTAT_EXTENDED = 32;
  25.   VSDSTAT_HYPHENATION = 64;
  26.   VSDSTAT_PHONETICS = 128;
  27.   VSDSTAT_COMMONLIST = 256;
  28.  
  29. { DictionaryLanguageCodes }
  30.  
  31.   VSLANG_AMERICAN = 0;
  32.   VSLANG_ENGLISH = 1;
  33.   VSLANG_FRENCH = 2;
  34.   VSLANG_GERMAN = 3;
  35.   VSLANG_SPANISH = 4;
  36.   VSLANG_PORTUGUESE = 5;
  37.   VSLANG_ITALIAN = 6;
  38.   VSLANG_DUTCH = 7;
  39.   VSLANG_SWEDISH = 8;
  40.   VSLANG_FINNISH = 9;
  41.   VSLANG_NORWEGIAN = 10;
  42.   VSLANG_LATIN = 11;
  43.   VSLANG_WELSH = 12;
  44.   VSLANG_POLISH = 13;
  45.   VSLANG_HUNGARIAN = 14;
  46.   VSLANG_FLEMISH = 15;
  47.   VSLANG_CZECH = 16;
  48.   VSLANG_ICELANDIC = 17;
  49.   VSLANG_ESPERANTO = 18;
  50.   VSLANG_CATALAN = 19;
  51.   VSLANG_ROMANIAN = 20;
  52.   VSLANG_BULGARIAN = 21;
  53.   VSLANG_RUSSIAN = 22;
  54.   VSLANG_QUECHUA = 23;
  55.   VSLANG_TURKISH = 24;
  56.   VSLANG_INDONESIAN = 25;
  57.   VSLANG_HEBREW = 26;
  58.   VSLANG_DANISH = 27;
  59.   VSLANG_CANADIAN = 28;
  60.  
  61. { EventOptionBits }
  62.  
  63.   VSEVOPT_COMPLETE = 1;
  64.   VSEVOPT_FOUND = 2;
  65.   VSEVOPT_MISSPELLED = 4;
  66.   VSEVOPT_BEFORE_REPLACE = 8;
  67.   VSEVOPT_AFTER_POPUP = 16;
  68.   VSEVOPT_CHECK_STATUS = 32;
  69.   VSEVOPT_CHECK_ERROR = 64;
  70.   VSEVOPT_AFTER_REPLACE = 128;
  71.   VSEVOPT_CLICK_IN = 256;
  72.   VSEVOPT_CLICK_OUT = 512;
  73.   VSEVOPT_DEFAULTS = 65533;
  74.  
  75. { SearchOrderCodes }
  76.  
  77.   VSORDER_SCIR = 0;
  78.   VSORDER_CIRS = 2;
  79.   VSORDER_IRSC = 3;
  80.   VSORDER_SIRC = 4;
  81.   VSORDER_CSIR = 6;
  82.   VSORDER_IRCS = 7;
  83.   VSORDER_NO_LOOKAHEAD = 8;
  84.  
  85. { SpellOptionBits }
  86.  
  87.   VSOPT_AUTO_REPLACE = 1;
  88.   VSOPT_AUTO_SUGGEST = 2;
  89.   VSOPT_AUTO_POPUP = 4;
  90.   VSOPT_IGNORE_FULL_CAPS = 8;
  91.   VSOPT_IGNORE_PARTIAL_NUMBERS = 16;
  92.   VSOPT_MULTILINE = 32;
  93.   VSOPT_IGNORE_PURE_NUMBERS = 64;
  94.   VSOPT_ALLOW_JOINED_WORDS = 128;
  95.   VSOPT_EXACT_MATCH = 256;
  96.   VSOPT_RETURN_EACH_WORD = 512;
  97.   VSOPT_REPLACE_RECHECK = 1024;
  98.   VSOPT_DEFAULTS = 1127;
  99.  
  100. { SuggestOptionBits }
  101.  
  102.   VSSUGOPT_CAPITALIZATION = 1;
  103.   VSSUGOPT_CHARSWAP = 2;
  104.   VSSUGOPT_DELETES = 4;
  105.   VSSUGOPT_DOUBLES = 8;
  106.   VSSUGOPT_HYPHENS = 16;
  107.   VSSUGOPT_SPLITS = 32;
  108.   VSSUGOPT_EXCHANGES = 64;
  109.   VSSUGOPT_INSERTIONS = 512;
  110.   VSSUGOPT_DEFAULTS = 639;
  111.  
  112. { IgnoreReplaceCodes }
  113.  
  114.   VSIR_GLOBAL = 1;
  115.   VSIR_PROMPT = 2;
  116.   VSIR_IGNORE = 4;
  117.   VSIR_REPLACE = 8;
  118.   VSIR_HYPHENATION = 16;
  119.   VSIR_SPELLED_OK = 5;
  120.   VSIR_REPLACE_ALL = 9;
  121.   VSIR_MISSPELLED = 6;
  122.   VSIR_PROMPT_REPLACE = 10;
  123.  
  124. { EventActionCodes }
  125.  
  126.   VS_DEFAULT_HANDLING = 0;
  127.   VS_EVENT_HANDLED = 1;
  128.   VS_CANCEL_SPELLCHECK = 2;
  129.  
  130. { ButtonClickBits }
  131.  
  132.   VSCLICK_WORD_MISSPELLED_HELP = 1;
  133.   VSCLICK_OPTIONS = 2;
  134.   VSCLICK_PROMPT_REPLACE = 4;
  135.   VSCLICK_ADD_TO_CUSTOM = 8;
  136.   VSCLICK_REPLACE_ALL = 16;
  137.   VSCLICK_REPLACE = 32;
  138.   VSCLICK_IGNORE_ALL = 64;
  139.   VSCLICK_IGNORE = 128;
  140.   VSCLICK_SUGGEST_NOT_FOUND = 256;
  141.   VSCLICK_SUGGEST_REPLACE_WITH = 512;
  142.   VSCLICK_CANCEL_SPELLCHECK = 1024;
  143.   VSCLICK_THESAURUS = 2048;
  144.   VSCLICK_OPTIONS_HELP = 65536;
  145.   VSCLICK_OPTIONS_OK = 131072;
  146.   VSCLICK_OPTIONS_CANCEL = 262144;
  147.   VSCLICK_OPEN_CUSTOM = 524288;
  148.   VSCLICK_CLOSE_CUSTOM = 1048576;
  149.   VSCLICK_OPEN_STANDARD = 2097152;
  150.   VSCLICK_CLOSE_STANDARD = 4194304;
  151.   VSCLICK_THESAURUS_OK = 16777216;
  152.   VSCLICK_THESAURUS_SEARCH = 33554432;
  153.   VSCLICK_THESAURUS_CANCEL = 67108864;
  154.   VSCLICK_THESAURUS_HELP = 134217728;
  155.  
  156. { DialogElementBits }
  157.  
  158.   VSD_WORD_MISSPELLED_HELP = 1;
  159.   VSD_OPTIONS = 2;
  160.   VSD_PROMPT_REPLACE = 4;
  161.   VSD_ADD_TO_CUSTOM = 8;
  162.   VSD_REPLACE_ALL = 16;
  163.   VSD_REPLACE = 32;
  164.   VSD_IGNORE_ALL = 64;
  165.   VSD_IGNORE = 128;
  166.   VSD_SUGGEST_NOT_FOUND = 256;
  167.   VSD_SUGGEST_REPLACE_WITH = 512;
  168.   VSD_CANCEL_SPELLCHECK = 1024;
  169.   VSD_SUGGESTIONS_LIST = 2048;
  170.   VSD_REPLACE_BOX = 4096;
  171.   VSD_CUSTOM_LIST = 8192;
  172.   VSD_THESAURUS = 16384;
  173.   VSD_OPTIONS_HELP = 65536;
  174.   VSD_CUSTOMS = 131072;
  175.   VSD_STANDARDS = 262144;
  176.   VSD_PERFORMANCE = 524288;
  177.   VSD_SUGGESTION_LIMIT = 1048576;
  178.   VSD_AUTO_SUGGESTIONS = 2097152;
  179.   VSD_EXACT_MATCH = 4194304;
  180.   VSD_IGNORE_FULL_CAPS = 8388608;
  181.   VSD_IGNORE_PARTIAL = 16777216;
  182.   VSD_IGNORE_PURE = 33554432;
  183.   VSD_ALLOW_JOINED = 67108864;
  184.   VSD_RECHECK = 134217728;
  185.   VSD_THESAURUS_HELP = 268435456;
  186.   VSD_THESAURUS_SEARCH = 536870912;
  187.  
  188. { ResultStatusCodes }
  189.  
  190.   VSR_WORD_MISSPELLED = -1;
  191.   VSR_IGNORE_REPLACE = -2;
  192.   VSR_CHECK_CANCELED = -3;
  193.   VSR_BREAK = -4;
  194.   VSR_FOUND = -5;
  195.   VSR_REPLACED = -6;
  196.   VSR_CHANGED = -7;
  197.   VSR_END_LIST = -8;
  198.   VSR_ENTRY_NOT_FOUND = -9;
  199.   VSR_OPENED_READONLY = -11;
  200.   VSR_REPLACE_OVERFLOW = -12;
  201.   VSR_NOT_ADDED = -13;
  202.   VSR_POPPED = -14;
  203.   VSR_CLICK_IN = -15;
  204.   VSR_CLICK_OUT = -16;
  205.  
  206. { ResultErrorCodes }
  207.  
  208.   VSR_NO_ERROR = 0;
  209.   VSR_WORD_TOO_LONG = 1;
  210.   VSR_NO_MISSPELL = 2;
  211.   VSR_ALREADY_OPEN = 4;
  212.   VSR_OPEN_FAILED = 5;
  213.   VSR_CREATE_FAILED = 6;
  214.   VSR_INVALID_DICTIONARY = 7;
  215.   VSR_WRITE_FAILURE = 9;
  216.   VSR_READ_FAILURE = 10;
  217.   VSR_BAD_FILE_NAME = 11;
  218.   VSR_NOT_UPDATEABLE = 12;
  219.   VSR_DUPLICATE_WORD = 13;
  220.   VSR_BAD_CUSTOM = 14;
  221.   VSR_IN_EVENT = 15;
  222.   VSR_NOT_LOADED = 16;
  223.   VSR_REPLACE_ERROR = 17;
  224.   VSR_CACHE_ERROR = 18;
  225.   VSR_INVALID_CONTEXT = 19;
  226.   VSR_NOTHING_TO_CHECK = 20;
  227.   VSR_DIALOG_ERROR = 21;
  228.   VSR_OUT_OF_MEMORY = 22;
  229.   VSR_BAD_INDEX = 23;
  230.   VSR_OUT_OF_STRING_SPACE = 24;
  231.   VSR_IN_DIALOG = 25;
  232.   VSR_FILE_EXISTS = 26;
  233.  
  234. { RuntimeErrorCodes }
  235.  
  236.   VB_OFFSET = 32350;
  237.   VBR_WORD_TOO_LONG = 32351;
  238.   VBR_NO_MISSPELL = 32352;
  239.   VBR_ALREADY_OPEN = 32354;
  240.   VBR_OPEN_FAILED = 32355;
  241.   VBR_CREATE_FAILED = 32356;
  242.   VBR_INVALID_DICTIONARY = 32357;
  243.   VBR_WRITE_FAILURE = 32359;
  244.   VBR_READ_FAILURE = 32360;
  245.   VBR_BAD_FILE_NAME = 32361;
  246.   VBR_NOT_UPDATEABLE = 32362;
  247.   VBR_DUPLICATE_WORD = 32363;
  248.   VBR_BAD_CUSTOM = 32364;
  249.   VBR_IN_EVENT = 32365;
  250.   VBR_NOT_LOADED = 32366;
  251.   VBR_REPLACE_ERROR = 32367;
  252.   VBR_CACHE_ERROR = 32368;
  253.   VBR_INVALID_CONTEXT = 32369;
  254.   VBR_NOTHING_TO_CHECK = 32370;
  255.   VBR_DIALOG_ERROR = 32371;
  256.   VBR_OUT_OF_MEMORY = 32372;
  257.   VBR_BAD_INDEX = 32373;
  258.   VBR_OUT_OF_STRING_SPACE = 32374;
  259.   VBR_IN_DIALOG = 32375;
  260.   VBR_FILE_EXISTS = 32376;
  261.  
  262. { MiscellaneousCodes }
  263.  
  264.   VS_ALL = 0;
  265.   VS_MAXWORDSIZE = 75;
  266.  
  267. type
  268.  
  269.   TVCSpellerMisspelled = procedure(Sender: TObject; var EventAction: Smallint) of object;
  270.   TVCSpellerComplete = procedure(Sender: TObject; var EventAction: Smallint) of object;
  271.   TVCSpellerFound = procedure(Sender: TObject; var EventAction: Smallint) of object;
  272.   TVCSpellerBeforeReplace = procedure(Sender: TObject; var EventAction: Smallint) of object;
  273.   TVCSpellerAfterReplace = procedure(Sender: TObject; var EventAction: Smallint) of object;
  274.   TVCSpellerAfterPopup = procedure(Sender: TObject; var EventAction: Smallint) of object;
  275.   TVCSpellerCheckStatus = procedure(Sender: TObject; var EventAction: Smallint) of object;
  276.   TVCSpellerCheckError = procedure(Sender: TObject; var EventAction: Smallint) of object;
  277.   TVCSpellerClickIn = procedure(Sender: TObject; var EventAction: Smallint) of object;
  278.   TVCSpellerClickOut = procedure(Sender: TObject; var EventAction: Smallint) of object;
  279.  
  280.   TVCSpeller = class(TOleControl)
  281.   private
  282.     FOnMisspelled: TVCSpellerMisspelled;
  283.     FOnComplete: TVCSpellerComplete;
  284.     FOnFound: TVCSpellerFound;
  285.     FOnBeforeReplace: TVCSpellerBeforeReplace;
  286.     FOnAfterReplace: TVCSpellerAfterReplace;
  287.     FOnAfterPopup: TVCSpellerAfterPopup;
  288.     FOnCheckStatus: TVCSpellerCheckStatus;
  289.     FOnCheckError: TVCSpellerCheckError;
  290.     FOnClickIn: TVCSpellerClickIn;
  291.     FOnClickOut: TVCSpellerClickOut;
  292.     procedure Set_OpenStandard(loadit: TOleBool; const Value: string); stdcall;
  293.     function Get_DictionaryLanguage(index: Smallint): Smallint; stdcall;
  294.     function Get_DictionaryName(index: Smallint): string; stdcall;
  295.     function Get_DictionaryStatus(index: Smallint): Smallint; stdcall;
  296.     function Get_DictionaryIsEnabled(index: Smallint): TOleBool; stdcall;
  297.     function Get_DictionaryNameFull(index: Smallint): string; stdcall;
  298.     function Get_StandardIRListIsEnabled(index: Smallint): TOleBool; stdcall;
  299.     function Get_DictionaryIsLoaded(index: Smallint): TOleBool; stdcall;
  300.     function Get_DictionaryPerformance(index: Smallint): Smallint; stdcall;
  301.     procedure Set_DictionaryPerformance(index: Smallint; Value: Smallint); stdcall;
  302.     function Get_Suggestion(index: Smallint): string; stdcall;
  303.     function Get_CustomIsUpdateable(index: Smallint): TOleBool; stdcall;
  304.     procedure Set_AddToStandardIRList(index: Smallint; Value: Smallint); stdcall;
  305.     procedure Set_AddSuggestion(matchcode: Smallint; const Value: string); stdcall;
  306.     procedure Set_AddToCustom(index: Smallint; Value: Smallint); stdcall;
  307.     procedure Set_ClearStandardIRList(index: Smallint; Value: Smallint); stdcall;
  308.     procedure Set_CloseDictionary(index: Smallint; Value: Smallint); stdcall;
  309.     procedure Set_GetEntry(index: Smallint; Value: Integer); stdcall;
  310.     procedure Set_RemoveFromStandardIRList(index: Smallint; const Value: string); stdcall;
  311.     function Get_DictionaryPerformanceActual(index: Smallint): Smallint; stdcall;
  312.     function Get_DictionaryBlockCount(index: Smallint): Smallint; stdcall;
  313.     function Get_DictionaryBlockSize(index: Smallint): Smallint; stdcall;
  314.     function Get_DictionaryCommonCount(index: Smallint): Smallint; stdcall;
  315.     function Get_DictionaryCompatibilityBits(index: Smallint): Smallint; stdcall;
  316.     function Get_DictionaryCopyright(index: Smallint): string; stdcall;
  317.     function Get_DictionaryCopyrightDerived(index: Smallint): string; stdcall;
  318.     function Get_DictionaryFlags(index: Smallint): Smallint; stdcall;
  319.     function Get_DictionaryLoadCount(index: Smallint): Smallint; stdcall;
  320.     function Get_DictionaryMakerVersion(index: Smallint): Smallint; stdcall;
  321.     function Get_DictionaryOpenCount(index: Smallint): Smallint; stdcall;
  322.     function Get_DictionarySymbolSetSize(index: Smallint): Smallint; stdcall;
  323.     function Get_DictionaryWordCount(index: Smallint): Integer; stdcall;
  324.     procedure Set_CreateCustomExtended(index: Smallint; const Value: string); stdcall;
  325.     procedure Set_EnableDictionary(index: Smallint; Value: TOleBool); stdcall;
  326.     procedure Set_EnableCustomUpdate(index: Smallint; Value: TOleBool); stdcall;
  327.     procedure Set_LoadDictionary(index: Smallint; Value: Smallint); stdcall;
  328.     procedure Set_UnloadDictionary(index: Smallint; Value: Smallint); stdcall;
  329.     function Get_CustomIsReadOnly(index: Smallint): TOleBool; stdcall;
  330.     function Get_CustomIsExtended(index: Smallint): TOleBool; stdcall;
  331.     procedure Set_EnableStandardIRList(index: Smallint; Value: TOleBool); stdcall;
  332.     procedure Set_OpenCustom(loadit: TOleBool; const Value: string); stdcall;
  333.   protected
  334.     procedure InitControlData; override;
  335.   public
  336.     procedure AboutBox; stdcall;
  337.     property OpenStandard[loadit: TOleBool]: string write Set_OpenStandard;
  338.     property DictionaryLanguage[index: Smallint]: Smallint read Get_DictionaryLanguage;
  339.     property DictionaryName[index: Smallint]: string read Get_DictionaryName;
  340.     property DictionaryStatus[index: Smallint]: Smallint read Get_DictionaryStatus;
  341.     property DictionaryIsEnabled[index: Smallint]: TOleBool read Get_DictionaryIsEnabled;
  342.     property DictionaryNameFull[index: Smallint]: string read Get_DictionaryNameFull;
  343.     property StandardIRListIsEnabled[index: Smallint]: TOleBool read Get_StandardIRListIsEnabled;
  344.     property DictionaryIsLoaded[index: Smallint]: TOleBool read Get_DictionaryIsLoaded;
  345.     property DictionaryPerformance[index: Smallint]: Smallint read Get_DictionaryPerformance write Set_DictionaryPerformance;
  346.     property Suggestion[index: Smallint]: string read Get_Suggestion;
  347.     property CustomIsUpdateable[index: Smallint]: TOleBool read Get_CustomIsUpdateable;
  348.     property AddToStandardIRList[index: Smallint]: Smallint write Set_AddToStandardIRList;
  349.     property AddSuggestion[matchcode: Smallint]: string write Set_AddSuggestion;
  350.     property AddToCustom[index: Smallint]: Smallint write Set_AddToCustom;
  351.     property ClearStandardIRList[index: Smallint]: Smallint write Set_ClearStandardIRList;
  352.     property CloseDictionary[index: Smallint]: Smallint write Set_CloseDictionary;
  353.     property GetEntry[index: Smallint]: Integer write Set_GetEntry;
  354.     property RemoveFromStandardIRList[index: Smallint]: string write Set_RemoveFromStandardIRList;
  355.     property DictionaryPerformanceActual[index: Smallint]: Smallint read Get_DictionaryPerformanceActual;
  356.     property DictionaryBlockCount[index: Smallint]: Smallint read Get_DictionaryBlockCount;
  357.     property DictionaryBlockSize[index: Smallint]: Smallint read Get_DictionaryBlockSize;
  358.     property DictionaryCommonCount[index: Smallint]: Smallint read Get_DictionaryCommonCount;
  359.     property DictionaryCompatibilityBits[index: Smallint]: Smallint read Get_DictionaryCompatibilityBits;
  360.     property DictionaryCopyright[index: Smallint]: string read Get_DictionaryCopyright;
  361.     property DictionaryCopyrightDerived[index: Smallint]: string read Get_DictionaryCopyrightDerived;
  362.     property DictionaryFlags[index: Smallint]: Smallint read Get_DictionaryFlags;
  363.     property DictionaryLoadCount[index: Smallint]: Smallint read Get_DictionaryLoadCount;
  364.     property DictionaryMakerVersion[index: Smallint]: Smallint read Get_DictionaryMakerVersion;
  365.     property DictionaryOpenCount[index: Smallint]: Smallint read Get_DictionaryOpenCount;
  366.     property DictionarySymbolSetSize[index: Smallint]: Smallint read Get_DictionarySymbolSetSize;
  367.     property DictionaryWordCount[index: Smallint]: Integer read Get_DictionaryWordCount;
  368.     property CreateCustomExtended[index: Smallint]: string write Set_CreateCustomExtended;
  369.     property EnableDictionary[index: Smallint]: TOleBool write Set_EnableDictionary;
  370.     property EnableCustomUpdate[index: Smallint]: TOleBool write Set_EnableCustomUpdate;
  371.     property LoadDictionary[index: Smallint]: Smallint write Set_LoadDictionary;
  372.     property UnloadDictionary[index: Smallint]: Smallint write Set_UnloadDictionary;
  373.     property CustomIsReadOnly[index: Smallint]: TOleBool read Get_CustomIsReadOnly;
  374.     property CustomIsExtended[index: Smallint]: TOleBool read Get_CustomIsExtended;
  375.     property EnableStandardIRList[index: Smallint]: TOleBool write Set_EnableStandardIRList;
  376.     property OpenCustom[loadit: TOleBool]: string write Set_OpenCustom;
  377.   published
  378.     property AutoPopup: TOleBool index 4 read GetOleBoolProp write SetOleBoolProp stored False;
  379.     property AutoReplace: TOleBool index 5 read GetOleBoolProp write SetOleBoolProp stored False;
  380.     property AutoSuggest: TOleBool index 6 read GetOleBoolProp write SetOleBoolProp stored False;
  381.     property BreakWordCount: Smallint index 7 read GetSmallintProp write SetSmallintProp stored False;
  382.     property CacheSize: Smallint index 8 read GetSmallintProp write SetSmallintProp stored False;
  383.     property ErrorOffset: Smallint index 1 read GetSmallintProp write SetSmallintProp stored False;
  384.     property IgnoreFullCaps: TOleBool index 9 read GetOleBoolProp write SetOleBoolProp stored False;
  385.     property IgnorePartialNumbers: TOleBool index 10 read GetOleBoolProp write SetOleBoolProp stored False;
  386.     property MaxSuggestions: Smallint index 11 read GetSmallintProp write SetSmallintProp stored False;
  387.     property MultiLine: TOleBool index 12 read GetOleBoolProp write SetOleBoolProp stored False;
  388.     property SuggestionsLimit: Smallint index 13 read GetSmallintProp write SetSmallintProp stored False;
  389.     property Version: string index 14 read GetStringProp write SetStringProp stored False;
  390.     property CurrentLine: Integer index 15 read GetIntegerProp write SetIntegerProp stored False;
  391.     property CustomCount: Smallint index 16 read GetSmallintProp write SetSmallintProp stored False;
  392.     property DLLHandle: Integer index 17 read GetIntegerProp write SetIntegerProp stored False;
  393.     property EventOptions: Smallint index 18 read GetSmallintProp write SetSmallintProp stored False;
  394.     property Hyphenation: string index 19 read GetStringProp write SetStringProp stored False;
  395.     property IRAction: Smallint index 20 read GetSmallintProp write SetSmallintProp stored False;
  396.     property IRWhereFound: Smallint index 21 read GetSmallintProp write SetSmallintProp stored False;
  397.     property LineBreak: string index 22 read GetStringProp write SetStringProp stored False;
  398.     property LineOffset: Smallint index 23 read GetSmallintProp write SetSmallintProp stored False;
  399.     property MisspelledWord: string index 24 read GetStringProp write SetStringProp stored False;
  400.     property ReplaceCount: Integer index 25 read GetIntegerProp write SetIntegerProp stored False;
  401.     property ReplacementWord: string index 26 read GetStringProp write SetStringProp stored False;
  402.     property ResultCode: Smallint index 27 read GetSmallintProp write SetSmallintProp stored False;
  403.     property ResumeOffset: Integer index 28 read GetIntegerProp write SetIntegerProp stored False;
  404.     property SearchOrder: Smallint index 29 read GetSmallintProp write SetSmallintProp stored False;
  405.     property SpellOptions: Smallint index 30 read GetSmallintProp write SetSmallintProp stored False;
  406.     property StandardCount: Smallint index 31 read GetSmallintProp write SetSmallintProp stored False;
  407.     property SuggestOptions: Smallint index 32 read GetSmallintProp write SetSmallintProp stored False;
  408.     property SuggestionCount: Smallint index 33 read GetSmallintProp write SetSmallintProp stored False;
  409.     property Text: string index 34 read GetStringProp write SetStringProp stored False;
  410.     property WhereFound: Smallint index 35 read GetSmallintProp write SetSmallintProp stored False;
  411.     property WordCount: Integer index 36 read GetIntegerProp write SetIntegerProp stored False;
  412.     property WordOffset: Integer index 37 read GetIntegerProp write SetIntegerProp stored False;
  413.     property AllowJoinedWords: TOleBool index 38 read GetOleBoolProp write SetOleBoolProp stored False;
  414.     property DialogLeft: Integer index 39 read GetIntegerProp write SetIntegerProp stored False;
  415.     property DialogTop: Integer index 40 read GetIntegerProp write SetIntegerProp stored False;
  416.     property ReplaceRecheck: TOleBool index 41 read GetOleBoolProp write SetOleBoolProp stored False;
  417.     property DialogBgColor: TColor index 42 read GetColorProp write SetColorProp stored False;
  418.     property DialogLeftActual: Integer index 43 read GetIntegerProp write SetIntegerProp stored False;
  419.     property DialogTopActual: Integer index 44 read GetIntegerProp write SetIntegerProp stored False;
  420.     property ReplaceOccurred: TOleBool index 45 read GetOleBoolProp write SetOleBoolProp stored False;
  421.     property SuggestionsMade: TOleBool index 46 read GetOleBoolProp write SetOleBoolProp stored False;
  422.     property WordLength: Smallint index 47 read GetSmallintProp write SetSmallintProp stored False;
  423.     property CacheHits: Integer index 48 read GetIntegerProp write SetIntegerProp stored False;
  424.     property CacheMisses: Integer index 49 read GetIntegerProp write SetIntegerProp stored False;
  425.     property TimerTicks: Integer index 50 read GetIntegerProp write SetIntegerProp stored False;
  426.     property UserData: Integer index 51 read GetIntegerProp write SetIntegerProp stored False;
  427.     property CheckedWord: string index 52 read GetStringProp write SetStringProp stored False;
  428.     property CommonIRListIsEnabled: TOleBool index 53 read GetOleBoolProp write SetOleBoolProp stored False;
  429.     property WordMisspelledTitle: string index 54 read GetStringProp write SetStringProp stored False;
  430.     property OptionsTitle: string index 55 read GetStringProp write SetStringProp stored False;
  431.     property ErrorTitle: string index 56 read GetStringProp write SetStringProp stored False;
  432.     property WordMisspelledHelpFile: string index 57 read GetStringProp write SetStringProp stored False;
  433.     property OptionsHelpFile: string index 58 read GetStringProp write SetStringProp stored False;
  434.     property DialogElements: Integer index 59 read GetIntegerProp write SetIntegerProp stored False;
  435.     property DialogWidth: Integer index 60 read GetIntegerProp write SetIntegerProp stored False;
  436.     property DialogHeight: Integer index 61 read GetIntegerProp write SetIntegerProp stored False;
  437.     property ErrorText: string index 62 read GetStringProp write SetStringProp stored False;
  438.     property ClickedButton: Integer index 63 read GetIntegerProp write SetIntegerProp stored False;
  439.     property ClickInfo: Integer index 64 read GetIntegerProp write SetIntegerProp stored False;
  440.     property ClickInfoText: string index 65 read GetStringProp write SetStringProp stored False;
  441.     property AddToCommonIRList: Smallint index 66 read GetSmallintProp write SetSmallintProp stored False;
  442.     property BeginCheck: Smallint index 67 read GetSmallintProp write SetSmallintProp stored False;
  443.     property CheckText: string index 68 read GetStringProp write SetStringProp stored False;
  444.     property CheckWord: string index 69 read GetStringProp write SetStringProp stored False;
  445.     property ClearCounts: Smallint index 70 read GetSmallintProp write SetSmallintProp stored False;
  446.     property ClearOffsets: Smallint index 71 read GetSmallintProp write SetSmallintProp stored False;
  447.     property FindSuggestions: string index 72 read GetStringProp write SetStringProp stored False;
  448.     property ReplaceLastWord: Smallint index 73 read GetSmallintProp write SetSmallintProp stored False;
  449.     property ResumeCheck: Smallint index 74 read GetSmallintProp write SetSmallintProp stored False;
  450.     property ClearSuggestions: Smallint index 75 read GetSmallintProp write SetSmallintProp stored False;
  451.     property PopupError: Smallint index 76 read GetSmallintProp write SetSmallintProp stored False;
  452.     property PopupOptions: Smallint index 77 read GetSmallintProp write SetSmallintProp stored False;
  453.     property PopupWordMisspelled: Smallint index 78 read GetSmallintProp write SetSmallintProp stored False;
  454.     property CreateCustom: string index 79 read GetStringProp write SetStringProp stored False;
  455.     property ResumeWithRecheck: Smallint index 80 read GetSmallintProp write SetSmallintProp stored False;
  456.     property EnableCommonIRList: TOleBool index 81 read GetOleBoolProp write SetOleBoolProp stored False;
  457.     property ClearCommonIRList: Smallint index 82 read GetSmallintProp write SetSmallintProp stored False;
  458.     property RemoveFromCommonIRList: string index 83 read GetStringProp write SetStringProp stored False;
  459.     property EnableEventOptions: Smallint index 84 read GetSmallintProp write SetSmallintProp stored False;
  460.     property DisableEventOptions: Smallint index 85 read GetSmallintProp write SetSmallintProp stored False;
  461.     property EnableSpellOptions: Smallint index 86 read GetSmallintProp write SetSmallintProp stored False;
  462.     property DisableSpellOptions: Smallint index 87 read GetSmallintProp write SetSmallintProp stored False;
  463.     property EnableSuggestOptions: Smallint index 88 read GetSmallintProp write SetSmallintProp stored False;
  464.     property DisableSuggestOptions: Smallint index 89 read GetSmallintProp write SetSmallintProp stored False;
  465.     property EnableDialogElements: Integer index 90 read GetIntegerProp write SetIntegerProp stored False;
  466.     property DisableDialogElements: Integer index 91 read GetIntegerProp write SetIntegerProp stored False;
  467.     property StandardDictionary: string index 2 read GetStringProp write SetStringProp stored False;
  468.     property CustomDictionary: string index 3 read GetStringProp write SetStringProp stored False;
  469.     property OnMisspelled: TVCSpellerMisspelled read FOnMisspelled write FOnMisspelled;
  470.     property OnComplete: TVCSpellerComplete read FOnComplete write FOnComplete;
  471.     property OnFound: TVCSpellerFound read FOnFound write FOnFound;
  472.     property OnBeforeReplace: TVCSpellerBeforeReplace read FOnBeforeReplace write FOnBeforeReplace;
  473.     property OnAfterReplace: TVCSpellerAfterReplace read FOnAfterReplace write FOnAfterReplace;
  474.     property OnAfterPopup: TVCSpellerAfterPopup read FOnAfterPopup write FOnAfterPopup;
  475.     property OnCheckStatus: TVCSpellerCheckStatus read FOnCheckStatus write FOnCheckStatus;
  476.     property OnCheckError: TVCSpellerCheckError read FOnCheckError write FOnCheckError;
  477.     property OnClickIn: TVCSpellerClickIn read FOnClickIn write FOnClickIn;
  478.     property OnClickOut: TVCSpellerClickOut read FOnClickOut write FOnClickOut;
  479.   end;
  480.  
  481. procedure Register;
  482.  
  483. implementation
  484.  
  485. {$J+}
  486.  
  487. procedure TVCSpeller.InitControlData;
  488. const
  489.   CEventDispIDs: array[0..9] of Integer = (
  490.     $00000001, $00000002, $00000003, $00000004, $00000005, $00000006,
  491.     $00000007, $00000008, $00000009, $0000000A);
  492.   CLicenseKey: array[0..19] of Word = (
  493.     $0043, $006F, $0070, $0079, $0072, $0069, $0067, $0068, $0074, $0020,
  494.     $0028, $0063, $0029, $0020, $0031, $0039, $0039, $0035, $0020, $0000);
  495.   CControlData: TControlData = (
  496.     ClassID: (
  497.       D1:$97F4CED0;D2:$9103;D3:$11CE;D4:($83,$85,$52,$41,$53,$48,$00,$01));
  498.     EventIID: (
  499.       D1:$97F4CED2;D2:$9103;D3:$11CE;D4:($83,$85,$52,$41,$53,$48,$00,$01));
  500.     EventCount: 10;
  501.     EventDispIDs: @CEventDispIDs;
  502.     LicenseKey: @CLicenseKey;
  503.     Flags: $00000000);
  504. begin
  505.   ControlData := @CControlData;
  506. end;
  507.  
  508. procedure TVCSpeller.AboutBox;
  509. const
  510.   DispInfo: array[0..7] of Byte = ($D8,$FD,$FF,$FF,$00,$01,$00,$00);
  511. begin
  512.   InvokeMethod(DispInfo, nil);
  513. end;
  514.  
  515. procedure TVCSpeller.Set_OpenStandard;
  516. const
  517.   DispInfo: array[0..9] of Byte = ($5C,$00,$00,$00,$00,$04,$02,$00,$0B,$08);
  518. begin
  519.   InvokeMethod(DispInfo, nil);
  520. end;
  521.  
  522. function TVCSpeller.Get_DictionaryLanguage;
  523. const
  524.   DispInfo: array[0..8] of Byte = ($6B,$00,$00,$00,$02,$02,$01,$00,$02);
  525. begin
  526.   InvokeMethod(DispInfo, @Result);
  527. end;
  528.  
  529. function TVCSpeller.Get_DictionaryName;
  530. const
  531.   DispInfo: array[0..8] of Byte = ($6C,$00,$00,$00,$08,$02,$01,$00,$02);
  532. begin
  533.   InvokeMethod(DispInfo, @Result);
  534. end;
  535.  
  536. function TVCSpeller.Get_DictionaryStatus;
  537. const
  538.   DispInfo: array[0..8] of Byte = ($6D,$00,$00,$00,$02,$02,$01,$00,$02);
  539. begin
  540.   InvokeMethod(DispInfo, @Result);
  541. end;
  542.  
  543. function TVCSpeller.Get_DictionaryIsEnabled;
  544. const
  545.   DispInfo: array[0..8] of Byte = ($6E,$00,$00,$00,$0B,$02,$01,$00,$02);
  546. begin
  547.   InvokeMethod(DispInfo, @Result);
  548. end;
  549.  
  550. function TVCSpeller.Get_DictionaryNameFull;
  551. const
  552.   DispInfo: array[0..8] of Byte = ($6F,$00,$00,$00,$08,$02,$01,$00,$02);
  553. begin
  554.   InvokeMethod(DispInfo, @Result);
  555. end;
  556.  
  557. function TVCSpeller.Get_StandardIRListIsEnabled;
  558. const
  559.   DispInfo: array[0..8] of Byte = ($70,$00,$00,$00,$0B,$02,$01,$00,$02);
  560. begin
  561.   InvokeMethod(DispInfo, @Result);
  562. end;
  563.  
  564. function TVCSpeller.Get_DictionaryIsLoaded;
  565. const
  566.   DispInfo: array[0..8] of Byte = ($71,$00,$00,$00,$0B,$02,$01,$00,$02);
  567. begin
  568.   InvokeMethod(DispInfo, @Result);
  569. end;
  570.  
  571. function TVCSpeller.Get_DictionaryPerformance;
  572. const
  573.   DispInfo: array[0..8] of Byte = ($72,$00,$00,$00,$02,$02,$01,$00,$02);
  574. begin
  575.   InvokeMethod(DispInfo, @Result);
  576. end;
  577.  
  578. procedure TVCSpeller.Set_DictionaryPerformance;
  579. const
  580.   DispInfo: array[0..9] of Byte = ($72,$00,$00,$00,$00,$04,$02,$00,$02,$02);
  581. begin
  582.   InvokeMethod(DispInfo, nil);
  583. end;
  584.  
  585. function TVCSpeller.Get_Suggestion;
  586. const
  587.   DispInfo: array[0..8] of Byte = ($73,$00,$00,$00,$08,$02,$01,$00,$02);
  588. begin
  589.   InvokeMethod(DispInfo, @Result);
  590. end;
  591.  
  592. function TVCSpeller.Get_CustomIsUpdateable;
  593. const
  594.   DispInfo: array[0..8] of Byte = ($74,$00,$00,$00,$0B,$02,$01,$00,$02);
  595. begin
  596.   InvokeMethod(DispInfo, @Result);
  597. end;
  598.  
  599. procedure TVCSpeller.Set_AddToStandardIRList;
  600. const
  601.   DispInfo: array[0..9] of Byte = ($5D,$00,$00,$00,$00,$04,$02,$00,$02,$02);
  602. begin
  603.   InvokeMethod(DispInfo, nil);
  604. end;
  605.  
  606. procedure TVCSpeller.Set_AddSuggestion;
  607. const
  608.   DispInfo: array[0..9] of Byte = ($5E,$00,$00,$00,$00,$04,$02,$00,$02,$08);
  609. begin
  610.   InvokeMethod(DispInfo, nil);
  611. end;
  612.  
  613. procedure TVCSpeller.Set_AddToCustom;
  614. const
  615.   DispInfo: array[0..9] of Byte = ($5F,$00,$00,$00,$00,$04,$02,$00,$02,$02);
  616. begin
  617.   InvokeMethod(DispInfo, nil);
  618. end;
  619.  
  620. procedure TVCSpeller.Set_ClearStandardIRList;
  621. const
  622.   DispInfo: array[0..9] of Byte = ($60,$00,$00,$00,$00,$04,$02,$00,$02,$02);
  623. begin
  624.   InvokeMethod(DispInfo, nil);
  625. end;
  626.  
  627. procedure TVCSpeller.Set_CloseDictionary;
  628. const
  629.   DispInfo: array[0..9] of Byte = ($61,$00,$00,$00,$00,$04,$02,$00,$02,$02);
  630. begin
  631.   InvokeMethod(DispInfo, nil);
  632. end;
  633.  
  634. procedure TVCSpeller.Set_GetEntry;
  635. const
  636.   DispInfo: array[0..9] of Byte = ($62,$00,$00,$00,$00,$04,$02,$00,$02,$03);
  637. begin
  638.   InvokeMethod(DispInfo, nil);
  639. end;
  640.  
  641. procedure TVCSpeller.Set_RemoveFromStandardIRList;
  642. const
  643.   DispInfo: array[0..9] of Byte = ($63,$00,$00,$00,$00,$04,$02,$00,$02,$08);
  644. begin
  645.   InvokeMethod(DispInfo, nil);
  646. end;
  647.  
  648. function TVCSpeller.Get_DictionaryPerformanceActual;
  649. const
  650.   DispInfo: array[0..8] of Byte = ($75,$00,$00,$00,$02,$02,$01,$00,$02);
  651. begin
  652.   InvokeMethod(DispInfo, @Result);
  653. end;
  654.  
  655. function TVCSpeller.Get_DictionaryBlockCount;
  656. const
  657.   DispInfo: array[0..8] of Byte = ($76,$00,$00,$00,$02,$02,$01,$00,$02);
  658. begin
  659.   InvokeMethod(DispInfo, @Result);
  660. end;
  661.  
  662. function TVCSpeller.Get_DictionaryBlockSize;
  663. const
  664.   DispInfo: array[0..8] of Byte = ($77,$00,$00,$00,$02,$02,$01,$00,$02);
  665. begin
  666.   InvokeMethod(DispInfo, @Result);
  667. end;
  668.  
  669. function TVCSpeller.Get_DictionaryCommonCount;
  670. const
  671.   DispInfo: array[0..8] of Byte = ($78,$00,$00,$00,$02,$02,$01,$00,$02);
  672. begin
  673.   InvokeMethod(DispInfo, @Result);
  674. end;
  675.  
  676. function TVCSpeller.Get_DictionaryCompatibilityBits;
  677. const
  678.   DispInfo: array[0..8] of Byte = ($79,$00,$00,$00,$02,$02,$01,$00,$02);
  679. begin
  680.   InvokeMethod(DispInfo, @Result);
  681. end;
  682.  
  683. function TVCSpeller.Get_DictionaryCopyright;
  684. const
  685.   DispInfo: array[0..8] of Byte = ($7A,$00,$00,$00,$08,$02,$01,$00,$02);
  686. begin
  687.   InvokeMethod(DispInfo, @Result);
  688. end;
  689.  
  690. function TVCSpeller.Get_DictionaryCopyrightDerived;
  691. const
  692.   DispInfo: array[0..8] of Byte = ($7B,$00,$00,$00,$08,$02,$01,$00,$02);
  693. begin
  694.   InvokeMethod(DispInfo, @Result);
  695. end;
  696.  
  697. function TVCSpeller.Get_DictionaryFlags;
  698. const
  699.   DispInfo: array[0..8] of Byte = ($7C,$00,$00,$00,$02,$02,$01,$00,$02);
  700. begin
  701.   InvokeMethod(DispInfo, @Result);
  702. end;
  703.  
  704. function TVCSpeller.Get_DictionaryLoadCount;
  705. const
  706.   DispInfo: array[0..8] of Byte = ($7D,$00,$00,$00,$02,$02,$01,$00,$02);
  707. begin
  708.   InvokeMethod(DispInfo, @Result);
  709. end;
  710.  
  711. function TVCSpeller.Get_DictionaryMakerVersion;
  712. const
  713.   DispInfo: array[0..8] of Byte = ($7E,$00,$00,$00,$02,$02,$01,$00,$02);
  714. begin
  715.   InvokeMethod(DispInfo, @Result);
  716. end;
  717.  
  718. function TVCSpeller.Get_DictionaryOpenCount;
  719. const
  720.   DispInfo: array[0..8] of Byte = ($7F,$00,$00,$00,$02,$02,$01,$00,$02);
  721. begin
  722.   InvokeMethod(DispInfo, @Result);
  723. end;
  724.  
  725. function TVCSpeller.Get_DictionarySymbolSetSize;
  726. const
  727.   DispInfo: array[0..8] of Byte = ($80,$00,$00,$00,$02,$02,$01,$00,$02);
  728. begin
  729.   InvokeMethod(DispInfo, @Result);
  730. end;
  731.  
  732. function TVCSpeller.Get_DictionaryWordCount;
  733. const
  734.   DispInfo: array[0..8] of Byte = ($81,$00,$00,$00,$03,$02,$01,$00,$02);
  735. begin
  736.   InvokeMethod(DispInfo, @Result);
  737. end;
  738.  
  739. procedure TVCSpeller.Set_CreateCustomExtended;
  740. const
  741.   DispInfo: array[0..9] of Byte = ($64,$00,$00,$00,$00,$04,$02,$00,$02,$08);
  742. begin
  743.   InvokeMethod(DispInfo, nil);
  744. end;
  745.  
  746. procedure TVCSpeller.Set_EnableDictionary;
  747. const
  748.   DispInfo: array[0..9] of Byte = ($65,$00,$00,$00,$00,$04,$02,$00,$02,$0B);
  749. begin
  750.   InvokeMethod(DispInfo, nil);
  751. end;
  752.  
  753. procedure TVCSpeller.Set_EnableCustomUpdate;
  754. const
  755.   DispInfo: array[0..9] of Byte = ($66,$00,$00,$00,$00,$04,$02,$00,$02,$0B);
  756. begin
  757.   InvokeMethod(DispInfo, nil);
  758. end;
  759.  
  760. procedure TVCSpeller.Set_LoadDictionary;
  761. const
  762.   DispInfo: array[0..9] of Byte = ($67,$00,$00,$00,$00,$04,$02,$00,$02,$02);
  763. begin
  764.   InvokeMethod(DispInfo, nil);
  765. end;
  766.  
  767. procedure TVCSpeller.Set_UnloadDictionary;
  768. const
  769.   DispInfo: array[0..9] of Byte = ($68,$00,$00,$00,$00,$04,$02,$00,$02,$02);
  770. begin
  771.   InvokeMethod(DispInfo, nil);
  772. end;
  773.  
  774. function TVCSpeller.Get_CustomIsReadOnly;
  775. const
  776.   DispInfo: array[0..8] of Byte = ($82,$00,$00,$00,$0B,$02,$01,$00,$02);
  777. begin
  778.   InvokeMethod(DispInfo, @Result);
  779. end;
  780.  
  781. function TVCSpeller.Get_CustomIsExtended;
  782. const
  783.   DispInfo: array[0..8] of Byte = ($83,$00,$00,$00,$0B,$02,$01,$00,$02);
  784. begin
  785.   InvokeMethod(DispInfo, @Result);
  786. end;
  787.  
  788. procedure TVCSpeller.Set_EnableStandardIRList;
  789. const
  790.   DispInfo: array[0..9] of Byte = ($69,$00,$00,$00,$00,$04,$02,$00,$02,$0B);
  791. begin
  792.   InvokeMethod(DispInfo, nil);
  793. end;
  794.  
  795. procedure TVCSpeller.Set_OpenCustom;
  796. const
  797.   DispInfo: array[0..9] of Byte = ($6A,$00,$00,$00,$00,$04,$02,$00,$0B,$08);
  798. begin
  799.   InvokeMethod(DispInfo, nil);
  800. end;
  801.  
  802. procedure Register;
  803. begin
  804.   RegisterComponents('ActiveX', [TVCSpeller]);
  805. end;
  806.  
  807. end.
  808.