IAccessible2 API  Version 1.3
Public Member Functions | List of all members
IAccessibleHypertext Interface Reference

This interface exposes information about hypertext in a document. More...

import "AccessibleHypertext.idl";

Inheritance diagram for IAccessibleHypertext:
IAccessibleText IAccessibleHypertext2

Public Member Functions

HRESULT nHyperlinks ([out, retval] long *hyperlinkCount)
 Returns the number of links and link groups contained within this hypertext paragraph. More...
 
HRESULT hyperlink ([in] long index,[out, retval] IAccessibleHyperlink **hyperlink)
 Returns the specified link. More...
 
HRESULT hyperlinkIndex ([in] long charIndex,[out, retval] long *hyperlinkIndex)
 Returns the index of the hyperlink that is associated with this character index. More...
 
- Public Member Functions inherited from IAccessibleText
HRESULT addSelection ([in] long startOffset,[in] long endOffset)
 Adds a text selection. More...
 
HRESULT attributes ([in] long offset,[out] long *startOffset,[out] long *endOffset,[out, retval] BSTR *textAttributes)
 Returns text attributes. More...
 
HRESULT caretOffset ([out, retval] long *offset)
 Returns the position of the caret. More...
 
HRESULT characterExtents ([in] long offset,[in] enum IA2CoordinateType coordType,[out] long *x,[out] long *y,[out] long *width,[out, retval] long *height)
 Returns the bounding box of the specified position. More...
 
HRESULT nSelections ([out, retval] long *nSelections)
 Returns the number of active non-contiguous selections. More...
 
HRESULT offsetAtPoint ([in] long x,[in] long y,[in] enum IA2CoordinateType coordType,[out, retval] long *offset)
 Returns the text position for the specified screen position. More...
 
HRESULT selection ([in] long selectionIndex,[out] long *startOffset,[out, retval] long *endOffset)
 Returns the character offsets of Nth active text selection. More...
 
HRESULT text ([in] long startOffset,[in] long endOffset,[out, retval] BSTR *text)
 Returns the substring between the two given indices. More...
 
HRESULT textBeforeOffset ([in] long offset,[in] enum IA2TextBoundaryType boundaryType,[out] long *startOffset,[out] long *endOffset,[out, retval] BSTR *text)
 Returns a text portion before the given position. More...
 
HRESULT textAfterOffset ([in] long offset,[in] enum IA2TextBoundaryType boundaryType,[out] long *startOffset,[out] long *endOffset,[out, retval] BSTR *text)
 Returns a text portion after the given position. More...
 
HRESULT textAtOffset ([in] long offset,[in] enum IA2TextBoundaryType boundaryType,[out] long *startOffset,[out] long *endOffset,[out, retval] BSTR *text)
 Returns a text portion that spans the given position. More...
 
HRESULT removeSelection ([in] long selectionIndex)
 Unselects a range of text. More...
 
HRESULT setCaretOffset ([in] long offset)
 Sets the position of the caret. More...
 
HRESULT setSelection ([in] long selectionIndex,[in] long startOffset,[in] long endOffset)
 Changes the bounds of an existing selection. More...
 
HRESULT nCharacters ([out, retval] long *nCharacters)
 Returns total number of characters. More...
 
HRESULT scrollSubstringTo ([in] long startIndex,[in] long endIndex,[in] enum IA2ScrollType scrollType)
 Makes a specific part of string visible on screen. More...
 
HRESULT scrollSubstringToPoint ([in] long startIndex,[in] long endIndex,[in] enum IA2CoordinateType coordinateType,[in] long x,[in] long y)
 Moves the top left of a substring to a specified location. More...
 
HRESULT newText ([out, retval] IA2TextSegment *newText)
 Returns any inserted text. More...
 
HRESULT oldText ([out, retval] IA2TextSegment *oldText)
 Returns any removed text. More...
 

Detailed Description

This interface exposes information about hypertext in a document.

The IAccessibleHypertext interface is the main interface to expose hyperlinks in a document, typically a text document, that are used to reference other documents. A typical implementation is to implement this interface on the smallest text object such as a paragraph of text.

Member Function Documentation

HRESULT IAccessibleHypertext::hyperlink ( [in] long  index,
[out, retval] IAccessibleHyperlink **  hyperlink 
)
get

Returns the specified link.

The returned IAccessibleHyperlink object encapsulates the hyperlink and provides several kinds of information describing it.

Parameters
[in]indexThis 0 based index specifies the hyperlink to return.
[out]hyperlinkIf the given index is valid, i.e. lies in the interval from 0 to the number of links minus one, a reference to the specified hyperlink object is returned. If the index is invalid then a NULL pointer is returned.
Return values
S_OK
E_INVALIDARGif bad [in] passed
HRESULT IAccessibleHypertext::hyperlinkIndex ( [in] long  charIndex,
[out, retval] long *  hyperlinkIndex 
)
get

Returns the index of the hyperlink that is associated with this character index.

This is the case when a link spans the given character index.

Parameters
[in]charIndexA 0 based index of the character for which to return the link index. If IAccessibleText is used to represent the text containing the link, then the character index is only valid if it is greater than or equal to zero and lower than the number of characters in the text.
[out]hyperlinkIndexReturns the 0 based index of the hyperlink that is associated with this character index, or -1 if charIndex is not on a link.
Return values
S_OK
S_FALSEif there is nothing to return, [out] value is -1
E_INVALIDARGif bad [in] passed
HRESULT IAccessibleHypertext::nHyperlinks ( [out, retval] long *  hyperlinkCount)
get

Returns the number of links and link groups contained within this hypertext paragraph.

Parameters
[out]hyperlinkCountThe number of links and link groups within this hypertext paragraph. Returns 0 if there is no link.
Return values
S_OK

The documentation for this interface was generated from the following file:
Generated on Wed Jul 10 2013 09:47:25 for IAccessible2 API Version 1.3 by  doxygen 1.8.3.1