import "sbIMediaListViewSelection.idl";
Public Member Functions | |
boolean | isIndexSelected (in long aIndex) |
Indicates whether or not if the item at the specified index is part of the selection. | |
void | select (in long aIndex) |
Select the item at the given index. | |
void | selectOnly (in long aIndex) |
Select only the item at the given index, all others will be deselected. | |
void | toggle (in long aIndex) |
Toggle the selection state of the item at the given index. | |
void | clear (in long aIndex) |
Unselect the item at the given index. | |
void | selectRange (in long aStartIndex, in long aEndIndex) |
Select the range specified by the indices. | |
void | clearRange (in long aStartIndex, in long aEndIndex) |
Clear the specified range. | |
void | selectNone () |
Clears the selection. | |
void | selectAll () |
Selects all items. | |
void | addListener (in sbIMediaListViewSelectionListener aListener) |
Add a listener to the selection. It will be notified when the selection or current index changes. | |
void | removeListener (in sbIMediaListViewSelectionListener aListener) |
Remove a listener from the selection. | |
Public Attributes | |
readonly attribute long | count |
The number of selected items. | |
attribute long | currentIndex |
The index of the current media item. | |
readonly attribute sbIMediaItem | currentMediaItem |
The current media item. | |
readonly attribute nsISimpleEnumerator | selectedIndexedMediaItems |
Get an enumerator of all the selected media items. The elements contained in the enumerator implement sbIIndexedMediaItem which allows the consumer of the enumerator to know the item and the index of the item. | |
readonly attribute nsISimpleEnumerator | selectedMediaItems |
Get an enumertaor of all the selected media items. The elements contained in the enumerator implement sbIMediaItem. This differs from selectedIndexedMediaItems in that there is no indices involved. | |
attribute boolean | selectionNotificationsSuppressed |
When set to true, notifications are not sent to the listeners. |
Definition at line 64 of file sbIMediaListViewSelection.idl.
boolean sbIMediaListViewSelection::isIndexSelected | ( | in long | aIndex | ) |
Indicates whether or not if the item at the specified index is part of the selection.
aIndex | Index of the item in the view |
void sbIMediaListViewSelection::select | ( | in long | aIndex | ) |
Select the item at the given index.
aIndex | Index of the item in the view |
void sbIMediaListViewSelection::selectOnly | ( | in long | aIndex | ) |
Select only the item at the given index, all others will be deselected.
aIndex | Index of the item in the view |
void sbIMediaListViewSelection::toggle | ( | in long | aIndex | ) |
Toggle the selection state of the item at the given index.
aIndex | Index of the item in the view |
void sbIMediaListViewSelection::clear | ( | in long | aIndex | ) |
Unselect the item at the given index.
aIndex | Index of the item in the view |
void sbIMediaListViewSelection::selectRange | ( | in long | aStartIndex, | |
in long | aEndIndex | |||
) |
Select the range specified by the indices.
aStartIndex | Index of the starting item in the view. | |
aEndIndex | Index of the ending item in the view. |
void sbIMediaListViewSelection::clearRange | ( | in long | aStartIndex, | |
in long | aEndIndex | |||
) |
Clear the specified range.
aStartIndex | Index of the starting item in the view | |
aEndIndex | Index of the ending item in the view |
void sbIMediaListViewSelection::addListener | ( | in sbIMediaListViewSelectionListener | aListener | ) |
Add a listener to the selection. It will be notified when the selection or current index changes.
aListener | The listener to add |
void sbIMediaListViewSelection::removeListener | ( | in sbIMediaListViewSelectionListener | aListener | ) |
Remove a listener from the selection.
aListener | The listener to remove |