nsIAccessibleEditableText
From MDC
The nsIAccessibleEditableText interface is an interface for editing text attributes of an object. The operations it supports includes setting text attributes, and text contents while also replacing old text of an object with new text. It also includes and support basic operations such as, inserting text, copying text, cutting text, pasting text and deleting text at the specified position.
Contents |
nsIAccessibleEditableText is defined in accessible/public/nsIAccessibleEditableText.idl. It is scriptable and
is currently under review.
Inherits from: nsISupports
[edit] Method overview
void setAttributes(in long startPos, in long endPos, in nsISupports attributes);
|
void setTextContents(in AString text);
|
void insertText(in AString text, in long position);
|
void copyText(in long startPos, in long endPos);
|
void cutText(in long startPos, in long endPos);
|
void deleteText(in long startPos, in long endPos);
|
void pasteText(in long position);
|
[edit] Attributes
| Attribute | Type | Description |
associatedEditor
| nsIEditor
| Returns an editor associated with the accessible. |
[edit] Methods
[edit] setAttributes()
This method sets the attributes for the text between the two given indices. The old attributes are replaced by the new list of attributes. For example, sets font styles, such as italic, bold, etc.
void setAttributes( in long startPos, in long endPos, in nsISupports attributes );
[edit] Parameters
- startPos
- Start index of the text whose attributes are modified.
- endPos
- End index of the text whose attributes are modified.
- attributes
- Set of attributes that replaces the old list of attributes of the specified text portion.
[edit] setTextContents()
This method replaces the text represented by this object by the given text.
void setTextContents( in AString text );
[edit] Parameters
- text
The text that needs to replace the old text.
[edit] insertText()
This method inserts text at the specified position.
void insertText( in AString text, in long position );
[edit] Parameters
- text
- Text that is inserted.
- position
- Index at which to insert the text.
[edit] copyText()
This method copies the text range into the clipboard.
void copyText( in long startPos, in long endPos );
[edit] Parameters
- startPos
- Start index of the text to moved into the clipboard.
- endPos
- End index of the text to moved into the clipboard.
[edit] cutText()
This method deletes a range of text and copies it to the clipboard.
void cutText( in long startPos, in long endPos );
[edit] Parameters
- startPos
- Start index of the text to be deleted and copied to clipboard.
- endPos
- End index of the text to be deleted and copied to clipboard.
[edit] deleteText()
This method deletes a range of text.
void deleteText( in long startPos, in long endPos );
[edit] Parameters
- startPos
- Start index of the text to be deleted.
- endPos
- End index of the text to be deleted.
[edit] pasteText()
This method pastes text from the clipboard.
void pasteText( in long position );
[edit] Parameters
- position
- Index at which to insert the text from the system clipboard into the text represented by this object.