Songbird / Development / Songbird Add-Ons API Documentation

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";

List of all members.

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.


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 64 of file sbIMediaListViewSelection.idl.


Member Function Documentation

boolean sbIMediaListViewSelection::isIndexSelected ( in long  aIndex  ) 

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

Parameters:
aIndex Index of the item in the view

void sbIMediaListViewSelection::select ( in long  aIndex  ) 

Select the item at the given index.

Parameters:
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.

Parameters:
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.

Parameters:
aIndex Index of the item in the view

void sbIMediaListViewSelection::clear ( in long  aIndex  ) 

Unselect the item at the given index.

Parameters:
aIndex Index of the item in the view

void sbIMediaListViewSelection::selectRange ( in long  aStartIndex,
in long  aEndIndex 
)

Select the range specified by the indices.

Parameters:
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.

Parameters:
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.

Parameters:
aListener The listener to add

void sbIMediaListViewSelection::removeListener ( in sbIMediaListViewSelectionListener  aListener  ) 

Remove a listener from the selection.

Parameters:
aListener The listener to remove


The documentation for this interface was generated from the following file:
Generated on Tue Mar 10 14:29:00 2009 for Songbird by  doxygen 1.5.2