sbIMediaListViewSelection Interface Reference

Manage the selection of items within a view. This interface is a subset of nsITreeViewSelection. Note that if you are part of the user interface, you probably want to be calling nsITreeView.selection instead - otherwise things can get subtly out of sync. More...

import"sbIMediaListViewSelection.idl";

Inheritance diagram for sbIMediaListViewSelection:
[legend]
Collaboration diagram for sbIMediaListViewSelection:
[legend]

Public Member Functions

boolean isIndexSelected (in long aIndex)
 Indicates whether or not the item at the specified index is part of the selection. More...
 
boolean isContentTypeSelected (in AString aContentType)
 Indicates whether or not any item with the specified content type is selected. More...
 
void select (in long aIndex)
 Select the item at the given index. More...
 
void selectOnly (in long aIndex)
 Select only the item at the given index, all others will be deselected. More...
 
void timedSelectOnly (in long aIndex, in long aDelay)
 Same as selectOnly but notifies listeners after a delay (analogous to nsITreeSelection.timedSelect()). More...
 
void toggle (in long aIndex)
 Toggle the selection state of the item at the given index. More...
 
void clear (in long aIndex)
 Unselect the item at the given index. More...
 
void selectRange (in long aStartIndex, in long aEndIndex)
 Select the range specified by the indices. More...
 
void clearRange (in long aStartIndex, in long aEndIndex)
 Clear the specified range. More...
 
void selectNone ()
 Clears the selection. More...
 
void selectAll ()
 Selects all items. More...
 
void addListener (in sbIMediaListViewSelectionListener aListener)
 Add a listener to the selection. It will be notified when the selection or current index changes. More...
 
void removeListener (in sbIMediaListViewSelectionListener aListener)
 Remove a listener from the selection. More...
 

Public Attributes

readonly attribute long count
 The number of selected items. More...
 
attribute long currentIndex
 The index of the current media item. More...
 
readonly attribute sbIMediaItem currentMediaItem
 The current media item. More...
 
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. More...
 
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. More...
 
attribute boolean selectionNotificationsSuppressed
 When set to true, notifications are not sent to the listeners. More...
 

Detailed Description

Manage the selection of items within a view. This interface is a subset of nsITreeViewSelection. Note that if you are part of the user interface, you probably want to be calling nsITreeView.selection instead - otherwise things can get subtly out of sync.

Definition at line 62 of file sbIMediaListViewSelection.idl.

Member Function Documentation

void sbIMediaListViewSelection::addListener ( in sbIMediaListViewSelectionListener  aListener)

Add a listener to the selection. It will be notified when the selection or current index changes.

Parameters
aListenerThe listener to add
void sbIMediaListViewSelection::clear ( in long  aIndex)

Unselect the item at the given index.

Parameters
aIndexIndex of the item in the view
void sbIMediaListViewSelection::clearRange ( in long  aStartIndex,
in long  aEndIndex 
)

Clear the specified range.

Parameters
aStartIndexIndex of the starting item in the view
aEndIndexIndex of the ending item in the view
boolean sbIMediaListViewSelection::isContentTypeSelected ( in AString  aContentType)

Indicates whether or not any item with the specified content type is selected.

Parameters
aContentTypeContent type of the item
boolean sbIMediaListViewSelection::isIndexSelected ( in long  aIndex)

Indicates whether or not the item at the specified index is part of the selection.

Parameters
aIndexIndex of the item in the view
void sbIMediaListViewSelection::removeListener ( in sbIMediaListViewSelectionListener  aListener)

Remove a listener from the selection.

Parameters
aListenerThe listener to remove
void sbIMediaListViewSelection::select ( in long  aIndex)

Select the item at the given index.

Parameters
aIndexIndex of the item in the view
void sbIMediaListViewSelection::selectAll ( )

Selects all items.

void sbIMediaListViewSelection::selectNone ( )

Clears the selection.

void sbIMediaListViewSelection::selectOnly ( in long  aIndex)

Select only the item at the given index, all others will be deselected.

Parameters
aIndexIndex of the item in the view
void sbIMediaListViewSelection::selectRange ( in long  aStartIndex,
in long  aEndIndex 
)

Select the range specified by the indices.

Parameters
aStartIndexIndex of the starting item in the view.
aEndIndexIndex of the ending item in the view.
void sbIMediaListViewSelection::timedSelectOnly ( in long  aIndex,
in long  aDelay 
)

Same as selectOnly but notifies listeners after a delay (analogous to nsITreeSelection.timedSelect()).

Parameters
aIndexIndex of the item in the view
aDelayDelay in milliseconds before notification
void sbIMediaListViewSelection::toggle ( in long  aIndex)

Toggle the selection state of the item at the given index.

Parameters
aIndexIndex of the item in the view

Member Data Documentation

readonly attribute long sbIMediaListViewSelection::count

The number of selected items.

Definition at line 67 of file sbIMediaListViewSelection.idl.

attribute long sbIMediaListViewSelection::currentIndex

The index of the current media item.

Definition at line 72 of file sbIMediaListViewSelection.idl.

readonly attribute sbIMediaItem sbIMediaListViewSelection::currentMediaItem

The current media item.

Definition at line 77 of file sbIMediaListViewSelection.idl.

readonly attribute nsISimpleEnumerator sbIMediaListViewSelection::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.

Definition at line 99 of file sbIMediaListViewSelection.idl.

readonly attribute nsISimpleEnumerator sbIMediaListViewSelection::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.

Definition at line 106 of file sbIMediaListViewSelection.idl.

attribute boolean sbIMediaListViewSelection::selectionNotificationsSuppressed

When set to true, notifications are not sent to the listeners.

Definition at line 181 of file sbIMediaListViewSelection.idl.


The documentation for this interface was generated from the following file: