VsTextViewClass VsTextViewClass VsTextViewClass Class

Definition

Manages the text view of an editor window. Contains methods to manage the text view. The view is essentially the editor window shown in the UI. See IVsTextView.

[System.Runtime.InteropServices.ClassInterface(0)]
[System.Runtime.InteropServices.ComConversionLoss]
[System.Runtime.InteropServices.Guid("F5E7E71E-1401-11D1-883B-0000F87579D2")]
[System.Runtime.InteropServices.TypeLibType(2)]
public class VsTextViewClass : Microsoft.VisualStudio.TextManager.Interop.VsTextView
type VsTextViewClass = class
    interface IVsTextView
    interface VsTextView
Public Class VsTextViewClass
Implements VsTextView
Inheritance
VsTextViewClassVsTextViewClassVsTextViewClass
Attributes
Implements

Remarks

You cannot create an instance of this class with the new keyword. Instead, you must get the ILocalRegistry object and create the object with CreateInstance. The MPF wraps this method with CreateInstance.

Constructors

VsTextViewClass() VsTextViewClass() VsTextViewClass()

Creates a new instance of the class.

Methods

AddCommandFilter(IOleCommandTarget, IOleCommandTarget) AddCommandFilter(IOleCommandTarget, IOleCommandTarget) AddCommandFilter(IOleCommandTarget, IOleCommandTarget)

Adds a command filter to the existing chain of command filters.

CenterColumns(Int32, Int32, Int32) CenterColumns(Int32, Int32, Int32) CenterColumns(Int32, Int32, Int32)

Places the specified column of text in the center of the view.

CenterLines(Int32, Int32) CenterLines(Int32, Int32) CenterLines(Int32, Int32)

Places the specified lines of text in the center of the view.

ClearSelection(Int32) ClearSelection(Int32) ClearSelection(Int32)

Clears the current selection.

CloseView() CloseView() CloseView()

Closes and unregisters a view with the view manager.

EnsureSpanVisible(TextSpan) EnsureSpanVisible(TextSpan) EnsureSpanVisible(TextSpan)

Ensures that text is in view, both vertically and horizontally.

GetBuffer(IVsTextLines) GetBuffer(IVsTextLines) GetBuffer(IVsTextLines)

Returns the current contents of the text buffer.

GetCaretPos(Int32, Int32) GetCaretPos(Int32, Int32) GetCaretPos(Int32, Int32)

Returns the line and column index of the cursor position.

GetLineAndColumn(Int32, Int32, Int32) GetLineAndColumn(Int32, Int32, Int32) GetLineAndColumn(Int32, Int32, Int32)

Converts a text stream position to a line and column index.

GetLineHeight(Int32) GetLineHeight(Int32) GetLineHeight(Int32)

Returns the pixel height of a line.

GetNearestPosition(Int32, Int32, Int32, Int32) GetNearestPosition(Int32, Int32, Int32, Int32) GetNearestPosition(Int32, Int32, Int32, Int32)

Converts a line and column index to a text stream position.

GetPointOfLineColumn(Int32, Int32, POINT[]) GetPointOfLineColumn(Int32, Int32, POINT[]) GetPointOfLineColumn(Int32, Int32, POINT[])

Returns the coordinates for the upper left corner of a particular line and column.

GetScrollInfo(Int32, Int32, Int32, Int32, Int32) GetScrollInfo(Int32, Int32, Int32, Int32, Int32) GetScrollInfo(Int32, Int32, Int32, Int32, Int32)

Returns the core text editor's scroll bar settings for the specified scroll bar.

GetSelectedText(String) GetSelectedText(String) GetSelectedText(String)

Returns a copy of the selected text.

GetSelection(Int32, Int32, Int32, Int32) GetSelection(Int32, Int32, Int32, Int32) GetSelection(Int32, Int32, Int32, Int32)

Returns the text span corresponding to the current selection, if there is one.

GetSelectionDataObject(IDataObject) GetSelectionDataObject(IDataObject) GetSelectionDataObject(IDataObject)

Returns a copy of the selected text in IDataObject interface format.

GetSelectionMode() GetSelectionMode() GetSelectionMode()

Returns the current selection mode.

GetSelectionSpan(TextSpan[]) GetSelectionSpan(TextSpan[]) GetSelectionSpan(TextSpan[])

Returns the text span associated with a selection.

GetTextStream(Int32, Int32, Int32, Int32, String) GetTextStream(Int32, Int32, Int32, Int32, String) GetTextStream(Int32, Int32, Int32, Int32, String)

