WinForms

Code Examples Upgrade Guide User Guide Demos Support Forums Download
  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class ConfigLanguage

    Show / Hide Table of Contents

    Class ConfigLanguage

    Represents a class that helps to describe how to parse source file of particular type.

    Inheritance
    System.Object
    System.Collections.CollectionBase
    EventBaseCollection
    FormatManager
    ConfigLanguage
    Implements
    System.Collections.IList
    System.Collections.ICollection
    System.Collections.IEnumerable
    System.Xml.Serialization.IXmlSerializable
    IXMLDataProvider
    System.IDisposable
    IConfigLanguage
    IFormatManager
    IConfigLexem
    IObjectInitialize
    Inherited Members
    FormatManager.m_hashNames
    FormatManager.m_iMaxLineHeight
    FormatManager.m_iMinLineHeight
    FormatManager.m_iMaxCharWidth
    FormatManager.m_iMinCharWidth
    FormatManager.Add(ISnippetFormat)
    FormatManager.Add(String)
    FormatManager.Add(String, ISnippetFormat)
    FormatManager.Add(String, String)
    FormatManager.Remove(ISnippetFormat)
    FormatManager.Remove(String)
    FormatManager.GetBrush(Color)
    FormatManager.GetBrush(HatchStyle, Color, Color)
    FormatManager.GetPen(Color)
    FormatManager.AppendToXML(XmlElement)
    FormatManager.AppendToXML(XmlTextWriter)
    FormatManager.GetStrikeOutFormat(Color)
    FormatManager.GetBorderFormat(FrameBorderStyle, Color, BorderWeight)
    FormatManager.GetTextColorFormat(Color)
    FormatManager.GetBackgroundColorFormat(Color)
    FormatManager.GetBackgroundAndTextColorFormat(Color, Color)
    FormatManager.GetTabString()
    FormatManager.OnInsertComplete(Int32, Object)
    FormatManager.OnRemoveComplete(Int32, Object)
    FormatManager.RebuildHashes()
    FormatManager.Recalculation()
    FormatManager.GetSchema()
    FormatManager.Dispose()
    FormatManager.Item[String]
    FormatManager.Item[FormatType]
    FormatManager.Item[Int32]
    FormatManager.MaxLineHeight
    FormatManager.MinLineHeight
    FormatManager.MaxCharWidth
    FormatManager.MinCharWidth
    FormatManager.SpacesInTab
    FormatManager.TabReplaceString
    FormatManager.ShowWhiteSpaces
    FormatManager.ShowWhiteSpaceProperties
    FormatManager.FormatChanged
    EventBaseCollection.OnClear()
    EventBaseCollection.OnClearComplete()
    EventBaseCollection.OnInsert(Int32, Object)
    EventBaseCollection.OnRemove(Int32, Object)
    EventBaseCollection.OnSet(Int32, Object, Object)
    EventBaseCollection.OnSetComplete(Int32, Object, Object)
    EventBaseCollection.RaiseOnChangedEvent()
    EventBaseCollection.QuietMode
    EventBaseCollection.OnChanged
    EventBaseCollection.Clearing
    EventBaseCollection.Cleared
    EventBaseCollection.Inserting
    EventBaseCollection.Inserted
    EventBaseCollection.Removing
    EventBaseCollection.Removed
    EventBaseCollection.Setting
    EventBaseCollection.Set
    System.Collections.CollectionBase.Clear()
    System.Collections.CollectionBase.RemoveAt(System.Int32)
    System.Collections.CollectionBase.System.Collections.ICollection.CopyTo(System.Array, System.Int32)
    System.Collections.CollectionBase.System.Collections.IList.get_Item(System.Int32)
    System.Collections.CollectionBase.System.Collections.IList.set_Item(System.Int32, System.Object)
    System.Collections.CollectionBase.System.Collections.IList.Contains(System.Object)
    System.Collections.CollectionBase.System.Collections.IList.Add(System.Object)
    System.Collections.CollectionBase.System.Collections.IList.Remove(System.Object)
    System.Collections.CollectionBase.System.Collections.IList.IndexOf(System.Object)
    System.Collections.CollectionBase.System.Collections.IList.Insert(System.Int32, System.Object)
    System.Collections.CollectionBase.GetEnumerator()
    System.Collections.CollectionBase.OnValidate(System.Object)
    System.Collections.CollectionBase.InnerList
    System.Collections.CollectionBase.List
    System.Collections.CollectionBase.Capacity
    System.Collections.CollectionBase.Count
    System.Collections.CollectionBase.System.Collections.IList.IsReadOnly
    System.Collections.CollectionBase.System.Collections.IList.IsFixedSize
    System.Collections.CollectionBase.System.Collections.ICollection.IsSynchronized
    System.Collections.CollectionBase.System.Collections.ICollection.SyncRoot
    System.Collections.CollectionBase.System.Collections.IList.Item[System.Int32]
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Syncfusion.Windows.Forms.Edit.Implementation.Config
    Assembly: Syncfusion.Edit.Windows.dll
    Syntax
    public class ConfigLanguage : FormatManager, IList, ICollection, IEnumerable, IXmlSerializable, IXMLDataProvider, IDisposable, IConfigLanguage, IFormatManager, IConfigLexem, IObjectInitialize

    Constructors

    ConfigLanguage()

    Initializes a new instance of the ConfigLanguage class.

    Declaration
    public ConfigLanguage()

    ConfigLanguage(String)

    Initializes a new instance of the ConfigLanguage using name.

    Declaration
    public ConfigLanguage(string name)
    Parameters
    Type Name Description
    System.String name

    Name of language ( like "Delphi" ).

    ConfigLanguage(String, String[])

    Initializes a new instance of the ConfigLanguage using name and extensions array.

    Declaration
    public ConfigLanguage(string name, string[] extensions)
    Parameters
    Type Name Description
    System.String name

    Name of language.

    System.String[] extensions

    File extensions which CL supports.

    ConfigLanguage(String, String[], IConfigLexem[])

    Initializes a new instance of the ConfigLanguage using name, extensions array and lexem array.

    Declaration
    public ConfigLanguage(string name, string[] arrExt, IConfigLexem[] arrLexem)
    Parameters
    Type Name Description
    System.String name

    Language name

    System.String[] arrExt

    File extensions which CL supports.

    IConfigLexem[] arrLexem

    Lexems array.

    ConfigLanguage(String, String[], IConfigLexem[], Split[])

    Initializes a new instance of the ConfigLanguage using name, extensions array, lexem array and splits array.

    Declaration
    public ConfigLanguage(string name, string[] arrExt, IConfigLexem[] arrLexem, Split[] arrSplits)
    Parameters
    Type Name Description
    System.String name

    Language name.

    System.String[] arrExt

    File extensions which CL supports.

    IConfigLexem[] arrLexem

    Lexems array.

    Split[] arrSplits

    Splits array.

    Properties

    AllowTriggers

    Gets a value indicating whether triggers can be used or not.

    Declaration
    public bool AllowTriggers { get; }
    Property Value
    Type Description
    System.Boolean

    AutoReplaceTriggers

    Gets or sets the list of autoreplace triggers.

    Declaration
    public ArrayList AutoReplaceTriggers { get; set; }
    Property Value
    Type Description
    System.Collections.ArrayList

    BeginBlock

    Gets begin symbol or word for lexem.

    Declaration
    public string BeginBlock { get; }
    Property Value
    Type Description
    System.String

    Cached

    Gets or sets the value for Cached.

    Declaration
    public bool Cached { get; set; }
    Property Value
    Type Description
    System.Boolean

    CaseInsensitive

    Gets or sets a value indicating whether it is Case insensitivity of the language.

    Declaration
    public bool CaseInsensitive { get; set; }
    Property Value
    Type Description
    System.Boolean

    Condition

    Gets the condition, needed to pass check. Format: name=ON|OFF

    Declaration
    public string Condition { get; set; }
    Property Value
    Type Description
    System.String

    ContentDivider

    Gets a value indicating whether content divider should be shown below lexem.

    Declaration
    public bool ContentDivider { get; }
    Property Value
    Type Description
    System.Boolean

    ContinueBlock

    If lexem can be divided on multi lines or has some special rules which can continue lexem then us this setting.

    Declaration
    public string ContinueBlock { get; }
    Property Value
    Type Description
    System.String

    DefaultInGroup

    Gets a value indicating whether lexem should be used if there are more than one config found on one priority level.

    Declaration
    public bool DefaultInGroup { get; }
    Property Value
    Type Description
    System.Boolean

    DropContextChoiceList

    Gets a value indicating whether its drops the down context choice list after entering text of the current lexem.

    Declaration
    public bool DropContextChoiceList { get; }
    Property Value
    Type Description
    System.Boolean

    DropContextPrompt

    Gets a value indicating whether context prompt should be shown after typing text of the current lexem.

    Declaration
    public bool DropContextPrompt { get; }
    Property Value
    Type Description
    System.Boolean

    EndBlock

    Gets the end symbol or word for lexem. If lexem is "keyword" then this property must be set to null value.

    Declaration
    public string EndBlock { get; }
    Property Value
    Type Description
    System.String

    EndComment

    Gets or sets the string representing end of comment for this language. If EndComment is empty string, BeginComment is inserted in each of the commented lines.

    Declaration
    public string EndComment { get; set; }
    Property Value
    Type Description
    System.String

    Extensions

    Gets or sets file extensions by which this language can be automatically linked to source file ( like .cpp .c it's for c plus plus etc.).

    Declaration
    public ArrayList Extensions { get; set; }
    Property Value
    Type Description
    System.Collections.ArrayList

    Format

    Gets or sets format by Type and FormatName.

    Declaration
    public ISnippetFormat Format { get; }
    Property Value
    Type Description
    ISnippetFormat

    FormatName

    Gets the FormatName which must be used for coloring.

    Declaration
    public string FormatName { get; }
    Property Value
    Type Description
    System.String

    ID

    Gets the static unique ID of configuration node.

    Declaration
    public int ID { get; }
    Property Value
    Type Description
    System.Int32

    Indent

    Gets a value indicating whether it performs auto-indenting after lexem with such config.

    Declaration
    public bool Indent { get; }
    Property Value
    Type Description
    System.Boolean

    IndentationGuideline

    Gets a value indicating whether IndentationGuideline should be shown.

    Declaration
    public bool IndentationGuideline { get; }
    Property Value
    Type Description
    System.Boolean

    IsBeginRegex

    Gets a value indicating whether the BeginBlock property contains Regular expression or not.

    Declaration
    public bool IsBeginRegex { get; }
    Property Value
    Type Description
    System.Boolean

    IsComplex

    Gets a value indicating whether it must parser parse lexem internals or not. For complex constructions data between begin and end blocks can have own formats.

    Declaration
    public bool IsComplex { get; }
    Property Value
    Type Description
    System.Boolean

    IsContinueRegex

    Gets a value indicating whether the ContinueBlock property contains Regular expression or not.

    Declaration
    public bool IsContinueRegex { get; }
    Property Value
    Type Description
    System.Boolean

    IsEndRegex

    Gets a value indicating whether the EndBlock property contains Regular expression or not.

    Declaration
    public bool IsEndRegex { get; }
    Property Value
    Type Description
    System.Boolean

    IsPseudoEnd

    Gets or sets a value indicating whether the end-block is just the way to exit higher by stack, or it is real ending of lexem.

    Declaration
    public bool IsPseudoEnd { get; }
    Property Value
    Type Description
    System.Boolean

    KnownFormats

    Gets the object formats. Here is the list defined in config file formats. If format not defined, but it belongs to default formats specified by FormatType enum then will be used default configuration for it. Each string hold one extension.

    Declaration
    public ArrayList KnownFormats { get; }
    Property Value
    Type Description
    System.Collections.ArrayList

    KnownLanguage

    Gets or sets currently assigned known language.

    Declaration
    public KnownLanguages KnownLanguage { get; set; }
    Property Value
    Type Description
    KnownLanguages

    Language

    Gets or sets the language friendly name ( like "Delphi" ).

    Declaration
    public string Language { get; set; }
    Property Value
    Type Description
    System.String

    Lexems

    Gets or sets the collection of some complex constructions for this language like comments, string etc. ILexem represents each complex construction.

    Declaration
    public ArrayList Lexems { get; set; }
    Property Value
    Type Description
    System.Collections.ArrayList

    NextID

    Gets ID of the lexem configuration, that follows right after current one is parsed. Such lexem must be complex and "OnlyLocalSublexems", without beginblock and with endblock.

    Declaration
    public int NextID { get; }
    Property Value
    Type Description
    System.Int32

    OneCharTokenSplits

    Gets or sets one-character token splits.

    Declaration
    public string OneCharTokenSplits { get; set; }
    Property Value
    Type Description
    System.String

    OnlyLocalSublexems

    Gets a value indicating whether the parser should look for lexems configuration just in local array, or in its parent.

    Declaration
    public bool OnlyLocalSublexems { get; }
    Property Value
    Type Description
    System.Boolean

    ParentConfig

    Gets the Parent configuration.

    Declaration
    public IConfigLexem ParentConfig { get; }
    Property Value
    Type Description
    IConfigLexem

    Priority

    If many lexems has the same begin string then on parsing must be controlled order in which lexem parser will try to interpret input as lexem.

    Declaration
    public int Priority { get; }
    Property Value
    Type Description
    System.Int32

    References

    Gets the List of references.

    Declaration
    public ArrayList References { get; }
    Property Value
    Type Description
    System.Collections.ArrayList

    SnippetsContainer

    Gets container of code snippets.

    Declaration
    public CodeSnippetsContainer SnippetsContainer { get; }
    Property Value
    Type Description
    CodeSnippetsContainer

    Splits

    Gets or sets the collection of some very small complex constructions for this language like C++ at cpp.

    Declaration
    public ArrayList Splits { get; set; }
    Property Value
    Type Description
    System.Collections.ArrayList

    StartComment

    Gets or sets the string representing beginning of comment for this language. If EndComment is empty string, BeginComment is inserted in each of the commented lines.

    Declaration
    public string StartComment { get; set; }
    Property Value
    Type Description
    System.String

    SubLexems

    Gets the list of sub lexems that are used in configuration file.

    Declaration
    public ArrayList SubLexems { get; }
    Property Value
    Type Description
    System.Collections.ArrayList

    TriggersActivators

    Gets or sets the array of autoreplace triggers activators.

    Declaration
    public char[] TriggersActivators { get; set; }
    Property Value
    Type Description
    System.Char[]

    TriggersActivatorsString

    Gets string with autoreplace triggers activators.

    Declaration
    public string TriggersActivatorsString { get; }
    Property Value
    Type Description
    System.String

    Type

    Gets the format type which must be used for coloring. If format is Custom, then used FormatName property for format identification.

    Declaration
    public FormatType Type { get; }
    Property Value
    Type Description
    FormatType

    TypeCollapsed

    Gets the collapsed text of the FormatType

    Declaration
    public string TypeCollapsed { get; }
    Property Value
    Type Description
    System.String

    UseCustomControl

    Gets a value indicating whether custom control should be used instead of the simple lexem rendering.

    Declaration
    public bool UseCustomControl { get; }
    Property Value
    Type Description
    System.Boolean

    VirtualConfig

    Gets link to the virtual config for current lexem.

    Declaration
    public IConfigLexem VirtualConfig { get; }
    Property Value
    Type Description
    IConfigLexem
    Remarks

    Virtual configs does not support collapsed state.

    Methods

    AddCodeSnippet(CodeSnippet)

    Adds the new code snippet to the container.

    Declaration
    public void AddCodeSnippet(CodeSnippet snippet)
    Parameters
    Type Name Description
    CodeSnippet snippet

    Code snippet to be added.

    AddCodeSnippet(String, ArrayList, String)

    Adds the new code snippet to the container.

    Declaration
    public void AddCodeSnippet(string title, ArrayList literals, string code)
    Parameters
    Type Name Description
    System.String title

    Title of code snippet.

    System.Collections.ArrayList literals

    List of literals.

    System.String code

    Code of snippet.

    AddCodeSnippetsContainer(CodeSnippetsContainer)

    Adds the new code snippets container to the container of snippets.

    Declaration
    public void AddCodeSnippetsContainer(CodeSnippetsContainer container)
    Parameters
    Type Name Description
    CodeSnippetsContainer container

    Code snippets container to be added.

    FindConfig(Int32)

    Searches lexem configuration by its ID in given configuration and its sub-configurations.

    Declaration
    public IConfigLexem FindConfig(int iConfigID)
    Parameters
    Type Name Description
    System.Int32 iConfigID

    ID of configuration.

    Returns
    Type Description
    IConfigLexem

    FindConfigs(String)

    Searches the specified configuration string in sub-lexems. Current lexem config is not tested for equalization. If config was not found in sub-lexems, it will be searched in parent.

    Declaration
    public IList FindConfigs(string str)
    Parameters
    Type Name Description
    System.String str

    String to find.

    Returns
    Type Description
    System.Collections.IList

    List of config lexems.

    GetConfigLexem(IConfigLexem, Int32)

    Searches lexem configuration by its ID in given configuration and its sub-configurations.

    Declaration
    protected IConfigLexem GetConfigLexem(IConfigLexem root, int iID)
    Parameters
    Type Name Description
    IConfigLexem root

    Root of the search.

    System.Int32 iID

    ID if the configuration to be found.

    Returns
    Type Description
    IConfigLexem

    Lexem configuration with given ID, or null if nothing was found.

    Initialize()

    Overridden Initialize method.

    Declaration
    public override void Initialize()
    Overrides
    FormatManager.Initialize()

    IsEqualToBegin(String)

    Checks whether the string is equal to begin block. If end block is regular expression, input string will be checked by regular expression.

    Declaration
    public bool IsEqualToBegin(string str)
    Parameters
    Type Name Description
    System.String str

    String to be checked

    Returns
    Type Description
    System.Boolean

    True if it can be treated as end block.

    IsEqualToContinue(String)

    Checks whether the string is equal to continue block. If continue block is regular expression, input string will be checked by regular expression.

    Declaration
    public bool IsEqualToContinue(string str)
    Parameters
    Type Name Description
    System.String str

    String to be checked

    Returns
    Type Description
    System.Boolean

    True if it can be treated as continue block.

    IsEqualToEnd(String)

    Checks whether the string is equal to end block. If begin block is regular expression, input string will be checked by regular expression.

    Declaration
    public bool IsEqualToEnd(string str)
    Parameters
    Type Name Description
    System.String str

    String to be checked

    Returns
    Type Description
    System.Boolean

    True if it can be treated as begin block.

    OnFormatChanged(Format)

    Drops caches of formats.

    Declaration
    protected override void OnFormatChanged(Format format)
    Parameters
    Type Name Description
    Format format

    Changed format.

    Overrides
    FormatManager.OnFormatChanged(Format)

    OnLanguageChanged(ValueChangedEventArgs)

    Call raiser for language.

    Declaration
    protected virtual void OnLanguageChanged(ValueChangedEventArgs args)
    Parameters
    Type Name Description
    ValueChangedEventArgs args

    ValueChangedEventArgs

    OnMaxCharWidthChanged(ValueChangedEventArgs)

    Call raiser for MaxCharWidth.

    Declaration
    protected virtual void OnMaxCharWidthChanged(ValueChangedEventArgs args)
    Parameters
    Type Name Description
    ValueChangedEventArgs args

    ValueChangedEventArgs

    OnMaxLineHeightChanged(ValueChangedEventArgs)

    Call raiser for MaxLineHeight.

    Declaration
    protected virtual void OnMaxLineHeightChanged(ValueChangedEventArgs args)
    Parameters
    Type Name Description
    ValueChangedEventArgs args

    ValueChangedEventArgs

    OnMinCharWidthChanged(ValueChangedEventArgs)

    Call raiser for MinCharWidth.

    Declaration
    protected virtual void OnMinCharWidthChanged(ValueChangedEventArgs args)
    Parameters
    Type Name Description
    ValueChangedEventArgs args

    ValueChangedEventArgs

    OnMinLineHeightChanged(ValueChangedEventArgs)

    Call raiser for MinLineHeight.

    Declaration
    protected virtual void OnMinLineHeightChanged(ValueChangedEventArgs args)
    Parameters
    Type Name Description
    ValueChangedEventArgs args

    ValueChangedEventArgs

    RaiseLanguageChanged(ValueChangedEventArgs)

    Raises change language event.

    Declaration
    protected void RaiseLanguageChanged(ValueChangedEventArgs args)
    Parameters
    Type Name Description
    ValueChangedEventArgs args

    ValueChangedEventArgs.

    RaiseMaxCharWidthChanged(ValueChangedEventArgs)

    Raises change MaxCharWidth event.

    Declaration
    protected void RaiseMaxCharWidthChanged(ValueChangedEventArgs args)
    Parameters
    Type Name Description
    ValueChangedEventArgs args

    ValueChangedEventArgs

    RaiseMaxLineHeightChanged(ValueChangedEventArgs)

    Raises change MaxLineHeight event.

    Declaration
    protected void RaiseMaxLineHeightChanged(ValueChangedEventArgs args)
    Parameters
    Type Name Description
    ValueChangedEventArgs args

    ValueChangedEventArgs.

    RaiseMinCharWidthChanged(ValueChangedEventArgs)

    Raises change MinCharWidth event.

    Declaration
    protected void RaiseMinCharWidthChanged(ValueChangedEventArgs args)
    Parameters
    Type Name Description
    ValueChangedEventArgs args

    ValueChangedEventArgs

    RaiseMinLineHeightChanged(ValueChangedEventArgs)

    Raises change MinLineHeight event.

    Declaration
    protected void RaiseMinLineHeightChanged(ValueChangedEventArgs args)
    Parameters
    Type Name Description
    ValueChangedEventArgs args

    ValueChangedEventArgs

    ReadXml(XmlReader)

    Reads current instance from Xml.

    Declaration
    public override void ReadXml(XmlReader reader)
    Parameters
    Type Name Description
    System.Xml.XmlReader reader

    XmlReader.

    Overrides
    FormatManager.ReadXml(XmlReader)

    ResetCaches()

    Resets all cached data. This method should be called after every change of the configuration inside the language.

    Declaration
    public void ResetCaches()

    ToString()

    Represents string representation of the object.

    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String

    String representation of the object.

    Overrides
    System.Object.ToString()

    WriteXml(XmlWriter)

    Writes current instance to Xml. Attention! Start element "ConfigLanguage" must be already written and must be closed after execution of this method.

    Declaration
    public override void WriteXml(XmlWriter writer)
    Parameters
    Type Name Description
    System.Xml.XmlWriter writer

    XmlWriter.

    Overrides
    FormatManager.WriteXml(XmlWriter)

    Events

    LanguageChanged

    Occurs after language has changed.

    Declaration
    public event ValueChangedEventHandler LanguageChanged
    Event Type
    Type Description
    ValueChangedEventHandler

    MaxCharWidthChanged

    Occurs after MaxCharWidth has changed.

    Declaration
    public event ValueChangedEventHandler MaxCharWidthChanged
    Event Type
    Type Description
    ValueChangedEventHandler

    MaxLineHeightChanged

    Occurs after MaxLineHeight has changed.

    Declaration
    public event ValueChangedEventHandler MaxLineHeightChanged
    Event Type
    Type Description
    ValueChangedEventHandler

    MinCharWidthChanged

    Occurs after MinCharWidth has changed.

    Declaration
    public event ValueChangedEventHandler MinCharWidthChanged
    Event Type
    Type Description
    ValueChangedEventHandler

    MinLineHeightChanged

    Occurs after MinLineHeight has changed.

    Declaration
    public event ValueChangedEventHandler MinLineHeightChanged
    Event Type
    Type Description
    ValueChangedEventHandler

    Explicit Interface Implementations

    IConfigLexem.Language

    Gets the Language, lexem belongs to.

    Declaration
    IConfigLanguage IConfigLexem.Language { get; }
    Returns
    Type Description
    IConfigLanguage

    Implements

    System.Collections.IList
    System.Collections.ICollection
    System.Collections.IEnumerable
    System.Xml.Serialization.IXmlSerializable
    IXMLDataProvider
    System.IDisposable
    IConfigLanguage
    IFormatManager
    IConfigLexem
    IObjectInitialize
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved