TExtKeywordList class
PlusMemo Help Send comments on this topic.
TExtKeywordList class

Glossary Item Box

Unit

ExtHilit

 

Declaration (partial)

type 

  TExtKeywordList = class(TKeywordList)

    public

      function AddExtKeyWord(const KeyWord: string; Options: TWordOptions;

                             Style        : TFontStyles;

                             ContextNumber,

                             Scope,

                             Priority      : SmallInt;

                             Cursor        : TCursor;

                             Backgnd,

                             Foregnd       : TColor): Integer;

 

      property Scope[i: Integer]: Integer;

      property Priority[i: Integer]: Integer;

    end;

 

Description

TExtKeywordList is a class to hold the keyword definitions of a TExtHighlighter.  It possesses all the functionality of its ancestor TKeywordList, plus the ability to maintain scope and priority attributes for each keyword.  It can also work with ini files to load or save its definitions.

 

Method AddExtKeywords acts similarly to AddKeywords of TKeywordList, with the addition of two parameters, Scope and Priority, that controls the complex scoped highlighting algorithm of TExtHighlighter.  Also, array properties Scope and Priority can be read or written to control these parameters for an already defined keyword.

 

Remark

Worth noting is that woFirstParWord, woFirstNonBlank and woStartPar  members of TWordOptions are effective with TExtHighlighter.Keywords, contrarily to TPlusMemo.Keywords.