ITextProvider 接口

定义

公开方法和属性以支持 UI 自动化客户端对包含文本的控件的访问。Exposes methods and properties to support UI Automation client access to controls that contain text.

public interface class ITextProvider
[System.Runtime.InteropServices.ComVisible(true)]
[System.Runtime.InteropServices.Guid("3589c92c-63f3-4367-99bb-ada653b77cf2")]
[System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)]
public interface ITextProvider
type ITextProvider = interface
Public Interface ITextProvider
属性

注解

在必须支持TextPattern控件模式的 UI 自动化提供程序上实现。Implemented on a UI Automation provider that must support the TextPattern control pattern.

属性

DocumentRange

获取包含文档主文本的文本范围。Gets a text range that encloses the main text of a document.

SupportedTextSelection

获取一个指定文本提供程序是否支持文本选择的值,并在支持文本选择的情况下获取所支持的选择的类型。Gets a value that specifies whether a text provider supports selection and, if so, the type of selection supported.

方法

GetSelection()

检索与当前文本选择(或多个文本选择)关联的不连续文本范围的集合。Retrieves a collection of disjoint text ranges associated with the current text selection or selections.

GetVisibleRanges()

从文本容器中检索一个不连续文本范围的数组,其中每个文本范围都以第一个部分可见的行开始,以最后一个部分可见的行结束。Retrieves an array of disjoint text ranges from a text container where each text range begins with the first partially visible line through to the end of the last partially visible line.

RangeFromChild(IRawElementProviderSimple)

检索包含子元素(例如图像、超链接或其他嵌入对象)的一个文本范围。Retrieves a text range enclosing a child element such as an image, hyperlink, or other embedded object.

RangeFromPoint(Point)

返回与指定屏幕坐标最接近的退化(空)文本范围。Returns the degenerate (empty) text range nearest to the specified screen coordinates.

适用于

另请参阅