A distinct view on a given media list. More...
import"sbIMediaListView.idl";
Public Member Functions | |
sbIMediaItem | getItemByIndex (in unsigned long aIndex) |
Get a media item in the filtered view of this list by index. More... | |
unsigned long | getIndexForItem (in sbIMediaItem aMediaItem) |
Searches the view for the first occurrence of the specified media item and returns the index where it was found. More... | |
unsigned long | getUnfilteredIndex (in unsigned long aIndex) |
Given an index of an item in the filtered list, get the index of the same item in the unfiltered list. More... | |
AString | getViewItemUIDForIndex (in unsigned long aIndex) |
Returns an opaque identifier that uniquely identifies the media item at a given position. This identifier can be used later to find the same media item after this view's filter and sort has been changed. More... | |
unsigned long | getIndexForViewItemUID (in AString aViewItemUID) |
Given an opaque identifier returned by getViewItemUIDForIndex, return the index of the media item it identifies. More... | |
nsIStringEnumerator | getDistinctValuesForProperty (in AString aPropertyID) |
sbIMediaListView | clone () |
Create a clone of this view. This will return a copy with the same search, filter, sort, and cascade filter set as the original. More... | |
sbIMediaListViewState | getState () |
Returns a snapshot of the current state of this view. Can later be used to restore the state by passing the returned object as an argument to sbIMediaList::CreateView() More... | |
void | addListener (in sbIMediaListViewListener aListener, [optional] in boolean aOwnsWeak) |
Add a listener to this view to be notified of changes to filter configuration, search, and sort configuration. More... | |
void | removeListener (in sbIMediaListViewListener aListener) |
Remove a listener from the view. More... | |
void | removeSelectedMediaItems () |
Remove selected items from the view's media list. More... | |
Public Attributes | |
readonly attribute sbIMediaList | mediaList |
The media list this view is on. More... | |
readonly attribute unsigned long | length |
Returns the length of filtered view of this list. More... | |
readonly attribute nsITreeView | treeView |
Get a treeview that will display this media list view. More... | |
readonly attribute sbICascadeFilterSet | cascadeFilterSet |
Get the cascade filter set for this media list view. More... | |
readonly attribute sbIMediaListViewSelection | selection |
Get the selection for the view. More... | |
A distinct view on a given media list.
Definition at line 89 of file sbIMediaListView.idl.
void sbIMediaListView::addListener | ( | in sbIMediaListViewListener | aListener, |
[optional] in boolean | aOwnsWeak | ||
) |
Add a listener to this view to be notified of changes to filter configuration, search, and sort configuration.
Calling addListener twice with the same listener and weak setting will be ignored. Calling twice with the same listener but different weak settings will cause two references to be stored, one weak and one strong.
aListener | The listener instance. |
aOwnsWeak | [optional] Whether or not to hold a weak reference to the listener. If aOwnsWeak is true then aListener must be able to QI to nsISupportsWeakReference. |
sbIMediaListView sbIMediaListView::clone | ( | ) |
Create a clone of this view. This will return a copy with the same search, filter, sort, and cascade filter set as the original.
nsIStringEnumerator sbIMediaListView::getDistinctValuesForProperty | ( | in AString | aPropertyID | ) |
unsigned long sbIMediaListView::getIndexForItem | ( | in sbIMediaItem | aMediaItem | ) |
Searches the view for the first occurrence of the specified media item and returns the index where it was found.
aMediaItem | Media item to search for |
NS_ERROR_NOT_AVAILABLE | if the media item is not in the view |
unsigned long sbIMediaListView::getIndexForViewItemUID | ( | in AString | aViewItemUID | ) |
Given an opaque identifier returned by getViewItemUIDForIndex, return the index of the media item it identifies.
aViewItemUID | The opaque identifier returned by getViewItemUIDForIndex |
sbIMediaItem sbIMediaListView::getItemByIndex | ( | in unsigned long | aIndex | ) |
Get a media item in the filtered view of this list by index.
aIndex | Filtered index of the media item |
sbIMediaListViewState sbIMediaListView::getState | ( | ) |
Returns a snapshot of the current state of this view. Can later be used to restore the state by passing the returned object as an argument to sbIMediaList::CreateView()
unsigned long sbIMediaListView::getUnfilteredIndex | ( | in unsigned long | aIndex | ) |
Given an index of an item in the filtered list, get the index of the same item in the unfiltered list.
aIndex | Filtered index of the media item |
AString sbIMediaListView::getViewItemUIDForIndex | ( | in unsigned long | aIndex | ) |
Returns an opaque identifier that uniquely identifies the media item at a given position. This identifier can be used later to find the same media item after this view's filter and sort has been changed.
aIndex | Filtered index of the media item |
void sbIMediaListView::removeListener | ( | in sbIMediaListViewListener | aListener | ) |
Remove a listener from the view.
Calling removeListener with a listener that has not been previously added with addListener is a no-op.
Calling removeListener with a listener that had both a weak and a strong reference stored (via two calls to addListener with different values for aOwnsWeak) will cause the weak listener to be removed first. A second call to removeListener is necessary to remove the strong reference.
aListener | The listener instance to remove. |
void sbIMediaListView::removeSelectedMediaItems | ( | ) |
Remove selected items from the view's media list.
readonly attribute sbICascadeFilterSet sbIMediaListView::cascadeFilterSet |
Get the cascade filter set for this media list view.
Definition at line 109 of file sbIMediaListView.idl.
readonly attribute unsigned long sbIMediaListView::length |
Returns the length of filtered view of this list.
Definition at line 99 of file sbIMediaListView.idl.
readonly attribute sbIMediaList sbIMediaListView::mediaList |
The media list this view is on.
Definition at line 94 of file sbIMediaListView.idl.
readonly attribute sbIMediaListViewSelection sbIMediaListView::selection |
Get the selection for the view.
Definition at line 212 of file sbIMediaListView.idl.
readonly attribute nsITreeView sbIMediaListView::treeView |
Get a treeview that will display this media list view.
Definition at line 104 of file sbIMediaListView.idl.