Search Results for

    Show / Hide Table of Contents

    Interface ITagPainter

    Interface implemented by components that provide customized rendering of tags in the edit control.

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

    Methods

    DrawPlaceholderTag(Graphics, Rectangle, IPlaceholderNode, string)

    Draw a placeholder node.

    Declaration
    void DrawPlaceholderTag(Graphics g, Rectangle boundingBox, IPlaceholderNode placeholderNode, string displayText)
    Parameters
    Type Name Description
    Graphics g

    The graphics context to use for drawing

    Rectangle boundingBox

    The bounding rectangle, who's size was determined from a previous call to GetPlaceholderTagSize(Graphics, IPlaceholderNode, string, ref int, ref int). Any drawing operations should be limited to this area, or they may overlap with other content.

    IPlaceholderNode placeholderNode

    The node to be rendered

    string displayText

    The tag's display text according to current tag display settings.

    DrawStartEndTag(Graphics, Rectangle, IStartEndNode, string, bool)

    Draw a start/end node.

    Declaration
    void DrawStartEndTag(Graphics g, Rectangle boundingBox, IStartEndNode startEndNode, string displayText, bool rtl)
    Parameters
    Type Name Description
    Graphics g

    The graphics context to use for drawing

    Rectangle boundingBox

    The bounding rectangle, who's size was determined from a previous call to GetStartEndTagSize(Graphics, IStartEndNode, string, ref int, ref int). Any drawing operations should be limited to this area, or they may overlap with other content.

    IStartEndNode startEndNode

    The node to be rendered

    string displayText

    The tag's display text according to current tag display settings.

    bool rtl

    The local writing direction around the tag pair: true for rtl, false for ltr

    GetDisplayableTagText(string)

    Gets the tag text that should be displayed on screen (eg, with line breaks, etc, removed).

    Declaration
    string GetDisplayableTagText(string tagText)
    Parameters
    Type Name Description
    string tagText
    Returns
    Type Description
    string

    GetPlaceholderTagSize(Graphics, IPlaceholderNode, string, ref int, ref int)

    Calculate the size of a placeholder node and and ascent and descent for the tag in relation to any text that appears on it.

    Declaration
    Size GetPlaceholderTagSize(Graphics g, IPlaceholderNode placeholderNode, string displayText, ref int ascent, ref int descent)
    Parameters
    Type Name Description
    Graphics g

    The graphics context to use for drawing

    IPlaceholderNode placeholderNode

    The node to be sized

    string displayText

    The tag's display text according to current tag display settings.

    int ascent

    Ascent of the font family used for tag display text, adjusted for the location of the text within the returned size

    int descent

    Descent of the font family used for tag display text, adjusted for the location of the text within the returned size

    Returns
    Type Description
    Size

    The size of the (rectangular) area required to draw the tag.

    Remarks

    The sum of ascent and descent should equal the tag height.

    GetStartEndTagSize(Graphics, IStartEndNode, string, ref int, ref int)

    Calculate the size of a start/end node and and ascent and descent for the tag in relation to any text that appears on it.

    Declaration
    Size GetStartEndTagSize(Graphics g, IStartEndNode startEndNode, string displayText, ref int ascent, ref int descent)
    Parameters
    Type Name Description
    Graphics g

    The graphics context to use for drawing

    IStartEndNode startEndNode

    The node to be sized

    string displayText

    The tag's display text according to current tag display settings.

    int ascent

    Ascent of the font family used for tag display text, adjusted for the location of the text within the returned size

    int descent

    Descent of the font family used for tag display text, adjusted for the location of the text within the returned size

    Returns
    Type Description
    Size

    The size of the (rectangular) area required to draw the tag.

    Remarks

    The sum of ascent and descent should equal the tag height.

    Extension Methods

    WindowsControlUtils.ForWindowFromFrameworkElement(object, Action<Window>)
    In this article
    • Methods
      • DrawPlaceholderTag(Graphics, Rectangle, IPlaceholderNode, string)
      • DrawStartEndTag(Graphics, Rectangle, IStartEndNode, string, bool)
      • GetDisplayableTagText(string)
      • GetPlaceholderTagSize(Graphics, IPlaceholderNode, string, ref int, ref int)
      • GetStartEndTagSize(Graphics, IStartEndNode, string, ref int, ref int)
    • Extension Methods
    Back to top Generated by DocFX