AccessibleEditableText Interface

## AccessibleEditableText Interface AccessibleEditableText Interface — An interface which allows editable text fields to be programmatically manipulated. |

## Synopsis

    void                AccessibleEditableText_ref          (AccessibleEditableText *obj);
    void                AccessibleEditableText_unref        (AccessibleEditableText *obj);
    SPIBoolean          AccessibleEditableText_copyText     (AccessibleText *obj,
                                                             long int startPos,
                                                             long int endPos);
    SPIBoolean          AccessibleEditableText_deleteText   (AccessibleEditableText *obj,
                                                             long int startPos,
                                                             long int endPos);
    SPIBoolean          AccessibleEditableText_insertText   (AccessibleEditableText *obj,
                                                             long int position,
                                                             const char *text,
                                                             long int length);
    SPIBoolean          AccessibleEditableText_cutText      (AccessibleEditableText *obj,
                                                             long int startPos,
                                                             long int endPos);
    SPIBoolean          AccessibleEditableText_pasteText    (AccessibleEditableText *obj,
                                                             long int position);
    SPIBoolean          AccessibleEditableText_setTextContents
                                                            (AccessibleEditableText *obj,
                                                             const char *newContents);
    SPIBoolean          AccessibleEditableText_setAttributes
                                                            (AccessibleEditableText *obj,
                                                             const char *attributes,
                                                             long int startOffset,
                                                             long int endOffset);

## Description

An interface implemented by objects whose text content may be (potentially or actually) directly modified by user activity. Text entry fields and text editor compose panes are examples of EditableText implementors.

## Details

### AccessibleEditableText_ref ()

    void                AccessibleEditableText_ref          (AccessibleEditableText *obj);

Increment the reference count for an AccessibleEditableText object. Since AccessibleEditableText is derived from AccessibleText, this is the same as `AccessibleText_ref()`.

`obj` : | a pointer to the AccessibleEditableText object on which to operate.

### AccessibleEditableText_unref ()

    void                AccessibleEditableText_unref        (AccessibleEditableText *obj);

Decrement the reference count for an AccessibleEdiitableText object. Since AccessibleEditableText is derived from AccessibleText, this is the same as `AccessibleText_unref()`.

`obj` : | a pointer to the AccessibleEditableText object on which to operate.

### AccessibleEditableText_copyText ()

    SPIBoolean          AccessibleEditableText_copyText     (AccessibleText *obj,
                                                             long int startPos,
                                                             long int endPos);

Copy text from an AccessibleEditableText object into the clipboard.

`see`: AccessibleEditableText_pasteText

`obj` : | a pointer to the AccessibleEditableText object to modify.
`startPos` : | an integer indicating the starting character offset of the text to copy.
`endPos` : | an integer indicating the offset of the first character past the end of the text section to be copied.
Returns : | TRUE if the operation was successful, otherwise FALSE.

### AccessibleEditableText_deleteText ()

    SPIBoolean          AccessibleEditableText_deleteText   (AccessibleEditableText *obj,
                                                             long int startPos,
                                                             long int endPos);

Delete text from an AccessibleEditableText object, without copying the excised portion into the clipboard.

`see`: AccessibleEditableText_cutText

`obj` : | a pointer to the AccessibleEditableText object to modify.
`startPos` : | an integer indicating the starting character offset of the text to delete.
`endPos` : | an integer indicating the offset of the first character past the end of the text section to be deleted.
Returns : | TRUE if the operation was successful, otherwise FALSE.

### AccessibleEditableText_insertText ()

    SPIBoolean          AccessibleEditableText_insertText   (AccessibleEditableText *obj,
                                                             long int position,
                                                             const char *text,
                                                             long int length);

Insert text into an AccessibleEditableText object. As with all character offsets, the specified `position` may not be the same as the resulting byte offset, since the text is in a variable-width encoding.

`obj` : | a pointer to the AccessibleEditableText object to modify.
`position` : | an integer indicating the character offset at which to insert the new text.
`text` : | a char* pointer to the text to insert, in UTF-8 encoding.
`length` : | (frankly I'm not sure this parameter should be here)
Returns : | TRUE if the operation was successful, otherwise FALSE.

### AccessibleEditableText_cutText ()

    SPIBoolean          AccessibleEditableText_cutText      (AccessibleEditableText *obj,
                                                             long int startPos,
                                                             long int endPos);

Delete text from an AccessibleEditableText object, copying the excised portion into the clipboard.

`see`: AccessibleEditableText_pasteText

`obj` : | a pointer to the AccessibleEditableText object to modify.
`startPos` : | an integer indicating the starting character offset of the text to cut.
`endPos` : | an integer indicating the offset of the first character past the end of the text section to be cut.
Returns : | TRUE if operation was successful, FALSE otherwise.

### AccessibleEditableText_pasteText ()

    SPIBoolean          AccessibleEditableText_pasteText    (AccessibleEditableText *obj,
                                                             long int position);

Insert text from the clipboard into an AccessibleEditableText object. As with all character offsets, the specified `position` may not be the same as the resulting byte offset, since the text is in a variable-width encoding.

`obj` : | a pointer to the AccessibleEditableText object to modify.
`position` : | an integer indicating the character offset at which to insert the new text.
Returns : | TRUE if the operation was successful, otherwise FALSE.

### AccessibleEditableText_setTextContents ()

    SPIBoolean          AccessibleEditableText_setTextContents
                                                            (AccessibleEditableText *obj,
                                                             const char *newContents);

Replace the entire text contents of an AccessibleEditableText object.

`obj` : | a pointer to the AccessibleEditableText object to modify.
`newContents` : | a character string, encoded in UTF-8, which is to become the new text contents of the AccessibleEditableText object.
Returns : | TRUE if the operation was successful, otherwise FALSE.

### AccessibleEditableText_setAttributes ()

    SPIBoolean          AccessibleEditableText_setAttributes
                                                            (AccessibleEditableText *obj,
                                                             const char *attributes,
                                                             long int startOffset,
                                                             long int endOffset);

Set the attributes applied to a range of text from an AccessibleEditableText object, and the bounds of the range.

`obj` : | a pointer to the AccessibleEditableText object to modify.
`attributes` : | a character string indicating the attributes to apply to the range, delimited by ':'.
`startOffset` : | a long indicating the start of the desired text range.
`endOffset` : | a long indicating the first character past the desired range.
Returns : | TRUE if the operation was successful, otherwise FALSE.