Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

nsINavHistoryResultViewer

Os nossos voluntários ainda não traduziram este artigo para Português (Europeu) . Junte-se a nós e ajude-nos a fazer o trabalho!

Lets nsINavHistoryResult instances notify Places views of changes in the results. Removed in Gecko 2.0 and replaced with the nsINavHistoryResultObserver interface, which is similar but allows multiple clients to observe the result at once.
1.0
39
Introduced
Gecko 1.9
Obsolete
Gecko 2.0
Inherits from: nsISupports Last changed in Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0)
 

Obsolete since Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.

Note: Most methods in this interface were renamed in Gecko 1.9.2, and others have slightly different parameter lists.

Method overview

void containerClosed(in nsINavHistoryContainerResultNode aContainerNode);
void containerOpened(in nsINavHistoryContainerResultNode aContainerNode);
void invalidateContainer(in nsINavHistoryContainerResultNode aContainerNode);
void nodeAnnotationChanged(in nsINavHistoryResultNode aNode, in AUTF8String aAnnoName);
void nodeDateAddedChanged(in nsINavHistoryResultNode aNode, in PRTime aNewValue);
void nodeLastAddedChanged(in nsINavHistoryResultNode aNode, in PRTime aNewValue);
void nodeHistoryDetailsChanged(in nsINavHistoryResultNode aNode, in PRTime aNewVisitDate, in unsigned long aNewAccessCount);
void nodeIconChanged(in nsINavHistoryResultNode aNode);
void nodeKeywordChanged(in nsINavHistoryResultNode aNode, in AUTF8String aNewKeyword);
void nodeMoved(in nsINavHistoryResultNode aNode, in nsINavHistoryContainerResultNode aOldParent, in unsigned long aOldIndex, in nsINavHistoryContainerResultNode aNewParent, in unsigned long aNewIndex);
void nodeTitleChanged(in nsINavHistoryResultNode aNode, in AUTF8String aNewTitle);
void nodeRemoved(in nsINavHistoryContainerResultNode aParent, in nsINavHistoryResultNode aNode, in unsigned long aOldIndex);
void nodeTagsChanged(in nsINavHistoryResultNode aNode);
void nodeURIChanged(in nsINavHistoryResultNode aNode, in AUTF8String aNewURI);
void nodeReplaced(in nsINavHistoryContainerResultNode parent, in nsINavHistoryResultNode oldItem, in nsINavHistoryResultNode newItem, in unsigned long index);
void nodeInserted(in nsINavHistoryContainerResultNode aParent, in nsINavHistoryResultNode aNode , in unsigned long aNewIndex);
void sortingChanged(in unsigned short sortingMode);

Attributes

Attribute Type Description
result nsINavHistoryResult The nsINavHistoryResult this viewer monitors. Although this attribute is read-write, you should not alter it directly; instead, use the nsINavHistoryResult.viewer attribute to set the viewer.

Methods

containerClosed()

Called when a container node's state changes from closed to opened.

 void containerClosed(
   in nsINavHistoryContainerResultNode aContainerNode
 );
Parameters
aContainerNode
The container node whose state changed.

containerOpened()

Called when a container node's state changes from closed to opened.

 void containerOpened(
   in nsINavHistoryContainerResultNode aContainerNode
 );
Parameters
aContainerNode
The container node whose state changed.

invalidateContainer()

Called when something has happened that requires that the contents of a container be rebuilt.

void invalidateContainer(
  in nsINavHistoryContainerResultNode aContainerNode
);
Parameters
aContainerNode
The container that should be rebuilt.

nodeAnnotationChanged()

Called right after the annotation on a node has changed. This is called when the annotation is changed, set, or unset.

void nodeAnnotationChanged(
  in nsINavHistoryResultNode aNode,
  in AUTF8String aAnnoName
); 
Parameters
aNode
The node whose title has changed.
aAnnoName
The name of the annotation that hanged.

nodeDateAddedChanged()

Called right after the date added property of a node has changed.

void nodeKeywordChanged(
  in nsINavHistoryResultNode aNode,
  in PRTime aNewValue
); 
Parameters
aNode
The node whose title has changed.
aNewValue
The new value for the node's date added property.

nodeLastModifiedChanged()

Called right after the last modified date property of a node has changed.

void nodeKeywordChanged(
  in nsINavHistoryResultNode aNode,
  in PRTime aNewValue
); 
Parameters
aNode
The node whose title has changed.
aNewValue
The new value for the node's last modified property.

