Public Member Functions | Public Attributes

nsIAbView Interface Reference

This interface and its associated nsAbView object provides an interface to allow a tree to be associated with an address book, and the results to be displayed in that tree. More...

import "nsIAbView.idl";

Collaboration diagram for nsIAbView:

List of all members.

Public Member Functions

AString setView (in nsIAbDirectory aAddressBook, in nsIAbViewListener aAbViewListener, in AString aSortColumn, in AString aSortDirection)
 Sets up the nsIAbView to look at the specified directory.
void clearView ()
 Clears the view and releases any locally held copies of the address book directory.
void sortBy (in wstring aSortColumn, in wstring aSortDirection)
 Sorts the tree by the specified parameters.
nsIAbCard getCardFromRow (in long aRow)
 Returns the card associated with the given row.
void selectAll ()
 Selects all rows in the view.
void deleteSelectedCards ()
 Deletes all the selected cards (no prompts are given).
void swapFirstNameLastName ()
 Swaps the first and last name order, and updates the appropriate preference.

Public Attributes

readonly attribute AString sortColumn
 Returns the current sort column.
readonly attribute AString sortDirection
 Returns the current sort direction.
readonly attribute nsIAbDirectory directory
 Returns the current directory that this view is hooked up to.
readonly attribute nsIArray selectedAddresses
 Returns an array of the currently selected addresses.

Detailed Description

This interface and its associated nsAbView object provides an interface to allow a tree to be associated with an address book, and the results to be displayed in that tree.

If you wish for the tree to display the results of a different address book, then call setView again. There is no need to delete and recreate the nsAbView object. If you wish to clear the view, then just call clearView.


Member Function Documentation

void nsIAbView::clearView (  ) 

Clears the view and releases any locally held copies of the address book directory.

This should be called when the view is no longer required, e.g. on unload.

void nsIAbView::deleteSelectedCards (  ) 

Deletes all the selected cards (no prompts are given).

nsIAbCard nsIAbView::getCardFromRow ( in long  aRow  ) 

Returns the card associated with the given row.

Parameters:
aRow The row from which to return the card.
Returns:
A card associated with the row, or null if row is not valid.
void nsIAbView::selectAll (  ) 

Selects all rows in the view.

AString nsIAbView::setView ( in nsIAbDirectory  aAddressBook,
in nsIAbViewListener  aAbViewListener,
in AString  aSortColumn,
in AString  aSortDirection 
)

Sets up the nsIAbView to look at the specified directory.

This may be called multiple times.

Parameters:
aDirectory The directory to search, this may be a directory with a query string.
aViewListener An optional listener.
aSortColumn The column to sort by. See the xul element with id abResultsTreeCols for possible values.
aSortDirection The sort direction to use ("ascending"/"descending")
Returns:
The actual sortColumn (various switching of apps could cause the persisted sortColumn to be bogus).
void nsIAbView::sortBy ( in wstring  aSortColumn,
in wstring  aSortDirection 
)

Sorts the tree by the specified parameters.

sortBy does not optimize for the case when sortColumn and sortDirection is identical since the last call, the caller is responsible optimizing for that case.

Parameters:
aSortColumn The column to sort by. See the xul element with id abResultsTreeCols for possible values.
aSortDirection The sort direction to use ("ascending"/"descending")
void nsIAbView::swapFirstNameLastName (  ) 

Swaps the first and last name order, and updates the appropriate preference.


Member Data Documentation

Returns the current directory that this view is hooked up to.

May be null if no directory has been set.

Returns an array of the currently selected addresses.

readonly attribute AString nsIAbView::sortColumn

Returns the current sort column.

readonly attribute AString nsIAbView::sortDirection

Returns the current sort direction.


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