toolkit/components/autocomplete/nsIAutoCompletePopup.idl

branch
TOR_BUG_3246
changeset 7
129ffea94266
equal deleted inserted replaced
-1:000000000000 0:584f4f8ab75c
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4
5 #include "nsISupports.idl"
6
7 interface nsIDOMElement;
8 interface nsIAutoCompleteInput;
9
10 [scriptable, uuid(1b9d7d8a-6dd0-11dc-8314-0800200c9a66)]
11 interface nsIAutoCompletePopup : nsISupports
12 {
13 /*
14 * The input object that the popup is currently bound to
15 */
16 readonly attribute nsIAutoCompleteInput input;
17
18 /*
19 * An alternative value to be used when text is entered, rather than the
20 * value of the selected item
21 */
22 readonly attribute AString overrideValue;
23
24 /*
25 * The index of the result item that is currently selected
26 */
27 attribute long selectedIndex;
28
29 /*
30 * Indicates if the popup is currently open
31 */
32 readonly attribute boolean popupOpen;
33
34 /*
35 * Bind the popup to an input object and display it with the given coordinates
36 *
37 * @param input - The input object that the popup will be bound to
38 * @param element - The element that the popup will be aligned with
39 */
40 void openAutocompletePopup(in nsIAutoCompleteInput input, in nsIDOMElement element);
41
42 /*
43 * Close the popup and detach from the bound input
44 */
45 void closePopup();
46
47 /*
48 * Instruct the result view to repaint itself to reflect the most current
49 * underlying data
50 */
51 void invalidate();
52
53 /*
54 * Change the selection relative to the current selection and make sure
55 * the newly selected row is visible
56 *
57 * @param reverse - Select a row above the current selection
58 * @param page - Select a row that is a full visible page from the current selection
59 * @return The currently selected result item index
60 */
61 void selectBy(in boolean reverse, in boolean page);
62 };

mercurial