nodeHistoryDetailsChanged()

Called right after a node's last access time or access count has changed.

void nodeHistoryDetailsChanged(
  in nsINavHistoryResultNode aNode,
  in PRTime aNewVisitDate,
  in unsigned long aNewAccessCount
); 
Parameters
aNode
The node whose details have changed.
aNewVisitDate
The new value for the last visit date and time for the node.
aNewAccessCount
The new access count value for the node.

nodeIconChanged()

Called right after the icon of a node has changed.

void nodeIconChanged(
  in nsINavHistoryResultNode aNode
); 
Parameters
aNode
The node whose icon has changed.

nodeKeywordChanged()

Called right after the keyword property of a node has changed.

void nodeKeywordChanged(
  in nsINavHistoryResultNode aNode,
  in AUTF8String aNewKeyword
); 
Parameters
aNode
The node whose title has changed.
aNewTitle
The new value for the node's keyword property.

nodeMoved()

Called when a node is moved from aOldParent at aOldIndex to aNewParent at aNewIndex. The item may be a container or a leaf.

void itemMoved(
  in nsINavHistoryResultNode aNode,
  in nsINavHistoryContainerResultNode aOldParent,
  in unsigned long aOldIndex,
  in nsINavHistoryContainerResultNode aNewParent,
  in unsigned long aNewIndex
);
Parameters
aNode
The moved item.
aOldParent
The item's old parent.
aOldIndex
The item's index in the old parent.
aNewParent
The item's new parent.
aNewIndex
The item's index in the new parent.
Remarks

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.

nodeTitleChanged()

Called right after the title of a node has changed.

void nodeTitleChanged(
  in nsINavHistoryResultNode aNode,
  in AUTF8String aNewTitle
); 
Parameters
aNode
The node whose title has changed.
aNewTitle
The new title of the node.

nodeURIChanged()

Called right after the URI of a node has changed.

void nodeURIChanged(
  in nsINavHistoryResultNode aNode,
  in AUTF8String aNewURI
); 
Parameters
aNode
The node whose title has changed.
aNewURI
The node's new URI.

nodeRemoved()

Called when a node is removed from a container.

 void itemRemoved(
   in nsINavHistoryContainerResultNode aParent,
   in nsINavHistoryResultNode aNode,
   in unsigned long aOldIndex
 );
Parameters
parent
The container from which the item was removed.
item
The item that was removed from the container. It may be either a container or a leaf.
oldIndex
The index from which the item was removed.
Remarks

This method is called after the item has been removed from the parent, but before any other action is taken (including zeroing out the item's parent reference).

nodeTagsChanged()

Called right after a node's tags have changed.

void nodeTagsChanged(
  in nsINavHistoryResultNode aNode
); 
Parameters
aNode
The node whose tags have changed.

nodeReplaced()

Called when a node is being replaced with another node at the same location.

 void nodeReplaced(in nsINavHistoryContainerResultNode aParentNode,
   in nsINavHistoryResultNode aOldNode,
   in nsINavHistoryResultNode aNewNode,
   in unsigned long aIndex
 );
Parameters
aParentNode
The container in which the item is being replaced.
aOldNode
The item being replaced.
aNewNode
The node replacing the aOldNode.
aIndex
The index at which the node is located in the container.

nodeInserted()

Called when an item is inserted into a container.

 void nodeInserted(
   in nsINavHistoryContainerResultNode aParent,
   in nsINavHistoryResultNode aNode,
   in unsigned long aNewIndex
 );
Parameters
aParent
The container into which to insert the item.
aNode
The node to insert into the container; it may be either a leaf or another container.
aNewIndex
The index at which to insert the item.
Remarks

The item previously at the specified index (if any) as well as everything below it, is shifted down by one.

sortingChanged()

Called when the sorting order is changed to a particular mode. For trees, this would update the column headers to reflect the altered sorting.

 void sortingChanged(
   in unsigned short sortingMode
 );
Parameters
sortingMode
One of the nsINavHistoryQueryOptions.SORT_BY_* constants, indicating the softing mode.
Remarks

This method is only called to update the sorting user interface. [#invalidateAll()] is called as well if the sorting changes, in order to cause the contents to update properly.

See also

nsINavHistoryResult, nsITreeView, Displaying Places information using views

Etiquetas do documento e colaboradores

 Colaboradores para esta página: teoli, fscholz, Sheppy, adw
 Última atualização por: fscholz,