Search Results for

    Show / Hide Table of Contents

    Class RowNumberColumn

    Custom column implementation that shows row numbers.

    Inheritance
    System.Object
    AbstractCustomColumn
    AbstractRowSelectionColumn
    RowNumberColumn
    SegmentIdColumn
    Implements
    IInteractiveCustomColumn
    ICustomColumn
    Inherited Members
    AbstractRowSelectionColumn.OnContentChanged(Object, CustomColumnContentChangedEventArgs)
    AbstractRowSelectionColumn.OnCellMouseDown(IRowInfo, Rectangle, MouseEventArgs)
    AbstractRowSelectionColumn.OnCellMouseDoubleClick(IRowInfo, Rectangle, MouseEventArgs)
    AbstractRowSelectionColumn.OnCellMouseUp(IRowInfo, Rectangle, MouseEventArgs)
    AbstractRowSelectionColumn.OnCellMouseMove(IRowInfo, Rectangle, MouseEventArgs)
    AbstractRowSelectionColumn.OnCellMouseRightDown(IRowInfo, Rectangle, MouseEventArgs)
    AbstractRowSelectionColumn.OnCellMouseRightUp(IRowInfo, Rectangle, MouseEventArgs)
    AbstractRowSelectionColumn.OnCellMouseEntering(IRowInfo, Rectangle, IRowInfo, Rectangle)
    AbstractRowSelectionColumn.OnCellMouseLeaving(IRowInfo, Rectangle, IRowInfo, Rectangle)
    AbstractRowSelectionColumn.IsMinimized
    AbstractRowSelectionColumn.MinimizedWidth
    AbstractRowSelectionColumn.EventFlags
    AbstractRowSelectionColumn.ContentChanged
    AbstractCustomColumn.CalculateTextSize(Graphics, String, Font)
    AbstractCustomColumn.CalculateTextSize(Graphics, String, Font, Int32)
    AbstractCustomColumn.GetFont()
    AbstractCustomColumn.DrawDefaultBackground(Graphics, Rectangle, IRowInfo)
    AbstractCustomColumn.DrawBorders(Graphics, Rectangle, Pen, Pen, Pen, Pen)
    AbstractCustomColumn.DrawTopBorder(Graphics, Rectangle, Pen)
    AbstractCustomColumn.DrawRightBorder(Graphics, Rectangle, Pen)
    AbstractCustomColumn.DrawBottomBorder(Graphics, Rectangle, Pen)
    AbstractCustomColumn.DrawLeftBorder(Graphics, Rectangle, Pen)
    AbstractCustomColumn.BeginDraw()
    AbstractCustomColumn.SetRowSizeAccessor(RowSizeAccessor)
    AbstractCustomColumn.PrepareRegisterRows()
    AbstractCustomColumn.RegisterRow(IRowInfo)
    AbstractCustomColumn.TextFormat
    AbstractCustomColumn.EditControl
    AbstractCustomColumn.Width
    AbstractCustomColumn.IsComplex
    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: Sdl.DesktopEditor.EditorApi.Implementation
    Assembly: Sdl.DesktopEditor.EditorApi.dll
    Syntax
    public class RowNumberColumn : AbstractRowSelectionColumn, IInteractiveCustomColumn, ICustomColumn
    Remarks

    This column shows the actual row numbers used in the implementation. Row numbers will be sequential but in most cases not all rows will be shown, as depending on display settings typically only rows corresponding to segments and rows with file boundaries are shown.

    The row numbers are shown right aligned by default (to fit well on the left side of an edit control) but you can set the text alignment explicitly using the TextFormat property.

    Constructors

    RowNumberColumn()

    Default constructor.

    Declaration
    public RowNumberColumn()

    Properties

    HorizontalPadding

    If set this number of pixels will be used as total horizontal padding for this column. I.e. if the text is centered half of this padding will appear to the left and half of it to the right of the text in the column.

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

    VerticalPadding

    If set this number of pixels will be used as total vertical padding for this column. I.e. if the text is centered half of this padding will appear above and half of it below the text in the column.

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

    Methods

    CalculateCellContentHeight(Graphics, IRowInfo)

    Called by the framework during layout to determine the minimum height of the content for a specific cell.

    Declaration
    public override int CalculateCellContentHeight(Graphics g, IRowInfo row)
    Parameters
    Type Name Description
    System.Drawing.Graphics g
    IRowInfo row
    Returns
    Type Description
    System.Int32

    The height of the text to be shown for this row

    Overrides
    AbstractCustomColumn.CalculateCellContentHeight(Graphics, IRowInfo)

    DrawCell(Graphics, IRowInfo, Rectangle, Pen, Pen, Pen, Pen)

    Called by the framework during painting to draw the content of the specified cell.

    Declaration
    public override void DrawCell(Graphics g, IRowInfo row, Rectangle cellBounds, Pen leftBorderPen, Pen rightBorderPen, Pen topBorderPen, Pen bottomBorderPen)
    Parameters
    Type Name Description
    System.Drawing.Graphics g
    IRowInfo row
    System.Drawing.Rectangle cellBounds
    System.Drawing.Pen leftBorderPen
    System.Drawing.Pen rightBorderPen
    System.Drawing.Pen topBorderPen
    System.Drawing.Pen bottomBorderPen
    Overrides
    AbstractCustomColumn.DrawCell(Graphics, IRowInfo, Rectangle, Pen, Pen, Pen, Pen)
    Remarks

    The implementation draws the cell with the appropriate background and borders, and displays the row number as text using the current text properties.

    GetOptimalWidth(Graphics)

    Called by the edit control to determine the optimal width of the column.

    Declaration
    public override int GetOptimalWidth(Graphics g)
    Parameters
    Type Name Description
    System.Drawing.Graphics g
    Returns
    Type Description
    System.Int32

    The width of the largest number expected to be shown in the column.

    Overrides
    AbstractCustomColumn.GetOptimalWidth(Graphics)

    GetText(IRowInfo)

    The text to be shown in the column.

    Declaration
    protected virtual string GetText(IRowInfo row)
    Parameters
    Type Name Description
    IRowInfo row
    Returns
    Type Description
    System.String

    Implements

    IInteractiveCustomColumn
    ICustomColumn

    Extension Methods

    WindowsControlUtils.ForWindowFromFrameworkElement(Object, Action<Window>)

    On this page

    • Constructors
      • RowNumberColumn()
    • Properties
      • HorizontalPadding
      • VerticalPadding
    • Methods
      • CalculateCellContentHeight(Graphics, IRowInfo)
      • DrawCell(Graphics, IRowInfo, Rectangle, Pen, Pen, Pen, Pen)
      • GetOptimalWidth(Graphics)
      • GetText(IRowInfo)
    • Implements
    • Extension Methods
    Back to top Generated by DocFX