Class RenderedLine
Represents a class that provides the Lexem line which contains information, needed for faster rendering.
Implements
Inherited Members
Namespace: Syncfusion.Windows.Forms.Edit.Implementation.Parser
Assembly: Syncfusion.Edit.Windows.dll
Syntax
public class RenderedLine : LexemLine, IComparable, ILexemLine, IXMLDataProvider, IDisposable, IEnumerable
Constructors
RenderedLine(LexemParser, IParsePoint, ConfigStack)
Initializes a new instance of the RenderedLine class.
Declaration
public RenderedLine(LexemParser parser, IParsePoint pointLineStart, ConfigStack stack)
Parameters
| Type | Name | Description |
|---|---|---|
| LexemParser | parser | Parent parser. |
| IParsePoint | pointLineStart | ParsePoint of the line start. |
| ConfigStack | stack | Stack at the beginning of the line. |
Properties
Changed
Gets a value indicating whether the line was changed after the last save.
Declaration
public bool Changed { get; }
Property Value
| Type |
|---|
| System.Boolean |
Height
Gets or sets height of the line.
Declaration
public float Height { get; set; }
Property Value
| Type |
|---|
| System.Single |
IsMeasured
Gets a value indicating whether the line was already measured.
Declaration
public bool IsMeasured { get; }
Property Value
| Type |
|---|
| System.Boolean |
LineLength
Gets the length of the line.
Declaration
public int LineLength { get; }
Property Value
| Type |
|---|
| System.Int32 |
Parsed
Gets or sets a value indicating, whether line is parsed. If line is parsed, than LineEndStack property contains Stack for the end of the line and LineLexems collection contains all lexems, that belong to current line. If line was changed, than Parsed will be set to false.
Declaration
public override bool Parsed { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
Overrides
SubLineHeight
Gets or sets the array of heights of the sublines. SubLines indexes start from 0.
Declaration
public float[] SubLineHeight { get; set; }
Property Value
| Type |
|---|
| System.Single[] |
SubLinesCount
Gets the count of sublines.
Declaration
public int SubLinesCount { get; }
Property Value
| Type |
|---|
| System.Int32 |
Width
Gets the width of the line.
Declaration
public float Width { get; }
Property Value
| Type |
|---|
| System.Single |
Y
Gets or sets render position of line.
Declaration
public float Y { get; set; }
Property Value
| Type |
|---|
| System.Single |
Methods
Dispose()
Disposes all object.
Declaration
public override void Dispose()
Overrides
DropMeasureInfo()
Drops all information about measuring.
Declaration
public void DropMeasureInfo()
FindLexemByColumn(Int32)
Searches the lexem, that contains given column index.
Declaration
public override ILexem FindLexemByColumn(int column)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | column | Needed column. |
Returns
| Type | Description |
|---|---|
| ILexem | Found lexem, or null if needed column is in virtual space. |
Overrides
FindLexemByX(Single, Single)
Searches the lexem, that contains given x offset.
Declaration
public ILexem FindLexemByX(float x, float yOffset)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Single | x | Needed x offset. |
| System.Single | yOffset | Offset by y. Used when line is word-wrapped, so it can occupy more then one line. |
Returns
| Type | Description |
|---|---|
| ILexem | Found lexem, or null if needed offset is in virtual space. |
GetEnumerator()
Gets the enumerator of the lexems.
Declaration
public IEnumerator GetEnumerator()
Returns
| Type | Description |
|---|---|
| System.Collections.IEnumerator | Enumerator. |
GetLastSublineLexem(Single)
Gets the last lexem in the subline.
Declaration
public IRenderedLexem GetLastSublineLexem(float y)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Single | y | Y offset of subline. |
Returns
| Type | Description |
|---|---|
| IRenderedLexem | Last lexem in the subline with offset Y. |
GetLineLexems(out Int64)
Collection of all lexems, that belongs to the line. Line will be reparsed.
Declaration
protected override IList GetLineLexems(out long lPositionBeforeNewLine)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int64 | lPositionBeforeNewLine |
Returns
| Type | Description |
|---|---|
| System.Collections.IList | List of line lexems. |
Overrides
GetSubLineTextHeight(Int32)
Get the height of subline's text.
Declaration
public float GetSubLineTextHeight(int num)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | num |
Returns
| Type | Description |
|---|---|
| System.Single | Subline's text height. |
GetTextHeight()
Get the height of line text.
Declaration
public float GetTextHeight()
Returns
| Type | Description |
|---|---|
| System.Single | Line's text height. |
Measure(Graphics, Single, Boolean, Int32, Int32, Int32)
Helps to measures the line and also sets lexems parameters correctly.
Declaration
public SizeF Measure(Graphics g, float maxSize, bool bCharWrap, int tabSize, int iParagraphOffset, int iWrappedLinesOffset)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Drawing.Graphics | g | Graphics object. |
| System.Single | maxSize | Maximum width of the line. |
| System.Boolean | bCharWrap | Indicates whether line should be wrapped by chars. |
| System.Int32 | tabSize | Number of positions in tab symbol. |
| System.Int32 | iParagraphOffset | Offset of paragraphs. |
| System.Int32 | iWrappedLinesOffset | Offset of wrapped lines. |
Returns
| Type | Description |
|---|---|
| System.Drawing.SizeF | Measured size. |
OnLineDelete(Object, EventArgs)
Handler of LineDeleted event.
Declaration
protected void OnLineDelete(object sender, EventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | sender | Line, that was deleted. |
| System.EventArgs | e | Empty EventArgs. |
UniteCharWrappedLexems(IList)
Unite lexems wrapped by char wrap.
Declaration
public void UniteCharWrappedLexems(IList lexems)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.IList | lexems | List of lexems. |
WrapLexem(IRenderedLexem, Graphics, Single, ref TextInfo)
Wraps lexem into two parts; first part has maximal width that can be drawn in available space.
Declaration
public RenderedLexem WrapLexem(IRenderedLexem lexem, Graphics g, float availableSpace, ref TextInfo info)
Parameters
| Type | Name | Description |
|---|---|---|
| IRenderedLexem | lexem | Lexem that as to be wrapped. |
| System.Drawing.Graphics | g | Graphics object used for lexems measuring. |
| System.Single | availableSpace | Width of available space. |
| TextInfo | info | TextInfo object what will be filled with information about new lexem. |
Returns
| Type | Description |
|---|---|
| RenderedLexem | Lexem that is the second part of the initial lexem. |