ITextBuffer Interface
TOC
Collapse the table of content
Expand the table of content

ITextBuffer Interface

 

A mutable sequence of Unicode (UTF-16) characters.

Namespace:   Microsoft.VisualStudio.Text
Assembly:  Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)

public interface ITextBuffer : IPropertyOwner

NameDescription
System_CAPS_pubpropertyContentType

Gets the content type of the text in the buffer.

System_CAPS_pubpropertyCurrentSnapshot

Gets the current content of the buffer.

System_CAPS_pubpropertyEditInProgress

Determines whether an edit operation is currently in progress on the ITextBuffer.

System_CAPS_pubpropertyProperties

(Inherited from IPropertyOwner.)

NameDescription
System_CAPS_pubmethodChangeContentType(IContentType, Object)

Changes the IContentType for this ITextBuffer.

System_CAPS_pubmethodCheckEditAccess()

Determines whether edit operations on this text buffer are permitted on the calling thread.

System_CAPS_pubmethodCreateEdit()

Creates an ITextEdit object that handles compound edit operations on this buffer.

System_CAPS_pubmethodCreateEdit(EditOptions, Nullable<Int32>, Object)

Creates an ITextEdit object that handles compound edit operations on this buffer.

System_CAPS_pubmethodCreateReadOnlyRegionEdit()

Creates an IReadOnlyRegionEdit object that handles adding or removing read-only regions from this buffer.

System_CAPS_pubmethodDelete(Span)

Deletes a sequence of characters from the buffer.

System_CAPS_pubmethodGetReadOnlyExtents(Span)

Gets a list of read-only regions that overlap the given span.

System_CAPS_pubmethodInsert(Int32, String)

Inserts the given text at the specified position in the ITextBuffer.

System_CAPS_pubmethodIsReadOnly(Int32)

Determines whether a text insertion would be prohibited at the specified position due to an IReadOnlyRegion.

System_CAPS_pubmethodIsReadOnly(Int32, Boolean)

Determines whether a text insertion would be prohibited at the specified position due to an IReadOnlyRegion.

System_CAPS_pubmethodIsReadOnly(Span)

Determines whether a text modification or deletion would be prohibited at span due to an IReadOnlyRegion.

System_CAPS_pubmethodIsReadOnly(Span, Boolean)

Determines whether a text modification or deletion would be prohibited at span due to an IReadOnlyRegion.

System_CAPS_pubmethodReplace(Span, String)

Replaces a sequence of characters with different text. This is equivalent to first deleting the text to be replaced and then inserting the new text.

System_CAPS_pubmethodTakeThreadOwnership()

Claims ownership of this buffer for the current thread. All subsequent modifications of this ITextBuffer must be made from the current thread, or else an InvalidOperationException will be raised.

NameDescription
System_CAPS_pubeventChanged

Occurs when a non-empty ITextEdit is successfully applied.

System_CAPS_pubeventChangedHighPriority

Occurs when a non-empty ITextEdit is successfully applied.

System_CAPS_pubeventChangedLowPriority

Occurs when a non-empty ITextEdit is successfully applied.

System_CAPS_pubeventChanging

Occurs just before a non-empty ITextEdit is applied.

System_CAPS_pubeventContentTypeChanged

Occurs whenever the IContentType has been changed.

System_CAPS_pubeventPostChanged

Occurs after the Changed event and any resulting edits.

System_CAPS_pubeventReadOnlyRegionsChanged

Occurs when a IReadOnlyRegionEdit has created or removed read-only regions.

For more information about text buffers, see the section "A Closer Look at the Text Model and the Text View" in Inside the Editor.

Positions in this buffer are treated as a sequence of characters (starting at character zero), or as a sequence of lines (starting at line zero). An empty buffer has a single line containing no characters.

Return to top
Show:
© 2016 Microsoft