VsTextViewClass Class
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.
Inheritance Hierarchy
System.Object
Microsoft.VisualStudio.TextManager.Interop.VsTextViewClass
Namespace: Microsoft.VisualStudio.TextManager.Interop
Assembly: Microsoft.VisualStudio.TextManager.Interop (in Microsoft.VisualStudio.TextManager.Interop.dll)
Syntax
'Déclaration
<ClassInterfaceAttribute()> _
<GuidAttribute("F5E7E71E-1401-11D1-883B-0000F87579D2")> _
Public Class VsTextViewClass _
Implements IVsTextView, VsTextView
[ClassInterfaceAttribute()]
[GuidAttribute("F5E7E71E-1401-11D1-883B-0000F87579D2")]
public class VsTextViewClass : IVsTextView,
VsTextView
[ClassInterfaceAttribute()]
[GuidAttribute(L"F5E7E71E-1401-11D1-883B-0000F87579D2")]
public ref class VsTextViewClass : IVsTextView,
VsTextView
[<ClassInterfaceAttribute()>]
[<GuidAttribute("F5E7E71E-1401-11D1-883B-0000F87579D2")>]
type VsTextViewClass =
class
interface IVsTextView
interface VsTextView
end
public class VsTextViewClass implements IVsTextView, VsTextView
The VsTextViewClass type exposes the following members.
Constructors
Name | Description | |
---|---|---|
VsTextViewClass | Creates a new instance of the class. |
Top
Methods
Name | Description | |
---|---|---|
AddCommandFilter | Adds a command filter to the existing chain of command filters. | |
CenterColumns | Places the specified column of text in the center of the view. | |
CenterLines | Places the specified lines of text in the center of the view. | |
ClearSelection | Clears the current selection. | |
CloseView | Closes and unregisters a view with the view manager. | |
EnsureSpanVisible | Ensures that text is in view, both vertically and horizontally. | |
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetBuffer | Returns the current contents of the text buffer. | |
GetCaretPos | Returns the line and column index of the cursor position. | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetLineAndColumn | Converts a text stream position to a line and column index. | |
GetLineHeight | Returns the pixel height of a line. | |
GetNearestPosition | Converts a line and column index to a text stream position. | |
GetPointOfLineColumn | Returns the coordinates for the upper left corner of a particular line and column. | |
GetScrollInfo | Returns the core text editor's scroll bar settings for the specified scroll bar. | |
GetSelectedText | Returns a copy of the selected text. | |
GetSelection | Returns the text span corresponding to the current selection, if there is one. | |
GetSelectionDataObject | Returns a copy of the selected text in IDataObject interface format. | |
GetSelectionMode | Returns the current selection mode. | |
GetSelectionSpan | Returns the text span associated with a selection. | |
GetTextStream | Returns a specified stream of text in a string. | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
GetWindowHandle | Returns the window handle for this view. | |
GetWordExtent | Returns the current word extent. | |
HighlightMatchingBrace | Highlights the matching brace in a language construct. | |
Initialize | Creates the view and allows clients to specify one or more TextViewInitFlags options. | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
PositionCaretForEditing | Puts the caret in a position suitable for editing a function. | |
RemoveCommandFilter | Removes a command filter from the chain of command filters. | |
ReplaceTextOnLine | Replaces a line of text. | |
RestrictViewRange | Reduces the view’s range of visible/editable lines to a subset of the buffer’s lines. | |
SendExplicitFocus | Sends explicit focus to the window. | |
SetBuffer | Associates a text buffer with the view. | |
SetCaretPos | Sets the coordinates of the end point of a selection. | |
SetScrollPosition | Sets the core text editor's scroll bar settings for the specified scroll bar. | |
SetSelection | Selects specified text. | |
SetSelectionMode | Sets the selection mode. | |
SetTopLine | Sets the top line in the view to the baseline. | |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
UpdateCompletionStatus | Used for word completion control. | |
UpdateTipWindow | Updates the tip window. | |
UpdateViewFrameCaption | Forces the view to update its frame window caption, such as "[Read only]". |
Top
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.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.