2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2002-09-28 04:38:20 +04:00
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
|
2007-09-30 23:00:10 +04:00
|
|
|
interface nsIDOMElement;
|
2002-09-28 04:38:20 +04:00
|
|
|
interface nsIAutoCompleteInput;
|
|
|
|
|
2007-09-30 23:00:10 +04:00
|
|
|
[scriptable, uuid(1b9d7d8a-6dd0-11dc-8314-0800200c9a66)]
|
2002-09-28 04:38:20 +04:00
|
|
|
interface nsIAutoCompletePopup : nsISupports
|
|
|
|
{
|
|
|
|
/*
|
|
|
|
* The input object that the popup is currently bound to
|
|
|
|
*/
|
|
|
|
readonly attribute nsIAutoCompleteInput input;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* An alternative value to be used when text is entered, rather than the
|
|
|
|
* value of the selected item
|
|
|
|
*/
|
|
|
|
readonly attribute AString overrideValue;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* The index of the result item that is currently selected
|
|
|
|
*/
|
|
|
|
attribute long selectedIndex;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Indicates if the popup is currently open
|
|
|
|
*/
|
|
|
|
readonly attribute boolean popupOpen;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Bind the popup to an input object and display it with the given coordinates
|
|
|
|
*
|
|
|
|
* @param input - The input object that the popup will be bound to
|
2007-09-30 23:00:10 +04:00
|
|
|
* @param element - The element that the popup will be aligned with
|
2002-09-28 04:38:20 +04:00
|
|
|
*/
|
2007-09-30 23:00:10 +04:00
|
|
|
void openAutocompletePopup(in nsIAutoCompleteInput input, in nsIDOMElement element);
|
|
|
|
|
2002-09-28 04:38:20 +04:00
|
|
|
/*
|
|
|
|
* Close the popup and detach from the bound input
|
|
|
|
*/
|
|
|
|
void closePopup();
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Instruct the result view to repaint itself to reflect the most current
|
|
|
|
* underlying data
|
|
|
|
*/
|
|
|
|
void invalidate();
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Change the selection relative to the current selection and make sure
|
|
|
|
* the newly selected row is visible
|
|
|
|
*
|
|
|
|
* @param reverse - Select a row above the current selection
|
|
|
|
* @param page - Select a row that is a full visible page from the current selection
|
|
|
|
* @return The currently selected result item index
|
|
|
|
*/
|
|
|
|
void selectBy(in boolean reverse, in boolean page);
|
|
|
|
};
|