コード例 #1
0
        /// <summary>
        /// Initializes a new instance of a <see cref="XPlatIntraTextAdornmentTag"/>.
        /// </summary>
        /// <param name="adornment">The adornment to be displayed at tag's position. Must not be null.</param>
        /// <param name="removalCallback">Called when adornment is removed from the view. May be null.</param>
        /// <param name="topSpace">The amount of space needed between the top of the text in the <see cref="ITextViewLine"/> and the top of the <see cref="ITextViewLine"/>.</param>
        /// <param name="baseline">The baseline of the space-negotiating adornment.</param>
        /// <param name="textHeight">The height of the text portion of the space-negotiating adornment.</param>
        /// <param name="bottomSpace">The amount of space needed between the bottom of the text in the <see cref="ITextViewLine"/> and the bottom of the <see cref="ITextViewLine"/>.</param>
        /// <param name="affinity">The affinity of the adornment. Should be null iff the adornment has a non-zero-length span at the view's text buffer.</param>
        public XPlatIntraTextAdornmentTag(object adornment, XPlatAdornmentRemovedCallback removalCallback,
                                          double?topSpace, double?baseline, double?textHeight, double?bottomSpace, PositionAffinity?affinity)
        {
            if (adornment == null)
            {
                throw new ArgumentNullException(nameof(adornment));
            }

            Adornment       = adornment;
            RemovalCallback = removalCallback;

            this.TopSpace    = topSpace;
            this.Baseline    = baseline;
            this.TextHeight  = textHeight;
            this.BottomSpace = bottomSpace;

            this.Affinity = affinity;
        }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of a <see cref="double"/>.
 /// </summary>
 /// <param name="adornment">The adornment to be displayed at tag's position. Must not be null.</param>
 /// <param name="removalCallback">Called when adornment is removed from the view. May be null.</param>
 /// <remarks>This constructor should only be used for adornments that replace text in the view's text buffer.</remarks>
 public XPlatIntraTextAdornmentTag(object adornment, XPlatAdornmentRemovedCallback removalCallback)
     : this(adornment, removalCallback, null, null, null, null, null)
 {
 }
コード例 #3
0
 /// <summary>
 /// Initializes a new instance of a <see cref="double"/>.
 /// </summary>
 /// <param name="adornment">The adornment to be displayed at tag's position. Must not be null.</param>
 /// <param name="removalCallback">Called when adornment is removed from the view. May be null.</param>
 /// <param name="affinity">The affinity of the adornment. Should be null iff the adornment has a zero-length span at the view's text buffer.</param>
 public XPlatIntraTextAdornmentTag(object adornment, XPlatAdornmentRemovedCallback removalCallback, PositionAffinity?affinity)
     : this(adornment, removalCallback, null, null, null, null, affinity)
 {
 }