Search Results for

    Show / Hide Table of Contents

    Class SegmentIdColumn

    Column that shows the segment ID for segment rows. For non-segment rows it shows only the default background color.

    Inheritance
    System.Object
    AbstractCustomColumn
    AbstractRowSelectionColumn
    RowNumberColumn
    SegmentIdColumn
    Implements
    IInteractiveCustomColumn
    ICustomColumn
    Inherited Members
    RowNumberColumn.CalculateCellContentHeight(Graphics, IRowInfo)
    RowNumberColumn.DrawCell(Graphics, IRowInfo, Rectangle, Pen, Pen, Pen, Pen)
    RowNumberColumn.VerticalPadding
    RowNumberColumn.HorizontalPadding
    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 SegmentIdColumn : RowNumberColumn, IInteractiveCustomColumn, ICustomColumn
    Remarks

    The optimal column width is determined by measuring the size of the text in the MaxWidthRowId property. If this property is not set it is estimated in the same manner as for the row number column, where it is calculated as the width of a number consisting entirely of digits '8', where the max number of digits is estimated to the same number of digits as total number of rows (not segments) in the edit control. I.e. if the edit control contains 0-9 rows the column is sized to fit the number '8', for 10-99 rows the number '88' is used to determine the optimal column width, for 100-999 rows '888' is used, etc.

    If segment IDs other than sequential numbers are used this will mean that the segment ID may not fit on a single line in the column. If this is the case the ID will be wrapped across multiple lines.

    Constructors

    SegmentIdColumn()

    Default constructor.

    Declaration
    public SegmentIdColumn()

    Properties

    MaxWidthRowId

    If set the text of this property will be measured to determine the optimal column width.

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

    If not set the optimal column width is determined from the number of rows in the document, where it is assumed that segments are numbered sequentially and that the largest segment number that may need to be shown is less than the total number of rows in the edit control.

    Methods

    GetOptimalWidth(Graphics)

    Overridden to measure the text in MaxWidthRowId if set.

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

    GetText(IRowInfo)

    Overridden to return the segment ID for segment rows and null for other rows.

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

    Implements

    IInteractiveCustomColumn
    ICustomColumn

    Extension Methods

    WindowsControlUtils.ForWindowFromFrameworkElement(Object, Action<Window>)

    On this page

    • Constructors
      • SegmentIdColumn()
    • Properties
      • MaxWidthRowId
    • Methods
      • GetOptimalWidth(Graphics)
      • GetText(IRowInfo)
    • Implements
    • Extension Methods
    Back to top Generated by DocFX