menu

WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class RenderableLexemParser - API Reference

    Show / Hide Table of Contents

    Class RenderableLexemParser

    Represents a class that contain Lexem parser that uses RenderedLine instead of LexemLine class.

    Inheritance
    System.Object
    LexemParser
    RenderableLexemParser
    Implements
    ILexemParser
    System.Collections.IEnumerable
    IXMLDataProvider
    ILongOperationController
    IPositionConverter
    System.IDisposable
    Inherited Members
    LexemParser.DEF_LINES_BEFORE_SPEEDUP
    LexemParser.DeleteLine(ILexemLine)
    LexemParser.FindLineInCache(Int32)
    LexemParser.GetLine(Int32)
    LexemParser.NextLine()
    LexemParser.PreviousLine()
    LexemParser.GetLine()
    LexemParser.GetStackCopy()
    LexemParser.CreateDefaultStack()
    LexemParser.CreatePlainTextStack()
    LexemParser.SetStack(ConfigStack)
    LexemParser.GetEnumerator()
    LexemParser.GetEnumerator(ConfigStack)
    LexemParser.GetEnumerator(ConfigStack, IParsePoint)
    LexemParser.GetLineEnumerator(ILexemLine)
    LexemParser.GetLineEnumerator()
    LexemParser.Undo()
    LexemParser.Redo()
    LexemParser.Redo(Boolean)
    LexemParser.InsertText(String, CoordinatePoint)
    LexemParser.DeleteText(CoordinatePoint, CoordinatePoint)
    LexemParser.GetLastRegisteredLine()
    LexemParser.GetCollapsableRegion(IParsePoint)
    LexemParser.GetParsePoint(Int32, Int32)
    LexemParser.GetCollapsedRegionsList()
    LexemParser.UpdateLineInformation()
    LexemParser.GetCoordinatePoint(Int32, Int32)
    LexemParser.GetCoordinatePoint(Int32, Int32, Boolean)
    LexemParser.GetCoordinatePoint(IParsePoint)
    LexemParser.GetCoordinatePoint(IParsePoint, Boolean)
    LexemParser.GetCoordinatePoint(IParsePoint, Boolean, Boolean)
    LexemParser.GetNearestParsePointRight(Int32, Int32)
    LexemParser.GetNearestParsePointLeft(Int32, Int32)
    LexemParser.GetOuterCollapsableRegion(IParsePoint, Boolean)
    LexemParser.GetOuterCollapsableRegion(Int64, Boolean)
    LexemParser.EnsureVisibility(IParsePoint, IParsePoint)
    LexemParser.EnsureVisibility(IParsePoint)
    LexemParser.IsPointVisible(IParsePoint)
    LexemParser.SetAllCollapsings(Boolean)
    LexemParser.InitializeCollapse(Boolean, Boolean)
    LexemParser.BeginUpdateRegions()
    LexemParser.EndUpdateRegions()
    LexemParser.AppendToXML(XmlElement)
    LexemParser.AppendToXML(XmlTextWriter)
    LexemParser.AppendToXML(XmlTextWriter, CoordinatePoint, CoordinatePoint)
    LexemParser.WriteLinesToXML(XmlTextWriter, Int32, Int32)
    LexemParser.StartOperation(String)
    LexemParser.GetLexemLength(ILexem)
    LexemParser.ResetLines(ILexemLine)
    LexemParser.ResetLines(ILexemLine, Boolean)
    LexemParser.RaiseLineIndexChanged(UncachedLexemLine)
    LexemParser.ClearEventHandlers()
    LexemParser.LockConsistenceChecks()
    LexemParser.UnlockConsistenceChecks()
    LexemParser.InsertLexemLineIntoList(ILexemLine, Int32)
    LexemParser.FindAndExpandRegion(Int64)
    LexemParser.RaiseTextInsertedEvent(String, Int32, Int32)
    LexemParser.RaiseTextInsertingEvent(String, Int32, Int32)
    LexemParser.RaiseLineInstanceCreatedEvent(ILexemLine)
    LexemParser.RaiseLineInstanceDeletedEvent(ILexemLine)
    LexemParser.FillStack(ConfigStack, ConfigStack)
    LexemParser.ParsingMode
    LexemParser.Formats
    LexemParser.BaseStream
    LexemParser.TotalLines
    LexemParser.CurrentLine
    LexemParser.CanUndo
    LexemParser.CanRedo
    LexemParser.CollapsingEnabled
    LexemParser.UndoQueueLength
    LexemParser.RedoQueueLength
    LexemParser.TabLength
    LexemParser.ConsistenceChecksLocked
    LexemParser.IsCollapsingLocked
    LexemParser.LineInstanceCreated
    LexemParser.LineInstanceDeleted
    LexemParser.LinesCountChanged
    LexemParser.LineInserted
    LexemParser.LineDeleted
    LexemParser.TextInserted
    LexemParser.TextDeleted
    LexemParser.TextInserting
    LexemParser.TextDeleting
    LexemParser.OperationStarted
    LexemParser.OperationStopped
    LexemParser.OutliningBeforeExpand
    LexemParser.OutliningExpand
    LexemParser.OutliningBeforeCollapse
    LexemParser.OutliningCollapse
    LexemParser.LineIndexChanged
    System.Object.ToString()
    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.Parser
    Assembly: Syncfusion.Edit.Windows.dll
    Syntax
    public class RenderableLexemParser : LexemParser, ILexemParser, IEnumerable, IXMLDataProvider, ILongOperationControllerInternal, ILongOperationController, IPositionConverter, IDisposable

    Constructors

    RenderableLexemParser(StreamsWrapper, IConfigLanguage)

    Initializes a new instance of the RenderableLexemParser class.

    Declaration
    public RenderableLexemParser(StreamsWrapper source, IConfigLanguage language)
    Parameters
    Type Name Description
    StreamsWrapper source

    Input source

    IConfigLanguage language

    Language configuration

    Properties

    CharWrap

    Gets or sets a value indicating whether word wrapping should be performed by chars in EditControl.

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

    DefaultLineHeight

    Gets the default height of the line.

    Declaration
    public float DefaultLineHeight { get; }
    Property Value
    Type Description
    System.Single

    MaxWidth

    Gets or sets the maximum width for measuring lines.

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

    ParagraphOffset

    Gets or sets the offset of paragraphs.

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

    SpaceBetweenLines

    Gets or sets the space between lines.

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

    UseNativeDrawing

    Gets or sets a value indicating whether native GDI should be used for text output or not.

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

    WrappedLinesOffset

    Gets or sets the offset of wrapped lines.

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

    Methods

    CheckConsistence()

    Checks line list integrity.

    Declaration
    protected override void CheckConsistence()
    Overrides
    LexemParser.CheckConsistence()

    CheckLine(RenderedLine)

    Checks whether the line was rendered and raises exception if the line was not measured.

    Declaration
    public static void CheckLine(RenderedLine line)
    Parameters
    Type Name Description
    RenderedLine line

    Line to be checked.

    CorrectVirtual(Point, Boolean)

    Corrects virtual coordinates.

    Declaration
    public Point CorrectVirtual(Point point, bool virtualSpaceEnabled)
    Parameters
    Type Name Description
    System.Drawing.Point point

    Virtual coordinates to be corrected.

    System.Boolean virtualSpaceEnabled

    Specifies whether virtual space is enabled.

    Returns
    Type Description
    System.Drawing.Point

    Virtual point with correct coordinates.

    CreateLexem(String, IConfigLexem)

    Creates new lexem. Can be overriden.

    Declaration
    protected override Lexem CreateLexem(string text, IConfigLexem config)
    Parameters
    Type Name Description
    System.String text

    Text for the lexem.

    IConfigLexem config

    Config of lexem.

    Returns
    Type Description
    Lexem

    New lexem.

    Overrides
    LexemParser.CreateLexem(String, IConfigLexem)

    CreateLine(IParsePoint, ConfigStack)

    Creates new instance of the RenderedLine class.

    Declaration
    protected override ILexemLine CreateLine(IParsePoint pointLineStart, ConfigStack stack)
    Parameters
    Type Name Description
    IParsePoint pointLineStart

    ParsePoint of the line start.

    ConfigStack stack

    Stack at the beginning of the line.

    Returns
    Type Description
    ILexemLine

    ILexemLine interface of the line

    Overrides
    LexemParser.CreateLine(IParsePoint, ConfigStack)

    CreatePlainTextLine(Int32, Int32, Int32)

    Creates lexem line with plain text formatting. Also calls FixLineRenderingPositions methods.

    Declaration
    protected override ILexemLine CreatePlainTextLine(int iLineIndexVirtual, int iLineIndexPhysical, int index)
    Parameters
    Type Name Description
    System.Int32 iLineIndexVirtual

    Virtual line index.

    System.Int32 iLineIndexPhysical

    Phisical line index.

    System.Int32 index

    Index of the line in the lines list.

    Returns
    Type Description
    ILexemLine

    newly created lexem line.

    Overrides
    LexemParser.CreatePlainTextLine(Int32, Int32, Int32)

    CustomVirtualToGraphical(Point)

    Converts the virtual to Graphical coordinates.

    Declaration
    public RectangleF CustomVirtualToGraphical(Point point)
    Parameters
    Type Name Description
    System.Drawing.Point point

    POints with virtual position

    Returns
    Type Description
    System.Drawing.RectangleF

    Rectangle, occupied by character in given coordinates.

    Dispose()

    Disposes all used resources.

    Declaration
    public void Dispose()

    DropMeasuringInfo()

    Drops measuring info for all cached lines.

    Declaration
    public void DropMeasuringInfo()

    Finalize()

    Calls Dispose method to dispose all used resources.

    Declaration
    protected void Finalize()

    FixLineRenderingPositions()

    Helps to fixes y coordinates of all lines. All unparsed lines are treated to have default height.

    Declaration
    public void FixLineRenderingPositions()

    GetLineByY(Single)

    Gets the line by specified y position.

    Declaration
    public RenderedLine GetLineByY(float y)
    Parameters
    Type Name Description
    System.Single y

    Y position.

    Returns
    Type Description
    RenderedLine

    RenderedLine object.

    GetLineByY(Single, Int32)

    Gets the line by specified y position.

    Declaration
    public RenderedLine GetLineByY(float y, int iMaxLines)
    Parameters
    Type Name Description
    System.Single y

    Y position.

    System.Int32 iMaxLines

    Max. number of lines.

    Returns
    Type Description
    RenderedLine

    RenderedLine object.

    GetNextLine(ILexemLine)

    Parses line, that is next to given one. Cache is not used.

    Declaration
    protected override ILexemLine GetNextLine(ILexemLine line)
    Parameters
    Type Name Description
    ILexemLine line

    Current line.

    Returns
    Type Description
    ILexemLine

    New line.

    Overrides
    LexemParser.GetNextLine(ILexemLine)

    GraphicalToVirtual(Point)

    Converts graphical coordinates to virtual.

    Declaration
    public Point GraphicalToVirtual(Point point)
    Parameters
    Type Name Description
    System.Drawing.Point point

    Point with graphical position.

    Returns
    Type Description
    System.Drawing.Point

    Point with virtual position.

    GraphicalToVirtual(Point, Boolean)

    Converts graphical coordinates to virtual.

    Declaration
    public Point GraphicalToVirtual(Point point, bool allowWhiteSpace)
    Parameters
    Type Name Description
    System.Drawing.Point point

    Point with graphical position.

    System.Boolean allowWhiteSpace

    Specifies if whitespace after last character in line should be treated like regular characters.

    Returns
    Type Description
    System.Drawing.Point

    Point with virtual position.

    MeasureLine(RenderedLine)

    Helps to measures line if needed.

    Declaration
    public void MeasureLine(RenderedLine line)
    Parameters
    Type Name Description
    RenderedLine line

    Line to be measured.

    OnCollapsingEnabledChanged()

    Makes all needed updates after changing CollapsingEnabled state.

    Declaration
    protected override void OnCollapsingEnabledChanged()
    Overrides
    LexemParser.OnCollapsingEnabledChanged()

    OnRegNewCollapsedStateChanged(Object, EventArgs)

    On every collapsing/uncollapsing of region moves graphical positions of the lines.

    Declaration
    protected override void OnRegNewCollapsedStateChanged(object sender, EventArgs e)
    Parameters
    Type Name Description
    System.Object sender

    Sender.

    System.EventArgs e

    EventArgs.

    Overrides
    LexemParser.OnRegNewCollapsedStateChanged(Object, EventArgs)

    PhysicalToVirtual(IParsePoint)

    Converts physical coordinates to virtual.

    Declaration
    public Point PhysicalToVirtual(IParsePoint point)
    Parameters
    Type Name Description
    IParsePoint point

    ParsePoint with physical position.

    Returns
    Type Description
    System.Drawing.Point

    Point with virtual position.

    RemeasureLines()

    Drops measuring info and remeasures all cached lines.

    Declaration
    public void RemeasureLines()

    SetDPIFromGraphics(Graphics)

    Helps to changes the dpi of the graphics object, that are used for measuring lines. If dpi is not equal to the currently used, new graphics object is created and all lines are remeasured.

    Declaration
    public void SetDPIFromGraphics(Graphics g)
    Parameters
    Type Name Description
    System.Drawing.Graphics g

    Graphics object with desired resolution.

    VirtualToGraphical(Point)

    Converts virtual coordinates to graphical.

    Declaration
    public RectangleF VirtualToGraphical(Point point)
    Parameters
    Type Name Description
    System.Drawing.Point point

    Point with virtual position.

    Returns
    Type Description
    System.Drawing.RectangleF

    Rectangle, occupied by character in given coordinates.

    VirtualToPhysical(Point)

    Converts Virtual position to physical positions.

    Declaration
    public IParsePoint VirtualToPhysical(Point point)
    Parameters
    Type Name Description
    System.Drawing.Point point

    Virtual point.

    Returns
    Type Description
    IParsePoint

    IParsePoint with reference to physical coordinates.

    Implements

    ILexemParser
    System.Collections.IEnumerable
    IXMLDataProvider
    ILongOperationController
    IPositionConverter
    System.IDisposable

    Extension Methods

    EnumerableExtensions.GetElementType(IEnumerable)
    EnumerableExtensions.GetItemPropertyInfo(IEnumerable)
    FunctionalExtensions.ForEach<T>(IEnumerable, Action<T>)
    FunctionalExtensions.ToList<T>(IEnumerable)
    QueryableExtensions.OfQueryable(IEnumerable)
    QueryableExtensions.OfQueryable(IEnumerable, Type)
    QueryableExtensions.GroupByMany<TElement>(IEnumerable, Type, List<Func<TElement, Object>>)
    QueryableExtensions.GroupByMany(IEnumerable, Type, Func<String, Expression>, String[])
    QueryableExtensions.GroupByMany(IEnumerable, Type, List<SortDescriptor>, Dictionary<String, IComparer<Object>>, Func<String, Expression>, String[])
    QueryableExtensions.GroupByMany(IEnumerable, Type, List<SortDescriptor>, Func<String, Expression>, String[])
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved