MDN may have intermittent access issues April 18 13:00 - April 19 01:00 UTC. See whistlepig.mozilla.org for all notifications.

mozilla
Your Search Results

    IAccessibleEditableText

    This interface provides clipboard capability to text objects.
    1.0
    28
    Introduced
    Gecko 1.9
    Inherits from: IUnknown Last changed in Gecko 1.9 (Firefox 3)

    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 @ref _specialOffsets "Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods" for information about a special offset constant that can be used in IAccessibleEditableText methods.

    Method overview

    HRESULT copyText([in] long startOffset, [in] long endOffset );
    HRESULT cutText([in] long startOffset, [in] long endOffset );
    HRESULT deleteText([in] long startOffset, [in] long endOffset );
    HRESULT insertText([in] long offset, [in] BSTR text );
    HRESULT pasteText([in] long offset );
    HRESULT replaceText([in] long startOffset, [in] long endOffset, [in] BSTR text );
    HRESULT setAttributes([in] long startOffset, [in] long endOffset, [in] BSTR attributes );

    Methods

    copyText()

    Copies the text range into the clipboard. The specified text between the two given indices is copied into the system clipboard.

    HRESULT copyText(
      [in] long startOffset,
      [in] long endOffset 
    );
    
    Parameters
    startOffset
    Start index of the text to moved into the clipboard. The valid range is 0..length.
    endOffset
    End index of the text to moved into the clipboard. The valid range is 0..length.
    Return value

    E_INVALIDARG if bad [in] passed. S_OK.

    cutText()

    Deletes a range of text and copies it to the clipboard. The text between the two given indices is deleted from the text represented by this object and copied to the clipboard.

    HRESULT cutText(
      [in] long startOffset,
      [in] long endOffset 
    );
    
    Parameters
    startOffset
    Start index of the text to be deleted. The valid range is 0..length.
    endOffset
    End index of the text to be deleted. The valid range is 0..length.
    Return value

    E_INVALIDARG if bad [in] passed. S_OK.

    deleteText()

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

    HRESULT deleteText(
      [in] long startOffset,
      [in] long endOffset 
    );
    
    Parameters
    startOffset
    Start index of the text to be deleted. The valid range is 0..length.
    endOffset
    End index of the text to be deleted. The valid range is 0..length.
    Return value

    E_INVALIDARG if bad [in] passed. S_OK.

    insertText()

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

    HRESULT insertText(
      [in] long offset,
      [in] BSTR text 
    );
    
    Parameters
    offset
    Index at which to insert the text. The valid range is 0..length.
    text
    Text that is inserted.
    Return value

    E_INVALIDARG if bad [in] passed. S_OK.

    pasteText()

    Pastes text from the clipboard. The text in the system clipboard is pasted into the text represented by this object at the given index. This method is similar to the insertText(). If the index is not valid the system clipboard text is not inserted.

    HRESULT pasteText(
      [in] long offset 
    );
    
    Parameters
    offset
    Index at which to insert the text from the system clipboard into the text represented by this object. The valid range is 0..length.
    Return value

    E_INVALIDARG if bad [in] passed. S_OK.

    replaceText()

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

    HRESULT replaceText(
      [in] long startOffset,
      [in] long endOffset,
      [in] BSTR text 
    );
    
    Parameters
    startOffset
    Start index of the text to be replaced. The valid range is 0..length.
    endOffset
    Start index of the text to be replaced. The valid range is 0..length.
    text
    The Text that replaces the text between the given indices.
    Return value

    E_INVALIDARG if bad [in] passed. S_OK.

    setAttributes()

    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.

    HRESULT setAttributes(
      [in] long startOffset,
      [in] long endOffset,
      [in] BSTR attributes 
    );
    
    Parameters
    startOffset
    Start index of the text whose attributes are modified. The valid range is 0..length.
    endOffset
    Start index of the text whose attributes are modified. The valid range is 0..length.
    attributes
    Set of attributes that replaces the old list of attributes of the specified text portion.
    Return value

    E_INVALIDARG if bad [in] passed. S_OK.

    See also

    Document Tags and Contributors

    Contributors to this page: Sheppy, trevorh
    Last updated by: Sheppy,