Partager via


HIDDEN_REGION_BEHAVIOR Enumeration

Specifies whether the hidden region is controlled by the client or the editor.

Namespace:  Microsoft.VisualStudio.TextManager.Interop
Assembly:  Microsoft.VisualStudio.TextManager.Interop (in Microsoft.VisualStudio.TextManager.Interop.dll)

Syntax

'Déclaration
Public Enumeration HIDDEN_REGION_BEHAVIOR
public enum HIDDEN_REGION_BEHAVIOR
public enum class HIDDEN_REGION_BEHAVIOR
type HIDDEN_REGION_BEHAVIOR
public enum HIDDEN_REGION_BEHAVIOR

Members

Member name Description
hrbClientControlled Use to get notifications for a variety of events and to fully control every aspect of a hidden text region.
hrbEditorControlled Use if you just want to do outlining-type hiding of a region and want the editor to take responsibility for the appearance, behavior, and lifetime of the hidden region.

Remarks

The behavior is a permanent property of the hidden region. The hidden region behavior determines whether the region is controlled by the client or by the editor. Here are the key features that you can explicitly control if you use client controlled (hrbClientControlled) or editor controlled (hrbEditorControlled) behavior for your hidden region, along with each option's default implementation:

  • Banner text

    • hrbClientControlled: the banner text option is specified using NewHiddenRegion and SetBanner.

    • hrbEditorControlled: the banner text is always a fixed string, which is "..." by default.

  • Tip text

    • hrbClientControlled: Tip text is specified using GetTipText.

    • hrbEditorControlled: the first N non-white space characters of the hidden text are truncated for presentation.

  • Command negotiation

    • hrbClientControlled: Context menu commands are exposed and handled using IVsHiddenTextClient::GetMarkerCommandInfo or IVsHiddenTextClient::ExecMarkerCommand.

    • hrbEditorControlled: Context menu commands are fixed. For example, Hide Selection and Stop Outlining.

  • Event notification

    • hrbClientControlled: Notification is provided using the IVsHiddenTextClient interface, about when the hidden region is deleted, its state changes, and so on.

    • hrbEditorControlled: No notification is sent to the client. The editor handles all notification internally.

If you want to do simple outlining, use hrbEditorControlled. If you want more detailed control over how the hidden regions behave, use hrbClientControlled.

COM Signature

From textmgr.idl:

[C++]

See Also

Reference

Microsoft.VisualStudio.TextManager.Interop Namespace