HIDDEN_REGION_BEHAVIOR Enum
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.
Specifies whether the hidden region is controlled by the client or the editor.
public enum class HIDDEN_REGION_BEHAVIOR
public enum class HIDDEN_REGION_BEHAVIOR
enum HIDDEN_REGION_BEHAVIOR
public enum HIDDEN_REGION_BEHAVIOR
type HIDDEN_REGION_BEHAVIOR =
Public Enum HIDDEN_REGION_BEHAVIOR
- Inheritance
-
HIDDEN_REGION_BEHAVIOR
Fields
Name | Value | Description |
---|---|---|
0 | Use to get notifications for a variety of events and to fully control every aspect of a hidden text region. |
|
1 | 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++]