Allows clients to observe what is happening to a result as it updates itself according to history and bookmark system events. Register this observer on a result using registerView @see nsINavHistoryResult for where this fits in
[scriptable, uuid(e60f4429-3787-45c8-a8c0-18ef52621bbf)]
Attributes
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
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.
Called after a container node went from closed to opened.
Called when something significant is changing that requires everything to be recomputed. For example, changing sorting can affect every row.
Called when something significant has happened within the container. The contents of the container should be re-built.
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.
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.
void
itemInserted(in nsINavHistoryContainerResultNode aParent, in nsINavHistoryResultNode aItem, in unsigned long aNewIndex)
Called whan 'aItem' is moved from 'aOldParent' at 'aOldIndex' to aNewParent at aNewIndex. 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.
void
itemMoved(in nsINavHistoryResultNode aItem, in nsINavHistoryContainerResultNode aOldParent, in unsigned long aOldIndex, in nsINavHistoryContainerResultNode aNewParent, in unsigned long aNewIndex)
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.
void
itemRemoved(in nsINavHistoryContainerResultNode aParent, in nsINavHistoryResultNode aItem, in unsigned long aOldIndex)
Called when an item is being replaced with another item at the exact same position.
void
itemReplaced(in nsINavHistoryContainerResultNode parent, in nsINavHistoryResultNode oldItem, in nsINavHistoryResultNode newItem, in unsigned long index)
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.
@param sortingMode One of nsINavHistoryQueryOptions.SORT_BY_* that
indicates the new sorting mode.
This only is expected to update the sorting UI. invalidateAll() will also
get called if the sorting changes to update everything.