IVsPackageDefinedTextMarkerType 介面

定義

描述自訂標記類型的行為,並向使用者顯示。Describes how a custom marker type behaves and appears to the user.

public interface class IVsPackageDefinedTextMarkerType
public interface class IVsPackageDefinedTextMarkerType
__interface IVsPackageDefinedTextMarkerType
[System.Runtime.InteropServices.ComConversionLoss]
[System.Runtime.InteropServices.Guid("C70F1528-1A66-403F-AD42-F60F9D413E05")]
[System.Runtime.InteropServices.InterfaceType(1)]
public interface IVsPackageDefinedTextMarkerType
[<System.Runtime.InteropServices.ComConversionLoss>]
[<System.Runtime.InteropServices.Guid("C70F1528-1A66-403F-AD42-F60F9D413E05")>]
[<System.Runtime.InteropServices.InterfaceType(1)>]
type IVsPackageDefinedTextMarkerType = interface
Public Interface IVsPackageDefinedTextMarkerType
屬性

備註

執行此介面來提供自訂標記類型。Implement this interface to provide a custom marker type. 您也必須同時執行 IVsMergeableUIItemYou must also implement IVsMergeableUIItem at the same time. 在某些情況下,當類別未執行時,就會發生例外狀況 IVsPackageDefinedTextMarkerType IVsMergeableUIItemIn some cases, an exception can occur when a class implements IVsPackageDefinedTextMarkerType without also implementing IVsMergeableUIItem.

這個介面可讓您指定自訂標記類型的標記行為。This interface allows you to specify marker behavior for a custom marker type. 您仍然可以使用 IVsTextMarker 介面 () 、等等來變更某些標記屬性 SetBehaviorSetVisualStyle 也可以) 在 IVsTextMarkerClient 建立標記時提供。You can still change certain marker attributes using the IVsTextMarker interface (SetBehavior), SetVisualStyle, and so on) as well as by supplying an IVsTextMarkerClient when you create a marker.

執行 IVsPackageDefinedTextMarkerType 以描述指定標記的行為,並向使用者顯示。Implement IVsPackageDefinedTextMarkerType to describe how a given marker behaves and appears to the user. 環境會在 IVsPackageDefinedTextMarkerType 使用者第一次啟動 IDE 時呼叫的方法,然後在 [工具]/[選項]/[環境]/[字型 和色彩 ] 對話方塊中,按一下 [ 使用預設值 ] 按鈕。The environment calls the methods of IVsPackageDefinedTextMarkerType when the user starts the IDE for the first time, then in the Tools / Options / Environment / Fonts and Colors dialog clicks the Use Defaults button.

方法

DrawGlyphWithColors(IntPtr, RECT[], Int32, IVsTextMarkerColorSet, UInt32, Int32)

使用提供的色彩,在指定的顯示內容和周框矩形中繪製圖像。Draws a glyph in the given display context and bounding rectangle using the provided colors.

GetBehaviorFlags(UInt32)

控制標記在進行編輯時如何追蹤文字。Controls how the marker tracks text when edits occur.

GetDefaultColors(COLORINDEX[], COLORINDEX[])

傳回標記的預設前景和背景色彩。Returns the default foreground and background colors for a marker.

GetDefaultFontFlags(UInt32)

指定標記所決定之文字外觀的其他修改。Specifies additional modifications to text appearance determined by the marker.

GetDefaultLineStyle(COLORINDEX[], LINESTYLE[])

傳回自訂標記類型的預設行屬性。Returns the default line attributes for a custom marker type.

GetPriorityIndex(Int32)

傳回自訂標記類型的優先權索引,具有最高優先順序值,以接收最上層的位置。Returns the priority index for the custom marker type, with the highest priority value receiving the topmost placement.

GetVisualStyle(UInt32)

以位欄位形式傳回自訂標記類型的外觀、位置和著色。Returns the appearance, location, and coloring of a custom marker type as a bit filed.

適用於