Welcome to mirror list, hosted at ThFree Co, Russian Federation.

IAdornmentElement.cs « Formatting « TextUI « Def « Text « src - github.com/microsoft/vs-editor-api.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 9c21272fb181f0847d7cea0797e6dfefab84ee5a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
//
//  Copyright (c) Microsoft Corporation. All rights reserved.
//  Licensed under the MIT License. See License.txt in the project root for license information.
//
namespace Microsoft.VisualStudio.Text.Formatting
{
    /// <summary>
    /// Represents a sequence element that consists of an adornment.
    /// </summary>
    public interface IAdornmentElement : ISequenceElement
    {
        /// <summary>
        /// Gets the width of the adornment (in logical pixels).
        /// </summary>
        double Width { get; }

        /// <summary>
        /// Gets the amount of space (in logical pixels) to reserve above top of the text for the <see cref="ITextViewLine"/>.
        /// </summary>
        double TopSpace { get; }

        /// <summary>
        /// The distance (in logical pixel)s between the top of the adornment text and the baseline of the
        /// <see cref="ITextViewLine"/>.
        /// </summary>
        /// <remarks><para>This property should be equal to <see cref="TextHeight"/> unless you plan to draw into the space between the baseline of
        /// <see cref="ITextViewLine"/> and its TextBottom.</para>
        /// <para>The size of the baseline affects the amount of space reserved for text on an <see cref="ITextViewLine"/>, which is used to
        /// determine the vertical size of the caret.</para>
        /// </remarks>
        double Baseline { get; }

        /// <summary>
        /// Gets the height of the adornment text. 
        /// </summary>
        /// <remarks><para>This affects the amount of space reserved for text on an <see cref="ITextViewLine"/>, which is used to
        /// determine the vertical size of the caret.</para></remarks>
        double TextHeight { get; }

        /// <summary>
        /// The amount of space (in logical pixels) to reserve below the bottom of the text in the <see cref="ITextViewLine"/>.
        /// </summary>
        double BottomSpace { get; }

        /// <summary>
        /// Gets the unique identifier associated with this adornment.
        /// </summary>
        /// <remarks>This ID can be passed to <see cref="ITextViewLine"/>.GetAdornmentBounds() to find the location
        /// of this adornment on a line in the view.</remarks>
        object IdentityTag { get; }

        /// <summary>
        /// Gets the unique identifier associated with the provider of the adornment.
        /// </summary>
        /// <remarks>This ID can be passed to <see cref="ITextViewLine.GetAdornmentTags"/> to find the list
        /// off adornment identity tags located on the line.</remarks>
        object ProviderTag { get; }

        /// <summary>
        /// Gets the <see cref="PositionAffinity"/> of the adornment.
        /// </summary>
        /// <remarks>This is used only when the length of the adornment element span in the source buffer is zero.</remarks>
        PositionAffinity Affinity { get; }
    }
}