1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
3 * ***** BEGIN LICENSE BLOCK *****
4 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
6 * The contents of this file are subject to the Mozilla Public License Version
7 * 1.1 (the "License"); you may not use this file except in compliance with
8 * the License. You may obtain a copy of the License at
9 * http://www.mozilla.org/MPL/
11 * Software distributed under the License is distributed on an "AS IS" basis,
12 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13 * for the specific language governing rights and limitations under the
16 * The Original Code is the Mozilla browser.
18 * The Initial Developer of the Original Code is
19 * Netscape Communications Corporation.
20 * Portions created by the Initial Developer are Copyright (C) 1999
21 * the Initial Developer. All Rights Reserved.
24 * Paul Sandoz (paul.sandoz@sun.com)
25 * Bill Haneman (bill.haneman@sun.com)
26 * John Gaunt (jgaunt@netscape.com)
28 * Alternatively, the contents of this file may be used under the terms of
29 * either of the GNU General Public License Version 2 or later (the "GPL"),
30 * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
31 * in which case the provisions of the GPL or the LGPL are applicable instead
32 * of those above. If you wish to allow use of your version of this file only
33 * under the terms of either the GPL or the LGPL, and not to allow others to
34 * use your version of this file under the terms of the MPL, indicate your
35 * decision by deleting the provisions above and replace them with the notice
36 * and other provisions required by the GPL or the LGPL. If you do not delete
37 * the provisions above, a recipient may use your version of this file under
38 * the terms of any one of the MPL, the GPL or the LGPL.
40 * ***** END LICENSE BLOCK ***** */
42 #include
"nsISupports.idl"
46 [scriptable
, uuid(52837507-202d
-4e72
-a482
-5f068a1fd720
)]
47 interface nsIAccessibleEditableText
: nsISupports
50 * Sets the attributes for the text between the two given indices. The old
51 * attributes are replaced by the new list of attributes. For example,
52 * sets font styles, such as italic, bold...
54 * @param startPos - start index of the text whose attributes are modified.
55 * @param endPos - end index of the text whose attributes are modified.
56 * @param attributes - set of attributes that replaces the old list of
57 * attributes of the specified text portion.
59 void setAttributes
(in long startPos
, in long endPos
,
60 in nsISupports attributes
);
63 * Replaces the text represented by this object by the given text.
65 void setTextContents
(in AString text
);
68 * Inserts text at the specified position.
70 * @param text - text that is inserted.
71 * @param position - index at which to insert the text.
73 void insertText
(in AString text
, in long position
);
76 * Copies the text range into the clipboard.
78 * @param startPos - start index of the text to moved into the clipboard.
79 * @param endPos - end index of the text to moved into the clipboard.
81 void copyText
(in long startPos
, in long endPos
);
84 * Deletes a range of text and copies it to the clipboard.
86 * @param startPos - start index of the text to be deleted.
87 * @param endOffset - end index of the text to be deleted.
89 void cutText
(in long startPos
, in long endPos
);
92 * Deletes a range of text.
94 * @param startPos - start index of the text to be deleted.
95 * @param endPos - end index of the text to be deleted.
97 void deleteText
(in long startPos
, in long endPos
);
100 * Pastes text from the clipboard.
102 * @param position - index at which to insert the text from the system
103 * clipboard into the text represented by this object.
105 void pasteText
(in long position
);
108 * Returns an editor associated with the accessible.
110 [noscript
] readonly attribute nsIEditor associatedEditor
;
116 selectAttributes method takes an nsISupports parameter.
117 'set' methods throw exception on failure.
118 'wstring' inputs are potentially multibyte (UTF-16 for
119 instance); 'string' and UTF-8 may be a better choice.