Returns a specified stream of text in a string.

GetWindowHandle() GetWindowHandle() GetWindowHandle()

Returns the window handle for this view.

GetWordExtent(Int32, Int32, UInt32, TextSpan[]) GetWordExtent(Int32, Int32, UInt32, TextSpan[]) GetWordExtent(Int32, Int32, UInt32, TextSpan[])

Returns the current word extent.

HighlightMatchingBrace(UInt32, UInt32, TextSpan[]) HighlightMatchingBrace(UInt32, UInt32, TextSpan[]) HighlightMatchingBrace(UInt32, UInt32, TextSpan[])

Highlights the matching brace in a language construct.

Initialize(IVsTextLines, IntPtr, UInt32, INITVIEW[]) Initialize(IVsTextLines, IntPtr, UInt32, INITVIEW[]) Initialize(IVsTextLines, IntPtr, UInt32, INITVIEW[])

Creates the view and allows clients to specify one or more TextViewInitFlags options.

PositionCaretForEditing(Int32, Int32) PositionCaretForEditing(Int32, Int32) PositionCaretForEditing(Int32, Int32)

Puts the caret in a position suitable for editing a function.

RemoveCommandFilter(IOleCommandTarget) RemoveCommandFilter(IOleCommandTarget) RemoveCommandFilter(IOleCommandTarget)

Removes a command filter from the chain of command filters.

ReplaceTextOnLine(Int32, Int32, Int32, String, Int32) ReplaceTextOnLine(Int32, Int32, Int32, String, Int32) ReplaceTextOnLine(Int32, Int32, Int32, String, Int32)

Replaces a line of text.

RestrictViewRange(Int32, Int32, IVsViewRangeClient) RestrictViewRange(Int32, Int32, IVsViewRangeClient) RestrictViewRange(Int32, Int32, IVsViewRangeClient)

Reduces the view’s range of visible/editable lines to a subset of the buffer’s lines.

SendExplicitFocus() SendExplicitFocus() SendExplicitFocus()

Sends explicit focus to the window.

SetBuffer(IVsTextLines) SetBuffer(IVsTextLines) SetBuffer(IVsTextLines)

Associates a text buffer with the view.

SetCaretPos(Int32, Int32) SetCaretPos(Int32, Int32) SetCaretPos(Int32, Int32)

Sets the coordinates of the end point of a selection.

SetScrollPosition(Int32, Int32) SetScrollPosition(Int32, Int32) SetScrollPosition(Int32, Int32)

Sets the core text editor's scroll bar settings for the specified scroll bar.

SetSelection(Int32, Int32, Int32, Int32) SetSelection(Int32, Int32, Int32, Int32) SetSelection(Int32, Int32, Int32, Int32)

Selects specified text.

SetSelectionMode(TextSelMode) SetSelectionMode(TextSelMode) SetSelectionMode(TextSelMode)

Sets the selection mode.

SetTopLine(Int32) SetTopLine(Int32) SetTopLine(Int32)

Sets the top line in the view to the baseline.

UpdateCompletionStatus(IVsCompletionSet, UInt32) UpdateCompletionStatus(IVsCompletionSet, UInt32) UpdateCompletionStatus(IVsCompletionSet, UInt32)

Used for word completion control.

UpdateTipWindow(IVsTipWindow, UInt32) UpdateTipWindow(IVsTipWindow, UInt32) UpdateTipWindow(IVsTipWindow, UInt32)

Updates the tip window.

UpdateViewFrameCaption() UpdateViewFrameCaption() UpdateViewFrameCaption()

Forces the view to update its frame window caption, such as "[Read only]".

Extension Methods

FindAncestor<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>) FindAncestor<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>) FindAncestor<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>)
FindAncestor<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>) FindAncestor<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>) FindAncestor<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>)

Microsoft internal use only.

FindAncestorOrSelf<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>) FindAncestorOrSelf<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>) FindAncestorOrSelf<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>)
FindAncestorOrSelf<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>) FindAncestorOrSelf<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>) FindAncestorOrSelf<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>)
IsAncestorOf<TElementType>(TElementType, TElementType, Func<TElementType,TElementType>) IsAncestorOf<TElementType>(TElementType, TElementType, Func<TElementType,TElementType>) IsAncestorOf<TElementType>(TElementType, TElementType, Func<TElementType,TElementType>)

Microsoft internal use only.

Applies to