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

This interface provides clipboard capability to text objects. More...

import "AccessibleEditableText.idl";

Inheritance diagram for IAccessibleEditableText:

Public Member Functions

HRESULT copyText ([in] long startOffset,[in] long endOffset)
 Copies the text range into the clipboard. More...
 
HRESULT deleteText ([in] long startOffset,[in] long endOffset)
 Deletes a range of text. More...
 
HRESULT insertText ([in] long offset,[in] BSTR *text)
 Inserts text at the specified position. More...
 
HRESULT cutText ([in] long startOffset,[in] long endOffset)
 Deletes a range of text and copies it to the clipboard. More...
 
HRESULT pasteText ([in] long offset)
 Pastes content from the clipboard. More...
 
HRESULT replaceText ([in] long startOffset,[in] long endOffset,[in] BSTR *text)
 Replaces text. More...
 
HRESULT setAttributes ([in] long startOffset,[in] long endOffset,[in] BSTR *attributes)
 Replaces the attributes of a text range by the given set of attributes. More...
 

Detailed Description

This interface provides clipboard capability to text objects.

This interface is typically used in conjunction with the IAccessibleText interface and complements that interface with the additional capability of clipboard operations. Note that even a read only text object can support the copy capability so this interface is not limited to editable objects.

The substrings used with this interface are specified as follows: If startOffset is less than endOffset, the substring starts with the character at startOffset and ends with the character just before endOffset. If endOffset is lower than startOffset, the result is the same as a call with the two arguments exchanged. The whole text can be defined by passing the indices zero and IAccessibleText::nCharacters. If both indices have the same value, an empty string is defined.

Refer to the Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods for information about a special offset constant that can be used in IAccessibleEditableText methods.

Member Function Documentation

HRESULT IAccessibleEditableText::copyText ( [in] long  startOffset,
[in] long  endOffset 
)

Copies the text range into the clipboard.

The selection is set to the specified offsets and then selection is copied into the system clipboard.

Parameters
[in]startOffsetStart index of the text to moved into the clipboard. The valid range is 0..length.
[in]endOffsetEnd index of the text to moved into the clipboard. The valid range is 0..length.
Return values
S_OK
E_INVALIDARGif bad [in] passed
Note
Refer to Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods for information about special offsets that can be used in IAccessibleEditableText methods.
Deprecated:
This function is available via the application's GUI.
HRESULT IAccessibleEditableText::cutText ( [in] long  startOffset,
[in] long  endOffset 
)

Deletes a range of text and copies it to the clipboard.

The selection is set to the specified offsets, the selection is then copied into the system clipboard, and then the selection is deleted.

Parameters
[in]startOffsetStart index of the text to be deleted. The valid range is 0..length.
[in]endOffsetEnd index of the text to be deleted. The valid range is 0..length.
Return values
S_OK
E_INVALIDARGif bad [in] passed
Note
Refer to Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods for information about special offsets that can be used in IAccessibleEditableText methods.
Deprecated:
This function is available via the application's GUI.
HRESULT IAccessibleEditableText::deleteText ( [in] long  startOffset,
[in] long  endOffset 
)

Deletes a range of text.

The text between and including the two given indices is deleted from the text represented by this object.

Parameters
[in]startOffsetStart index of the text to be deleted. The valid range is 0..length.
[in]endOffsetEnd index of the text to be deleted. The valid range is 0..length.
Return values
S_OK
E_INVALIDARGif bad [in] passed
Note
Refer to Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods for information about special offsets that can be used in IAccessibleEditableText methods.
HRESULT IAccessibleEditableText::insertText ( [in] long  offset,
[in] BSTR *  text 
)

Inserts text at the specified position.

The specified string is inserted at the given index into the text represented by this object.

Parameters
[in]offsetIndex at which to insert the text. The valid range is 0..length. Refer to Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods for information about special offsets that can be used in IAccessibleEditableText methods.
[in]textText that is inserted.
Return values
S_OK
E_INVALIDARGif bad [in] passed
HRESULT IAccessibleEditableText::pasteText ( [in] long  offset)

Pastes content from the clipboard.

Any existing selection is removed, the clipboard content is then pasted into this object's text at the given offset. This method is similar to the insertText method. If the index is not valid the system clipboard content is not inserted. The behavior is the same as when Ctrl+V is used, i.e. the pasted contents are not necessarily plain text.

Parameters
[in]offsetIndex at which to insert the content from the system clipboard into the text represented by this object. The valid range is 0..length. Refer to Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods for information about special offsets that can be used in IAccessibleEditableText methods.
Return values
S_OK
E_INVALIDARGif bad [in] passed
Deprecated:
This function is available via the application's GUI.
HRESULT IAccessibleEditableText::replaceText ( [in] long  startOffset,
[in] long  endOffset,
[in] BSTR *  text 
)

Replaces text.

The text between the two given indices is replaced by the specified replacement string. This method is equivalent to calling first IAccessibleEditableText::deleteText with the two indices and then calling IAccessibleEditableText::insertText with the replacement text at the start index.

Parameters
[in]startOffsetStart index of the text to be replaced. The valid range is 0..length.
[in]endOffsetEnd index of the text to be replaced. The valid range is 0..length.
[in]textThe Text that replaces the text between the given indices.
Return values
S_OK
E_INVALIDARGif bad [in] passed
Note
Refer to Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods for information about special offsets that can be used in IAccessibleEditableText methods.
HRESULT IAccessibleEditableText::setAttributes ( [in] long  startOffset,
[in] long  endOffset,
[in] BSTR *  attributes 
)

Replaces the attributes of a text range by the given set of attributes.

Sets the attributes for the text between the two given indices. The old attributes are replaced by the new list of attributes.

Parameters
[in]startOffsetStart index of the text whose attributes are modified. The valid range is 0..length.
[in]endOffsetEnd index of the text whose attributes are modified. The valid range is 0..length.
[in]attributesSet of attributes that replaces the old list of attributes of the specified text portion.
Return values
S_OK
E_INVALIDARGif bad [in] passed
Note
Refer to Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods for information about special offsets that can be used in IAccessibleEditableText methods.

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