Udostępnij za pośrednictwem


VSTREETEXTOPTIONS Enumeration

Specifies the type of text being requested.

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

Syntax

'Declaration
Public Enumeration VSTREETEXTOPTIONS
public enum VSTREETEXTOPTIONS
public enum class VSTREETEXTOPTIONS
type VSTREETEXTOPTIONS
public enum VSTREETEXTOPTIONS

Members

Member name Description
TTO_DEFAULT Default base text. This is used as the display name for the item.
TTO_DISPLAYTEXT Alternate name for TTO_DEFAULT.
TTO_PREFIX Fully qualified parent class name for the item. Return an empty string if this item is not part of any class.
TTO_PREFIX2 Fully qualified namespace name for the item. Return an empty string if this item is not part of any namespace.
TTO_EXTENDED DO NOT IMPLEMENT. Extended text (prefix2 + prefix + default) is generated by the object manager.
TTO_SORTTEXT Unique pointer used for sorting. May be the same as TTO_DISPLAYTEXT.
TTO_SEARCHTEXT Text used for searching. Typically, the same as TTO_DISPLAYTEXT.
TTO_BASETEXT DO NOT IMPLEMENT. Used internally (shortest form of the name possible).
TTO_CUSTOM Custom text (depends on the context where used).

Remarks

These options are used with GetText to specify the type of text being requested.

TTO_SORTTEXT is used for sorting the object lists and can be different than the DEFAULT text to control the sort order. For instance, if you want Folder nodes to sort above members even when sorting alphabetically, add a "1" to the start of the sort text. Note however, the object manager requires you to keep these pointers for TTO_SORTTEXT valid and unchanged (after being asked for) until the list is released. For all other TTO_ types you can reuse the same buffer over and over again.

TTO_SEARCHTEXT is used for searching through and filtering the lists. Typically you would not provide a different search text, but rather use either the TTO_SORTTEXT or TTO_DISPLAYTEXT. If you don't want a particular item to be part of the search, return an empty string.

TTO_DEFAULT or TTO_DISPLAYTEXT is used to actually paint the name in the tree. Your implementation should also default to returning this text if asked for a text type you don't support (with the exception of TTO_PREFIX and TTO_PREFIX2).

TTO_PREFIX2 and TTO_PREFIX represent up to two possible prefixes on the name that are included with the default name to get fully qualified name (TTO_EXTENDED). In object list scenarios, TTO_PREFIX refers to the qualified classes name and TTO_PREFIX2 refers to the qualified namespaces name. If you don't have any special names here, it is acceptable to return an empty string or E_FAIL the call. However, returning the same name as TTO_DEFAULT is not acceptable.

Examples: For a class member function m_myfunction, TTO_DEFAULT, TTO_SEARCHTEXT and TTO_SORTTEXT can return "m_myfunction(int, void **)", TTO_PREFIX can return "CMyClass" and TTO_PREFIX2 can return "MyNamespace::MyNestedNamespace". For a folder node such as "Bases and Implemented Interfaces", TTO_DEFAULT can be "Bases and Implemented Interfaces", TTO_SEARCHTEXT can be an empty string, "", meaning you don't want this showing up in the search

COM Signature

From vsshell.idl:

See Also

Reference

Microsoft.VisualStudio.Shell.Interop Namespace