Delen via


__UIHWINFLAGS Enumeration

Controls characteristics of a UI hierarchy window.

This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.

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

Syntax

'Declaration
<FlagsAttribute> _
Public Enumeration __UIHWINFLAGS
[FlagsAttribute]
public enum __UIHWINFLAGS
[FlagsAttribute]
public enum class __UIHWINFLAGS
[<FlagsAttribute>]
type __UIHWINFLAGS
public enum __UIHWINFLAGS

Members

Member name Description
UIHWF_ActAsProjectTypeWin Determines whether the UI hierarchy window tracks the environment's selection.
UIHWF_DoNotSortRootNodes Default is alpha sort on caption enabled toolbars in UIHierarchyWindow tool window. Use VSFPROPID_ToolbarHost to access the window's IVsToolWindowToolbarHost implementation.
UIHWF_ForceSingleSelect Forces selection of a single node in a hierarchy.
UIHWF_HandlesCmdsAsActiveHierarchy This is for windows that handle commands when they are the active hierarchy even if their hierarchy doesn't have focus (like Project/Add Item).
UIHWF_InitWithHiddenParentRoot Creates a hidden root hierarchy that is the parent of your top-level nodes.
UIHWF_InitWithHiddenRootHierarchy Indicates that the IVsHierarchy pointer passed in with the call to Init is actually a special hidden root hierarchy
UIHWF_LinesAtRoot Style set on the tree view.
UIHWF_NoStateIcon Specifies whether your hierarchy window shows state icons. A treeview can have two icon channels, of which the state icon is the leftmost icon channel. For example, in the project window the state icon may show the source control in/out state of the item, while the normal icon shows the normal glyph for that type of file. If do not want your hierarchy window to show any state icons, then specify this flag in a call to Init.
UIHWF_PropagateAltHierarchyItem If specified, when UIHierarchy selects a node, UIHierarchy creates alternate hierarchies.
UIHWF_RouteCmdidDelete Controls the handling of the delete command within the hierarchy window.
UIHWF_SortChildNodes Specifies whether non-root nodes in your hierarchy window should be sorted, or left in the order in which the hierarchy enumerates them to the hierarchy window (VSHPROPID_FirstChild and VSHPROPID_NextSibling).
UIHWF_SupportToolWindowToolbars To control features pertaining to a tool window's toolbar, call GetProperty and specify a value of VSFPROPID_ToolbarHost. This allows you to access the tool window's IVsToolWindowToolbarHost implementation and add a toolbar. This approach is only valid if the Init method is called and a value of UIHWF_SupportToolWindowToolbars is specified for the grfUIHWF parameter.
UIHWF_UseSolutionAsHiddenRootHierarchy Indicates that the IVsHierarchy pointer passed in with the call to Init is actually a special hidden root hierarchy.

Remarks

Using the UIHWF_ActAsProjectTypeWin value with the Init causes the UI hierarchy window to operate as a project-type tool window. In this case, the UI hierarchy window tracks the global selection context. The selection is always shown when the global selection context matches a contained item, regardless of whether the window has focus. If you do not pass in this flag, then the UI hierarchy window acts as a generic tool window, and thus does not track the global selection context, nor paint itself with a selection until it has focus.

Setting the UIHWF_DoNotSortRootNodes flag turns off that behavior and causes the nodes to be displayed in the order they were added. When sorting is on the default, the environment first checks to see if the hierarchies support VSHPROPID_SortPriority, and sorts using the values returned from that property before reverting to sorting alphabetically by the Caption property.

UIHWF_ForceSingleSelect forces selection of a single node in a hierarchy. For example, a UI hierarchy window with multiple top-level nodes can use this flag to disallow multiple selection. By default, all UI hierarchy windows support multiple selection.

A UI hierarchy window with multiple top-level nodes and that wants to support multiple selection uses UIHWF_UseSolutionAsHiddenRootHierarchy to indicate that the SID_SVsSolutionObject hierarchy should be used as the special hidden root hierarchy. This hierarchy is the same object that handles multiple selections for Solution Explorer. In this case, the hierarchy passed in with the call to Init is shown in the UI hierarchy window.

UIHWF_InitWithHiddenParentRoot is an alternative to specifying UIHWF_InitWithHiddenRootHierarchy. If you want your hidden root hierarchy to actually be the parent of your top-level nodes (which in this case would not necessarily be separate hierarchies), specify this flag. If you use this flag, set the VSITEMID_ROOT of this hierarchy to VSHPROPID_ExpandByDefault, so that the hierarchy window automatically expands to show your top-level nodes.

Note

Calling AddUIHierarchy on a UI Hierarchy window with this flag is not allowed because all top-level nodes must be children of the hidden parent root.

A UIHierarchy window that uses multiple top-level nodes and that wants to support multiple selections uses UIHWF_InitWithHiddenParentRoot to indicate that the IVsHierarchy pointer passed in with the call to Init is actually a special hidden root hierarchy. This hierarchy is not shown in the UI hierarchy window, but is used when the selection is a cross-root hierarchy selection. Any hierarchies that you want to show should be added using AddUIHierarchy.

UIHWF_LinesAtRoot is the style set on the tree view. This member is equivalent to TVS_LINESATROOT. It provides the plus (+) sign at the root node.

When the UIHWF_PropagateAltHierarchyItem value is specified, then when the UIHierarchy selects a node, it calls GetProperty twice, once with a value of VSHPROPID_AltHierarchy in the propid parameter and once with a value of VSHPROPID_AltItemid. On this call, the hierarchy can then provide an alternate hierarchy and an alternate hierarchy ItemID to the selection context. This allows the hierarchy to specify which hierarchy ItemID is being pushed into the selection context when selections are made in the UIHierarchy window. This is the scenario used by the Macro Explorer.

The UIHWF_RouteCmdidDelete flag is used in the Init method to tell the hierarchy window that the hierarchies contained in it will handle their own cmdidDelete commands, rather than implementing IVsHierarchyDeleteHandler. As a result, the hierarchy window handles the deletion in the environment-imposed consistent manner.

See Also

Reference

Microsoft.VisualStudio.Shell.Interop Namespace