webkit
2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
|
#include <AccessibleTextImpl.h>
Public Member Functions | |
AccessibleText (WebCore::AccessibilityObject *, HWND) | |
virtual | ~AccessibleText () |
virtual HRESULT STDMETHODCALLTYPE | addSelection (long startOffset, long endOffset) |
Adds a text selection. More... | |
virtual HRESULT STDMETHODCALLTYPE | get_attributes (long offset, long *startOffset, long *endOffset, BSTR *textAttributes) |
virtual HRESULT STDMETHODCALLTYPE | get_caretOffset (long *offset) |
virtual HRESULT STDMETHODCALLTYPE | get_characterExtents (long offset, enum IA2CoordinateType coordType, long *x, long *y, long *width, long *height) |
virtual HRESULT STDMETHODCALLTYPE | get_nSelections (long *nSelections) |
virtual HRESULT STDMETHODCALLTYPE | get_offsetAtPoint (long x, long y, enum IA2CoordinateType coordType, long *offset) |
virtual HRESULT STDMETHODCALLTYPE | get_selection (long selectionIndex, long *startOffset, long *endOffset) |
virtual HRESULT STDMETHODCALLTYPE | get_text (long startOffset, long endOffset, BSTR *text) |
virtual HRESULT STDMETHODCALLTYPE | get_textBeforeOffset (long offset, enum IA2TextBoundaryType boundaryType, long *startOffset, long *endOffset, BSTR *text) |
virtual HRESULT STDMETHODCALLTYPE | get_textAfterOffset (long offset, enum IA2TextBoundaryType boundaryType, long *startOffset, long *endOffset, BSTR *text) |
virtual HRESULT STDMETHODCALLTYPE | get_textAtOffset (long offset, enum IA2TextBoundaryType boundaryType, long *startOffset, long *endOffset, BSTR *text) |
virtual HRESULT STDMETHODCALLTYPE | removeSelection (long selectionIndex) |
Unselects a range of text. More... | |
virtual HRESULT STDMETHODCALLTYPE | setCaretOffset (long offset) |
Sets the position of the caret. More... | |
virtual HRESULT STDMETHODCALLTYPE | setSelection (long selectionIndex, long startOffset, long endOffset) |
Changes the bounds of an existing selection. More... | |
virtual HRESULT STDMETHODCALLTYPE | get_nCharacters (long *characters) |
virtual HRESULT STDMETHODCALLTYPE | scrollSubstringTo (long startIndex, long endIndex, enum IA2ScrollType scrollType) |
Makes a specific part of string visible on screen. More... | |
virtual HRESULT STDMETHODCALLTYPE | scrollSubstringToPoint (long startIndex, long endIndex, enum IA2CoordinateType coordinateType, long x, long y) |
Moves the top left of a substring to a specified location. More... | |
virtual HRESULT STDMETHODCALLTYPE | get_newText (IA2TextSegment *newText) |
virtual HRESULT STDMETHODCALLTYPE | get_oldText (IA2TextSegment *oldText) |
virtual HRESULT STDMETHODCALLTYPE | get_attributeRange (long offset, BSTR filter, long *startOffset, long *endOffset, BSTR *attributeValues) |
virtual HRESULT STDMETHODCALLTYPE | copyText (long startOffset, long endOffset) |
Copies the text range into the clipboard. More... | |
virtual HRESULT STDMETHODCALLTYPE | deleteText (long startOffset, long endOffset) |
Deletes a range of text. More... | |
virtual HRESULT STDMETHODCALLTYPE | insertText (long offset, BSTR *text) |
Inserts text at the specified position. More... | |
virtual HRESULT STDMETHODCALLTYPE | cutText (long startOffset, long endOffset) |
Deletes a range of text and copies it to the clipboard. More... | |
virtual HRESULT STDMETHODCALLTYPE | pasteText (long offset) |
Pastes content from the clipboard. More... | |
virtual HRESULT STDMETHODCALLTYPE | replaceText (long startOffset, long endOffset, BSTR *text) |
Replaces text. More... | |
virtual HRESULT STDMETHODCALLTYPE | setAttributes (long startOffset, long endOffset, BSTR *attributes) |
Replaces the attributes of a text range by the given set of attributes. More... | |
virtual HRESULT STDMETHODCALLTYPE | QueryInterface (_In_ REFIID riid, _COM_Outptr_ void **ppvObject) |
virtual ULONG STDMETHODCALLTYPE | AddRef () |
virtual ULONG STDMETHODCALLTYPE | Release () |
virtual HRESULT STDMETHODCALLTYPE | get_attributes (BSTR *attributes) |
Additional Inherited Members | |
Properties inherited from IAccessibleText2 | |
BSTR | attributeRange ([in] long offset, [in] BSTR filter, [out] long startOffset, [out] long endOffset) [get] |
Returns the range and of the specified set of attributes. More... | |
Properties inherited from IAccessibleText | |
BSTR | attributes ([in] long offset, [out] long startOffset, [out] long endOffset) [get] |
Returns text attributes. More... | |
long | caretOffset [get] |
Returns the position of the caret. More... | |
long | characterExtents ([in] long offset, [in] IA2CoordinateType coordType, [out] long x, [out] long y, [out] long width) [get] |
Returns the bounding box of the specified position. More... | |
long | nSelections [get] |
Returns the number of active non-contiguous selections. More... | |
long | offsetAtPoint ([in] long x, [in] long y, [in] IA2CoordinateType coordType) [get] |
Returns the text position for the specified screen position. More... | |
long | selection ([in] long selectionIndex, [out] long startOffset) [get] |
Returns the character offsets of Nth active text selection. More... | |
BSTR | text ([in] long startOffset, [in] long endOffset) [get] |
Returns the substring between the two given indices. More... | |
BSTR | textBeforeOffset ([in] long offset, [in] IA2TextBoundaryType boundaryType, [out] long startOffset, [out] long endOffset) [get] |
Returns a text portion before the given position. More... | |
BSTR | textAfterOffset ([in] long offset, [in] IA2TextBoundaryType boundaryType, [out] long startOffset, [out] long endOffset) [get] |
Returns a text portion after the given position. More... | |
BSTR | textAtOffset ([in] long offset, [in] IA2TextBoundaryType boundaryType, [out] long startOffset, [out] long endOffset) [get] |
Returns a text portion that spans the given position. More... | |
long | nCharacters [get] |
Returns total number of characters. More... | |
IA2TextSegment | newText [get] |
Returns any inserted text. More... | |
IA2TextSegment | oldText [get] |
Returns any removed text. More... | |
AccessibleText::AccessibleText | ( | WebCore::AccessibilityObject * | obj, |
HWND | window | ||
) |
|
inlinevirtual |
|
inlinevirtual |
|
virtual |
Adds a text selection.
[in] | startOffset | Starting offset ( 0 based). |
[in] | endOffset | Offset of first character after new selection (0 based). |
S_OK | |
E_INVALIDARG | if bad [in] passed |
Implements IAccessibleText.
|
virtual |
Copies the text range into the clipboard.
The selection is set to the specified offsets and then selection is copied into the system clipboard.
[in] | startOffset | Start index of the text to moved into the clipboard. The valid range is 0..length. |
[in] | endOffset | End index of the text to moved into the clipboard. The valid range is 0..length. |
S_OK | |
E_INVALIDARG | if bad [in] passed |
Implements IAccessibleEditableText.
|
virtual |
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.
[in] | startOffset | Start index of the text to be deleted. The valid range is 0..length. |
[in] | endOffset | End index of the text to be deleted. The valid range is 0..length. |
S_OK | |
E_INVALIDARG | if bad [in] passed |
Implements IAccessibleEditableText.
|
virtual |
Deletes a range of text.
The text between and including the two given indices is deleted from the text represented by this object.
[in] | startOffset | Start index of the text to be deleted. The valid range is 0..length. |
[in] | endOffset | End index of the text to be deleted. The valid range is 0..length. |
S_OK | |
E_INVALIDARG | if bad [in] passed |
Implements IAccessibleEditableText.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Inserts text at the specified position.
The specified string is inserted at the given index into the text represented by this object.
[in] | offset | Index 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] | text | Text that is inserted. |
S_OK | |
E_INVALIDARG | if bad [in] passed |
Implements IAccessibleEditableText.
|
virtual |
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.
[in] | offset | Index 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. |
S_OK | |
E_INVALIDARG | if bad [in] passed |
Implements IAccessibleEditableText.
|
virtual |
Unselects a range of text.
[in] | selectionIndex | Index of selection to remove (0 based). |
S_OK | |
E_INVALIDARG | if bad [in] passed |
Implements IAccessibleText.
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.
[in] | startOffset | Start index of the text to be replaced. The valid range is 0..length. |
[in] | endOffset | End index of the text to be replaced. The valid range is 0..length. |
[in] | text | The Text that replaces the text between the given indices. |
S_OK | |
E_INVALIDARG | if bad [in] passed |
Implements IAccessibleEditableText.
|
virtual |
Makes a specific part of string visible on screen.
[in] | startIndex | 0 based character offset. |
[in] | endIndex | 0 based character offset - the offset of the character just past the last character of the string. |
[in] | scrollType | Defines where the object should be placed on the screen. |
S_OK | |
E_INVALIDARG | if bad [in] passed |
Implements IAccessibleText.
|
virtual |
Moves the top left of a substring to a specified location.
[in] | startIndex | 0 based character offset. |
[in] | endIndex | 0 based character offset - the offset of the character just past the last character of the string. |
[in] | coordinateType | Specifies whether the coordinates are relative to the screen or the parent object. |
[in] | x | Defines the x coordinate. |
[in] | y | Defines the y coordinate. |
S_OK | |
S_FALSE | if the object is already at the specified location. |
E_INVALIDARG | if bad [in] passed |
Implements IAccessibleText.
|
virtual |
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.
[in] | startOffset | Start index of the text whose attributes are modified. The valid range is 0..length. |
[in] | endOffset | End index of the text whose attributes are modified. The valid range is 0..length. |
[in] | attributes | Set of attributes that replaces the old list of attributes of the specified text portion. |
S_OK | |
E_INVALIDARG | if bad [in] passed |
Implements IAccessibleEditableText.
|
virtual |
Sets the position of the caret.
The caret position/offset is that of the character logically following it, e.g. to the right of it in a left to right language.
Setting the caret position may or may not alter the current selection. A change of the selection is notified to the accessibility event listeners with an ::IA2_EVENT_TEXT_SELECTION_CHANGED event.
When the new caret position differs from the old one (which, of course, is the standard case) this is notified to the accessibility event listeners with an ::IA2_EVENT_TEXT_CARET_MOVED event.
[in] | offset | The new index of the caret. This caret is actually placed to the left side of the character with that index. An index of 0 places the caret so that the next insertion goes before the first character. An index of IAccessibleText::nCharacters leads to insertion after the last character. Refer to Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods for information about special offsets that can be used in IAccessibleText methods. |
S_OK | |
E_FAIL | if the caret cannot be set |
E_INVALIDARG | if bad [in] passed |
Implements IAccessibleText.
|
virtual |
Changes the bounds of an existing selection.
[in] | selectionIndex | Index of selection to change (0 based) |
[in] | startOffset | New starting offset (0 based) |
[in] | endOffset | New ending offset (0 based) - the offset of the character just past the last character of the selection. |
S_OK | |
E_INVALIDARG | if bad [in] passed |
Implements IAccessibleText.