VSTextBuffer Object

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at VSTextBuffer Object.

The text buffer object represents a stream of Unicode text, which is generally associated with a file. A VsTextBuffer object can be used outside the context of the core editor, as in the case of a wizard.

The following table shows the interfaces of VSTextBuffer.

MethodDescription
IOleCommandTargetStandard OLE interface. Mainly used for undo/redo handling in the buffer.
IPersistFileStandard OLE interface.
IPersistStreamStandard OLE interface.
IVsCompoundActionEnables the creation of compounds actions (that is, actions that are grouped in a single undo/redo unit).
IVsPersistDocDataEnables persistence of document data managed by the text buffer.
IVsTextBufferProvides basic services; used by many clients.
IVsTextFindUsed to search a buffer.
IVsTextLinesProvides read and write capabilities using two-dimensional coordinates. Inherits from IVsTextBuffer.
IVsTextStreamProvides read and write capabilities using one-dimensional coordinates. Inherits from IVsTextBuffer.
IVsTextScannerProvides fast, stream-oriented, sequential access to text in the buffer.
IVsUserDataProvides access to a generic collection of properties. The most important property is the name, or moniker, of the buffer. You can store your own random data in the buffer with this interface by creating a GUID and using it as a key.
IConnectionPointContainerSupports connection points for events.

The VSTextBuffer is usually found by a QueryInterface call on IVsTextBuffer. For more information, see Text Buffer.

IVsTextBuffer
VsTextView
Figures Edit

Show: