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.

nsINavHistoryResultViewer

IID:e60f4429-3787-45c8-a8c0-18ef52621bbf
Inherits From:nsISupports

Properties

nsINavHistoryResult result

Called by the result when this object is set using nsINavHistoryResult.viewer. This will be set to NULL when the result is being deallocated. This should not be set by other code.


Methods

void containerClosed ( nsINavHistoryContainerResultNode item ) void containerOpened ( nsINavHistoryContainerResultNode item ) void invalidateAll ( ) void invalidateContainer ( nsINavHistoryContainerResultNode item ) void itemChanged ( nsINavHistoryResultNode item ) void itemInserted ( nsINavHistoryContainerResultNode parent , nsINavHistoryResultNode item , PRUint32 newIndex ) void itemMoved ( nsINavHistoryResultNode item , nsINavHistoryContainerResultNode oldParent , PRUint32 oldIndex , nsINavHistoryContainerResultNode newParent , PRUint32 newIndex ) void itemRemoved ( nsINavHistoryContainerResultNode parent , nsINavHistoryResultNode item , PRUint32 oldIndex ) void itemReplaced ( nsINavHistoryContainerResultNode parent , nsINavHistoryResultNode oldItem , nsINavHistoryResultNode newItem , PRUint32 index ) void sortingChanged ( PRUint16 sortingMode )

void containerClosed ( nsINavHistoryContainerResultNode item )

Called after a container node went from opened to closed. This will be called for the topmost container that is closing, and implies that any child containers have closed as well.

Arguments:
item

void containerOpened ( nsINavHistoryContainerResultNode item )

Called after a container node went from closed to opened.

Arguments:
item

void invalidateAll ( )

Called when something significant is changing that requires everything to be recomputed. For example, changing sorting or changing collapse duplicates can affect every row.


void invalidateContainer ( nsINavHistoryContainerResultNode item )

Called when something significant has happened within the container. The contents of the container should be re-built.

Arguments:
item

void itemChanged ( nsINavHistoryResultNode item )

Called when an item has been changed and should be repainted. This only refers to the specific item. If it is a container, getting this message does not imply anything happened to the children. You'll get separate messages for those. Also, this may be called for container nodes at times when the result thinks it's possible that a twisty mey need to bw redrawn.

Arguments:
item

void itemInserted ( nsINavHistoryContainerResultNode parent , nsINavHistoryResultNode item , PRUint32 newIndex )

Called when 'aItem' is inserted into 'aParent' at index 'aNewIndex'. The item previously at index (if any) and everything below it will have been shifted down by one. The item may be a container or a leaf.

Arguments:
parent
item
newIndex

void itemMoved ( nsINavHistoryResultNode item , nsINavHistoryContainerResultNode oldParent , PRUint32 oldIndex , nsINavHistoryContainerResultNode newParent , PRUint32 newIndex )

Called whan 'aItem' is moved from 'aOldParent' at 'aOldIndex' to newParent at newIndex. The item may be a container or a leaf.

XXX: at the moment, this method is called only when an item is moved within the same container. When an item is moved between containers, a new node is created for the item, and the itemRemoved/itemAdded methods are used.

Arguments:
item
oldParent
oldIndex
newParent
newIndex

void itemRemoved ( nsINavHistoryContainerResultNode parent , nsINavHistoryResultNode item , PRUint32 oldIndex )

Called whan 'aItem' is removed from 'aParent' at 'aOldIndex'. The item may be a container or a leaf. This function will be called after the item has been removed from its parent list, but before anything else (including NULLing out the item's parent) has happened.

Arguments:
parent
item
oldIndex

void itemReplaced ( nsINavHistoryContainerResultNode parent , nsINavHistoryResultNode oldItem , nsINavHistoryResultNode newItem , PRUint32 index )

Called when an item is being replaced with another item at the exact same position.

Arguments:
parent
oldItem
newItem
index

void sortingChanged ( PRUint16 sortingMode )

This is called to indicate to the UI that the sort has changed to the given mode. For trees, for example, this would update the column headers to reflect the sorting. For many other types of views, this won't be applicable.

This only is expected to update the sorting UI. invalidateAll() will also get called if the sorting changes to update everything.

Arguments:
sortingMode: One of nsINavHistoryQueryOptions.SORT_BY_* that indicates the new sorting mode.

References

This interface is the type of the following properties:

nsINavHistoryResult.viewer

Reference documentation is generated from Mozilla's source.