StructureTag Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
StructureTag(ITextSnapshot, Nullable<Span>, Nullable<Span>, Nullable<Span>, Nullable<Int32>, String, Boolean, Boolean, Boolean, Object, Object)
Constructs an instance of the IStructureTag.
public StructureTag (Microsoft.VisualStudio.Text.ITextSnapshot snapshot, Microsoft.VisualStudio.Text.Span? outliningSpan = default, Microsoft.VisualStudio.Text.Span? headerSpan = default, Microsoft.VisualStudio.Text.Span? guideLineSpan = default, int? guideLineHorizontalAnchor = default, string type = default, bool isCollapsible = false, bool isDefaultCollapsed = false, bool isImplementation = false, object collapsedForm = default, object collapsedHintForm = default);
public StructureTag (Microsoft.VisualStudio.Text.ITextSnapshot snapshot, Microsoft.VisualStudio.Text.Span? outliningSpan, Microsoft.VisualStudio.Text.Span? headerSpan, Microsoft.VisualStudio.Text.Span? guideLineSpan, int? guideLineHorizontalAnchor, string type, bool isCollapsible, bool isDefaultCollapsed, bool isImplementation, object collapsedForm, object collapsedHintForm);
new Microsoft.VisualStudio.Text.Tagging.StructureTag : Microsoft.VisualStudio.Text.ITextSnapshot * Nullable<Microsoft.VisualStudio.Text.Span> * Nullable<Microsoft.VisualStudio.Text.Span> * Nullable<Microsoft.VisualStudio.Text.Span> * Nullable<int> * string * bool * bool * bool * obj * obj -> Microsoft.VisualStudio.Text.Tagging.StructureTag
Public Sub New (snapshot As ITextSnapshot, Optional outliningSpan As Nullable(Of Span) = Nothing, Optional headerSpan As Nullable(Of Span) = Nothing, Optional guideLineSpan As Nullable(Of Span) = Nothing, Optional guideLineHorizontalAnchor As Nullable(Of Integer) = Nothing, Optional type As String = Nothing, Optional isCollapsible As Boolean = false, Optional isDefaultCollapsed As Boolean = false, Optional isImplementation As Boolean = false, Optional collapsedForm As Object = Nothing, Optional collapsedHintForm As Object = Nothing)
Public Sub New (snapshot As ITextSnapshot, outliningSpan As Nullable(Of Span), headerSpan As Nullable(Of Span), guideLineSpan As Nullable(Of Span), guideLineHorizontalAnchor As Nullable(Of Integer), type As String, isCollapsible As Boolean, isDefaultCollapsed As Boolean, isImplementation As Boolean, collapsedForm As Object, collapsedHintForm As Object)
Parameters
- snapshot
- ITextSnapshot
The snapshot used to generate this StructureTag.
The vertical span within which the block structure guide is drawn. If this member is omitted, it is computed from the HeaderSpan and the OutliningSpan via heuristics.
A point capturing the horizontal offset at which the guide is drawn. If this member is omitted, it is computed from the HeaderSpan and the OutliningSpan via heuristics.
- type
- String
The structure type of the block.
- isCollapsible
- Boolean
If true, block will have block adornments.
- isDefaultCollapsed
- Boolean
If true, block is collapsed by default.
- isImplementation
- Boolean
Defines whether or not the block defines a region following a function declaration.
- collapsedForm
- Object
The form the block appears when collapsed.
- collapsedHintForm
- Object
The form of the collapsed region tooltip.
Remarks
StructureTag offers explicit control of the block structure adornments. This class operates on the pay-to-play principle, in that, it will allow you to create a tag with just a subset of fields, but if a field is missing, it will attempt to guess the missing fields from the information that it has. The most useful example of this is to omit the GuideLineSpan and GuideLineHorizontalAnchorPoint to have the API guess them from the HeaderSpan and StatementSpan indentation. If enough information is missing, the tag does nothing.
Applies to
StructureTag(ITextSnapshot, Nullable<Span>, Nullable<Span>, Nullable<Span>, Nullable<Int32>, String, Boolean, Boolean, Boolean, Object, Object, Nullable<Span>)
Constructs an instance of the IStructureTag.
public StructureTag (Microsoft.VisualStudio.Text.ITextSnapshot snapshot, Microsoft.VisualStudio.Text.Span? outliningSpan = default, Microsoft.VisualStudio.Text.Span? headerSpan = default, Microsoft.VisualStudio.Text.Span? guideLineSpan = default, int? guideLineHorizontalAnchor = default, string type = default, bool isCollapsible = false, bool isDefaultCollapsed = false, bool isImplementation = false, object collapsedForm = default, object collapsedHintForm = default, Microsoft.VisualStudio.Text.Span? primaryHeaderSpan = default);
new Microsoft.VisualStudio.Text.Tagging.StructureTag : Microsoft.VisualStudio.Text.ITextSnapshot * Nullable<Microsoft.VisualStudio.Text.Span> * Nullable<Microsoft.VisualStudio.Text.Span> * Nullable<Microsoft.VisualStudio.Text.Span> * Nullable<int> * string * bool * bool * bool * obj * obj * Nullable<Microsoft.VisualStudio.Text.Span> -> Microsoft.VisualStudio.Text.Tagging.StructureTag
Public Sub New (snapshot As ITextSnapshot, Optional outliningSpan As Nullable(Of Span) = Nothing, Optional headerSpan As Nullable(Of Span) = Nothing, Optional guideLineSpan As Nullable(Of Span) = Nothing, Optional guideLineHorizontalAnchor As Nullable(Of Integer) = Nothing, Optional type As String = Nothing, Optional isCollapsible As Boolean = false, Optional isDefaultCollapsed As Boolean = false, Optional isImplementation As Boolean = false, Optional collapsedForm As Object = Nothing, Optional collapsedHintForm As Object = Nothing, Optional primaryHeaderSpan As Nullable(Of Span) = Nothing)
Parameters
- snapshot
- ITextSnapshot
The snapshot used to generate this StructureTag.
The vertical span within which the block structure guide is drawn. If this member is omitted, it is computed from the HeaderSpan and the OutliningSpan via heuristics.
A point capturing the horizontal offset at which the guide is drawn. If this member is omitted, it is computed from the HeaderSpan and the OutliningSpan via heuristics.
- type
- String
The structure type of the block.
- isCollapsible
- Boolean
If true, block will have block adornments.
- isDefaultCollapsed
- Boolean
If true, block is collapsed by default.
- isImplementation
- Boolean
Defines whether or not the block defines a region following a function declaration.
- collapsedForm
- Object
The form the block appears when collapsed.
- collapsedHintForm
- Object
The form of the collapsed region tooltip.
Optional primary control statement of this block (e.g. "if" statement of the "else" block).
Remarks
StructureTag offers explicit control of the block structure adornments. This class operates on the pay-to-play principle, in that, it will allow you to create a tag with just a subset of fields, but if a field is missing, it will attempt to guess the missing fields from the information that it has. The most useful example of this is to omit the GuideLineSpan and GuideLineHorizontalAnchorPoint to have the API guess them from the HeaderSpan and StatementSpan indentation. If enough information is missing, the tag does nothing.