# Accessibility::EditableText Interface Reference

`import "Accessibility_EditableText.idl";`

Inheritance diagram for Accessibility::EditableText:

## Public Member Functions

boolean | setTextContents (in string newContents)
boolean | insertText (in long position, in string text, in long length)
boolean | setAttributes (in string attributes, in long startPos, in long endPos)
void | copyText (in long startPos, in long endPos)
boolean | cutText (in long startPos, in long endPos)
boolean | deleteText (in long startPos, in long endPos)
boolean | pasteText (in long position)
void | unImplemented5 ()
void | unImplemented6 ()
void | unImplemented9 ()
void | unImplemented10 ()
void | unImplemented11 ()
void | unImplemented12 ()

## Detailed Description

Derived from interface Text, EditableText provides methods for modifying textual content of components which support editing. EditableText also interacts with the system clipboard via copyText, cutText, and pasteText.

Note:
  read-only instances of EditableText are possible; These may be instances of a general-purpose component type which are sometimes, but not always, user-editable, or may be components which are temporarily or circumstantially in a non-editable state.

## Member Function Documentation

boolean Accessibility::EditableText::setTextContents | ( | in string | newContents | ) |

Replace the text contents with a new string, discarding the old contents.

Parameters:

  | newContents | a UTF-8 string with which the text object's contents will be replaced.

Returns:
  `True` if the text content was successfully changed, `False` otherwise.

boolean Accessibility::EditableText::insertText | ( | in long | position,
|  | in string | text,
|  | in long | length |
| ) |  |  |

Insert new text contents into an existing text object at a given location, while retaining the old contents.

Parameters:

  | position | the character offset into the Text implementor's content at which the new content will be inserted.
  | text | a UTF-8 string of which `length` characters will be inserted into the text object's text buffer.
  | length | the number of characters of `text` to insert. If the character count of `text` is less than or equal to `length`, the entire contents of `text` will be inserted.

Returns:
  `True` if the text content was successfully inserted, `False` otherwise.

boolean Accessibility::EditableText::setAttributes | ( | in string | attributes,
|  | in long | startPos,
|  | in long | endPos |
| ) |  |  |

Apply a particular set of attributes to a range of text.

Returns:
  `True` if the text attributes were successfully modified, `False` otherwise.

void Accessibility::EditableText::copyText | ( | in long | startPos,
|  | in long | endPos |
| ) |  |  |

Copy a range of text into the system clipboard.

Parameters:

  | startPos | the character offset of the first character in the range of text being copied.
  | endPos | the offset of the first character past the end of the range of text being copied.

boolean Accessibility::EditableText::cutText | ( | in long | startPos,
|  | in long | endPos |
| ) |  |  |

Excise a range of text from a Text object, copying it into the system clipboard.

Parameters:

  | startPos | the character offset of the first character in the range of text being cut.
  | endPos | the offset of the first character past the end of the range of text being cut.

Returns:
  `True` if the text was successfully cut, `False` otherwise.

boolean Accessibility::EditableText::deleteText | ( | in long | startPos,
|  | in long | endPos |
| ) |  |  |

Excise a range of text from a Text object without copying it into the system clipboard.

Parameters:

  | startPos | the character offset of the first character in the range of text being deleted.
  | endPos | the offset of the first character past the end of the range of text being deleted.

Returns:
  `True` if the text was successfully deleted, `False` otherwise.

boolean Accessibility::EditableText::pasteText | ( | in long | position | ) |

Copy the text contents of the system clipboard, if any, into a Text object, inserting it at a particular character offset.

Parameters:

  | position | the character offset before which the text will be inserted.

Returns:
  `True` if the text was successfully pasted into the Text object, `False` otherwise.

void Accessibility::EditableText::unImplemented5 | ( |  | ) |

unImplemented:

placeholders for future expansion. Note that these are named 'unimplemented5 and unimplemented6' to avoid conflict with placeholders from Accessibility::Text.

void Accessibility::EditableText::unImplemented6 | ( |  | ) |

void Accessibility::EditableText::unImplemented9 | ( |  | ) |

void Accessibility::EditableText::unImplemented10 | ( |  | ) |

void Accessibility::EditableText::unImplemented11 | ( |  | ) |

void Accessibility::EditableText::unImplemented12 | ( |  | ) |

The documentation for this interface was generated from the following file:

- /home/liyuan/src/at-spi/idl/Accessibility_EditableText.idl