Class RenderableLexemParser
Represents a class that contain Lexem parser that uses RenderedLine instead of LexemLine class.
Implements
Inherited Members
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 |
|---|
| System.Boolean |
DefaultLineHeight
Gets the default height of the line.
Declaration
public float DefaultLineHeight { get; }
Property Value
| Type |
|---|
| System.Single |
MaxWidth
Gets or sets the maximum width for measuring lines.
Declaration
public int MaxWidth { get; set; }
Property Value
| Type |
|---|
| System.Int32 |
ParagraphOffset
Gets or sets the offset of paragraphs.
Declaration
public int ParagraphOffset { get; set; }
Property Value
| Type |
|---|
| System.Int32 |
SpaceBetweenLines
Gets or sets the space between lines.
Declaration
public int SpaceBetweenLines { get; set; }
Property Value
| Type |
|---|
| 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 |
|---|
| System.Boolean |
WrappedLinesOffset
Gets or sets the offset of wrapped lines.
Declaration
public int WrappedLinesOffset { get; set; }
Property Value
| Type |
|---|
| System.Int32 |
Methods
CheckConsistence()
Checks line list integrity.
Declaration
protected override void CheckConsistence()
Overrides
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
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
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
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
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
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
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. |