WARNING: Most of this content (with the exception of the Mozilla 1.9 XPCOM reference) is very old, and can be expected to be out of date and possibly obsolete. For better XUL documentation, please visit the XUL hub at the Mozilla Developer Center.

nsINavHistoryResultTreeViewer

IID:e0ce87df-8b77-407b-a52b-7510eab14fb5
Inherits From:nsINavHistoryResultViewer

Constants

Reverse of nodeForFlatIndex, returns the row index for a given result node. Returns INDEX_INVISIBLE if the item is not visible (for example, its parent is collapsed). This is only valid when a tree is attached. The the result will always be INDEX_INVISIBLE if not.

Note: This sounds sort of obvious, but it got me: aNode must be a node retrieved from the same result that this viewer is for. If you execute another query and get a node from a _different_ result, this function will always return the index of that node in the tree that is attached to that result.

PRUint32 INDEX_INVISIBLE = -1

Properties

PRBool collapseDuplicates

Controls whether duplicate adjacent elements are collapsed into a single item in the tree. This prevents you from seeing multiple entries for things when you have selected to get visits. When you sort by date, the multiple entries will then appear because they will be separated (unless you clicked reload a bunch of times in a row). If you know you'll only ever want one entry per site, you should ask for URIs back instead of visits so it will be more efficient. Default = true

Changing this value is somewhat heavyweight since it will force a tree refresh.


Methods

nsINavHistoryResultNode nodeForTreeIndex ( PRUint32 index ) PRUint32 treeIndexForNode ( nsINavHistoryResultNode node )

nsINavHistoryResultNode nodeForTreeIndex ( PRUint32 index )

This allows you to get at the real node for a given row index. This is only valid when a tree is attached.

Arguments:
index

PRUint32 treeIndexForNode ( nsINavHistoryResultNode node )

Arguments:
node

Reference documentation is generated from Mozilla's source.