Search Results for

    Show / Hide Table of Contents

    Interface IRowInfo

    Information associated with a row in the edit control. A row is a layout concept that is independent of, but related to, the structure of the document. For example, a row can be related to a segment in the document or it could be related to the content between the start of a paragraph and the start of the first segment. It could also relate to the content between segments.

    The layout engine in the edit control works on a row-by-row basis and will update the layout of rows as they become invalid. Rows can also be visible or hidden, depending on different settings and display filters, or whether they only contain content that the user should never see (e.g. segment and paragraph tags).

    Namespace: Sdl.DesktopEditor.EditorApi
    Assembly: Sdl.DesktopEditor.EditorApi.dll
    Syntax
    public interface IRowInfo

    Properties

    Active

    Indicates if this is the currently active row in the edit control. Setting this property changes the active row (there can only be one at any one time).

    Declaration
    bool Active { get; set; }
    Property Value
    Type Description
    bool
    Remarks

    The active row may be shown with a border or a different background color in the edit control.

    See Also
    Highlighted
    ActiveRow

    ContainsDocumentStartEndNode

    Whether the row contains a document (or file) start or end node. This is useful for folding filters since it is not always easy to discover where these nodes are when working outside of the edit control.

    Declaration
    bool ContainsDocumentStartEndNode { get; }
    Property Value
    Type Description
    bool

    ContainsRevisions

    Returns true if this row contains revision information.

    Declaration
    bool ContainsRevisions { get; }
    Property Value
    Type Description
    bool

    ContainsTQAs

    Returns true if this row contains TQA information.

    Declaration
    bool ContainsTQAs { get; }
    Property Value
    Type Description
    bool

    ContainsTrackChanges

    Returns true if this row contains Track Changes information.

    Declaration
    bool ContainsTrackChanges { get; }
    Property Value
    Type Description
    bool

    EffectiveBackColor

    Actual background color currently used to display this row in the editor.

    Declaration
    Color EffectiveBackColor { get; }
    Property Value
    Type Description
    Color
    Remarks

    The effective background color for a row is calculated from the FundamentalBackColor and is affected by the Shaded, Highlighted and Active properties.

    EndsBefore

    This node is the 'upto' node for the content of the row. The effective row content ends just before this (immutable) node.

    Declaration
    IAbstractContentNode EndsBefore { get; set; }
    Property Value
    Type Description
    IAbstractContentNode
    Remarks

    This is a node that is guaranteed to not change during the lifetime of the row (unlike the actual last node in the row), such as a paragraph or segment start end node.

    FundamentalBackColor

    The base background color which is used as the row background color if a row is not active, highlighted or shaded. This color may be used when calculating the effective background color (e.g. if a row is shaded).

    Declaration
    Color FundamentalBackColor { get; set; }
    Property Value
    Type Description
    Color
    Remarks

    Setting this property to Empty will reset the fundamental background color to either the default edit control color (if one is available) or Window otherwise.

    Hidden

    Returns true if this row has been hidden by a filter

    Declaration
    bool Hidden { get; }
    Property Value
    Type Description
    bool

    HighlightBackColor

    The background color that is used as the row color when the row has been highlighted. This color may be used when calculating the effective background color.

    Declaration
    Color HighlightBackColor { get; set; }
    Property Value
    Type Description
    Color
    Remarks

    If this property is not explicitly set, the highlighting color is taken from HighlightedBackColor. To restore this as the highlighting color, set this property to Empty.

    Highlighted

    Indicates whether this row is highlighted in the edit control. Setting this property adds or removes the row from the collection of highlighted rows.

    Declaration
    bool Highlighted { get; set; }
    Property Value
    Type Description
    bool
    Remarks

    Highlighted rows may be shown with the HighlightedBackColor color.

    See Also
    Active
    HighlightedRows

    IsSegment

    true if this row represents the content of a segment.

    Declaration
    bool IsSegment { get; }
    Property Value
    Type Description
    bool
    Remarks

    The actual segment can be retrieved using the SegmentContainer property.

    NextVisibleRow

    Allows convenient access to the next row that is visible to the user. This is tested using IsVisible().

    Declaration
    IRowInfo NextVisibleRow { get; }
    Property Value
    Type Description
    IRowInfo

    ParagraphContainer

    The paragraph container node for the paragraph the content of this row appears inside or null if the row represents content that does not appear in a paragraph (e.g. file boundaries).

    Declaration
    IParagraphUnitContainerNode ParagraphContainer { get; }
    Property Value
    Type Description
    IParagraphUnitContainerNode

    PreviousVisibleRow

    Allows convenient access to the preceding that is visible to the user. This is tested using IsVisible().

    Declaration
    IRowInfo PreviousVisibleRow { get; }
    Property Value
    Type Description
    IRowInfo

    RowAboveIsDifferentParagraph

    For visible rows this indicates whether the preceding visible row above this one is in a different paragraph.

    Declaration
    bool RowAboveIsDifferentParagraph { get; }
    Property Value
    Type Description
    bool
    Remarks

    This can be used to determine whether paragraph boundaries should be drawn at the top of a custom column for this row.

    RowBelowIsDifferentParagraph

    For visible rows this indicates whether the next visible row, below this one, is in a different paragraph.

    Declaration
    bool RowBelowIsDifferentParagraph { get; }
    Property Value
    Type Description
    bool
    Remarks

    This can be used to determine whether paragraph boundaries should be drawn at the bottom of a custom column for this row.

    RowNumber

    The row number identifies this row in the the layout and is unique to each row in the control.

    Declaration
    int RowNumber { get; set; }
    Property Value
    Type Description
    int
    Remarks

    Rows are numbered sequentially. Not all rows need to be visible at all times, which could mean that there may be gaps in the visible row numbers for a control.

    The row number should be the same for rows with corresponding content ranges in different edit controls (e.g. in the source and target controls in a side-by-side editor).

    SegmentContainer

    The segment container node associated with this row or null if this is not a row that shows the content of a segment.

    Declaration
    ISegmentContainerNode SegmentContainer { get; }
    Property Value
    Type Description
    ISegmentContainerNode

    Selected

    Indicates whether this row is selected in the edit control. Some operations require rows to be selected before they can proceed, for example, merging segments. The currently active row in the edit control is always treated as selected.

    Declaration
    bool Selected { get; }
    Property Value
    Type Description
    bool

    Shaded

    Determines whether this row is currently displayed with a shaded background in the editor. Row shading takes the current background color of the row and darkens it slightly.

    Declaration
    Shading Shaded { get; }
    Property Value
    Type Description
    Shading

    StartsAfter

    The content of the row starts after this (immutable) node.

    Declaration
    IAbstractContentNode StartsAfter { get; set; }
    Property Value
    Type Description
    IAbstractContentNode
    Remarks

    This is a node that is guaranteed not to change during the lifetime of the row (unlike the actual first node in the row), such as a paragraph or segment start end node.

    Methods

    AutoScrollToRowPosition(IRowInfo)

    Scrolls this row to the location of rowAtPosition. Note: This only scrolls if the row position will pass a threshold at the top or bottom of the document. This is used, for example, to prevent the active row from moving to the very bottom of the document while the user is navigating.

    Declaration
    void AutoScrollToRowPosition(IRowInfo rowAtPosition)
    Parameters
    Type Name Description
    IRowInfo rowAtPosition

    The row at the position that this row will be scrolled to.

    GetFirstContentPosition()

    Returns the first position in the row that can be used to insert content (this can be used, for example, when moving the selection to the front of the row).

    Declaration
    Position GetFirstContentPosition()
    Returns
    Type Description
    Position

    GetLastContentPosition()

    Returns the last position in the row that can be used to insert content (this can be used, for example, when moving the selection to the end of the row).

    Declaration
    Position GetLastContentPosition()
    Returns
    Type Description
    Position

    GetShadedColor(Color)

    Calculates the shading color that will be used for the row taking current settings into account. Note that if shading is not applied to the row then the color will be the same as that passed in.

    Declaration
    Color GetShadedColor(Color color)
    Parameters
    Type Name Description
    Color color

    The color to apply shading settings to.

    Returns
    Type Description
    Color

    The shaded color, will be the same if Shaded is set to NotShaded.

    IsVisible()

    Whether the row is currently visible or hidden (folded) in the editor.

    Declaration
    bool IsVisible()
    Returns
    Type Description
    bool
    Remarks

    To change the visibility of rows in the control, use SetRowsVisibility(Predicate<IRowInfo>).

    See Also
    VisibleRows

    ScrollToCenter()

    Scrolls this row to the vertical center of the visible area in the edit control.

    Declaration
    void ScrollToCenter()

    Extension Methods

    WindowsControlUtils.ForWindowFromFrameworkElement(object, Action<Window>)
    In this article
    • Properties
      • Active
      • ContainsDocumentStartEndNode
      • ContainsRevisions
      • ContainsTQAs
      • ContainsTrackChanges
      • EffectiveBackColor
      • EndsBefore
      • FundamentalBackColor
      • Hidden
      • HighlightBackColor
      • Highlighted
      • IsSegment
      • NextVisibleRow
      • ParagraphContainer
      • PreviousVisibleRow
      • RowAboveIsDifferentParagraph
      • RowBelowIsDifferentParagraph
      • RowNumber
      • SegmentContainer
      • Selected
      • Shaded
      • StartsAfter
    • Methods
      • AutoScrollToRowPosition(IRowInfo)
      • GetFirstContentPosition()
      • GetLastContentPosition()
      • GetShadedColor(Color)
      • IsVisible()
      • ScrollToCenter()
    • Extension Methods
    Back to top Generated by DocFX