2007-03-22 10:30:00 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
2012-05-21 04:12:37 -07: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/. */
|
2013-11-02 18:56:59 -07:00
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
#include "nsISupports.idl"
|
2013-11-02 18:56:59 -07:00
|
|
|
|
|
|
|
interface nsIAccessible;
|
|
|
|
interface nsIArray;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
/**
|
2013-11-02 18:56:59 -07:00
|
|
|
* An accessibility interface for selectable widgets.
|
2007-03-22 10:30:00 -07:00
|
|
|
*/
|
2014-10-21 17:49:28 -07:00
|
|
|
[scriptable, uuid(8efb03d4-1354-4875-94cf-261336057626)]
|
2007-03-22 10:30:00 -07:00
|
|
|
interface nsIAccessibleSelectable : nsISupports
|
|
|
|
{
|
2013-11-02 18:56:59 -07:00
|
|
|
/**
|
|
|
|
* Return an nsIArray of selected items within the widget.
|
|
|
|
*/
|
|
|
|
readonly attribute nsIArray selectedItems;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2013-11-02 18:56:59 -07:00
|
|
|
/**
|
|
|
|
* Return the number of currently selected items.
|
|
|
|
*/
|
|
|
|
readonly attribute unsigned long selectedItemCount;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2013-11-02 18:56:59 -07:00
|
|
|
/**
|
|
|
|
* Return a nth selected item within the widget.
|
|
|
|
*/
|
|
|
|
nsIAccessible getSelectedItemAt(in unsigned long index);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2013-11-02 18:56:59 -07:00
|
|
|
/**
|
|
|
|
* Return true if the given item is selected.
|
|
|
|
*/
|
|
|
|
boolean isItemSelected(in unsigned long index);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2013-11-02 18:56:59 -07:00
|
|
|
/**
|
|
|
|
* Adds the specified item to the widget's selection.
|
|
|
|
*/
|
|
|
|
void addItemToSelection(in unsigned long index);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2013-11-02 18:56:59 -07:00
|
|
|
/**
|
|
|
|
* Removes the specified item from the widget's selection.
|
|
|
|
*/
|
|
|
|
void removeItemFromSelection(in unsigned long index);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2013-11-02 18:56:59 -07:00
|
|
|
/**
|
|
|
|
* Select all items.
|
|
|
|
*
|
|
|
|
* @return false if the object does not accept multiple selection,
|
|
|
|
* otherwise true.
|
|
|
|
*/
|
|
|
|
boolean selectAll();
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2013-11-02 18:56:59 -07:00
|
|
|
/**
|
|
|
|
* Unselect all items.
|
|
|
|
*/
|
|
|
|
void unselectAll();
|
2007-03-22 10:30:00 -07:00
|
|
|
};
|