Struct xpcom::interfaces::nsINavHistoryResultTreeViewer [] [src]

#[repr(C)]
pub struct nsINavHistoryResultTreeViewer { /* fields omitted */ }

interface nsINavHistoryResultTreeViewer : nsINavHistoryResultObserver

/**
 * TODO: Bug 517719.
 *
 * A predefined view adaptor for interfacing results with an nsITree. This
 * object will remove itself from its associated result when the tree has been
 * detached. This prevents circular references. Users should be aware of this,
 * if you want to re-use the same viewer, you will need to keep your own
 * reference to it and re-initialize it when the tree changes. If you use this
 * object, attach it to a result, never attach it to a tree, and forget about
 * it, it will leak!
 */

Methods

impl nsINavHistoryResultTreeViewer
[src]

[src]

Cast this nsINavHistoryResultTreeViewer to one of its base interfaces.

impl nsINavHistoryResultTreeViewer
[src]

INDEX_INVISIBLE: i64 = 4294967295
/**
   * 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.
   */

[src]

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

nsINavHistoryResultNode nodeForTreeIndex (in unsigned long aIndex);

[src]

unsigned long treeIndexForNode (in nsINavHistoryResultNode aNode);

Methods from Deref<Target = nsINavHistoryResultObserver>

[src]

Cast this nsINavHistoryResultObserver to one of its base interfaces.

[src]

/**
   * 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 nodeInserted (in nsINavHistoryContainerResultNode aParent, in nsINavHistoryResultNode aNode, in unsigned long aNewIndex);

[src]

/**
   * 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 nodeRemoved (in nsINavHistoryContainerResultNode aParent, in nsINavHistoryResultNode aItem, in unsigned long aOldIndex);

[src]

/**
   * 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 nodeMoved (in nsINavHistoryResultNode aNode, in nsINavHistoryContainerResultNode aOldParent, in unsigned long aOldIndex, in nsINavHistoryContainerResultNode aNewParent, in unsigned long aNewIndex);

[src]

/**
   * Called right after aNode's title has changed.
   *
   * @param aNode
   *        a result node
   * @param aNewTitle
   *        the new title
   */

void nodeTitleChanged (in nsINavHistoryResultNode aNode, in AUTF8String aNewTitle);

[src]

/**
   * Called right after aNode's uri property has changed.
   *
   * @param aNode
   *        a result node
   * @param aNewURI
   *        the old uri
   */

void nodeURIChanged (in nsINavHistoryResultNode aNode, in AUTF8String aOldURI);

[src]

/**
   * Called right after aNode's icon property has changed.
   *
   * @param aNode
   *        a result node
   *
   * @note: The new icon is accessible through aNode.icon.
   */

void nodeIconChanged (in nsINavHistoryResultNode aNode);

[src]

/**
   * Called right after aNode's time property or accessCount property, or both,
   * have changed.
   *
   * @param aNode
   *        a uri result node
   * @param aOldVisitDate
   *        the old visit date
   * @param aOldAccessCount
   *        the old access-count
   */

void nodeHistoryDetailsChanged (in nsINavHistoryResultNode aNode, in PRTime aOldVisitDate, in unsigned long aOldAccessCount);

[src]

/**
   * Called when the tags set on the uri represented by aNode have changed.
   *
   * @param aNode
   *        a uri result node
   *
   * @note: The new tags list is accessible through aNode.tags.
   */

void nodeTagsChanged (in nsINavHistoryResultNode aNode);

[src]

/**
   * Called right after the aNode's keyword property has changed.
   *
   * @param aNode
   *        a uri result node
   * @param aNewKeyword
   *        the new keyword
   */

void nodeKeywordChanged (in nsINavHistoryResultNode aNode, in AUTF8String aNewKeyword);

[src]

/**
   * Called right after an annotation of aNode's has changed (set, altered, or
   * unset).
   *
   * @param aNode
   *        a result node
   * @param aAnnoName
   *        the name of the annotation that changed
   */

void nodeAnnotationChanged (in nsINavHistoryResultNode aNode, in AUTF8String aAnnoName);

[src]

/**
   * Called right after aNode's dateAdded property has changed.
   *
   * @param aNode
   *        a result node
   * @param aNewValue
   *        the new value of the dateAdded property
   */

void nodeDateAddedChanged (in nsINavHistoryResultNode aNode, in PRTime aNewValue);

[src]

/**
   * Called right after aNode's dateModified property has changed.
   *
   * @param aNode
   *        a result node
   * @param aNewValue
   *        the new value of the dateModified property
   */

void nodeLastModifiedChanged (in nsINavHistoryResultNode aNode, in PRTime aNewValue);

[src]

/**
   * Called after a container changes state.
   *
   * @param aContainerNode
   *        The container that has changed state.
   * @param aOldState
   *        The state that aContainerNode has transitioned out of.
   * @param aNewState
   *        The state that aContainerNode has transitioned into.
   */

void containerStateChanged (in nsINavHistoryContainerResultNode aContainerNode, in unsigned long aOldState, in unsigned long aNewState);

[src]

/**
   * Called when something significant has happened within the container. The
   * contents of the container should be re-built.
   *
   * @param aContainerNode
   *        the container node to invalidate
   */

void invalidateContainer (in nsINavHistoryContainerResultNode aContainerNode);

[src]

/**
   * 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.
   */

void sortingChanged (in unsigned short sortingMode);

[src]

/**
   * This is called to indicate that a batch operation is about to start or end.
   * The observer could want to disable some events or updates during batches,
   * since multiple operations are packed in a short time.
   * For example treeviews could temporarily suppress select notifications.
   *
   * @param aToggleMode
   *        true if a batch is starting, false if it's ending.
   */

void batching (in boolean aToggleMode);

[src]

/**
   * Called by the result when this observer is added.
   */

attribute nsINavHistoryResult result;

[src]

/**
   * Called by the result when this observer is added.
   */

attribute nsINavHistoryResult result;

Trait Implementations

impl XpCom for nsINavHistoryResultTreeViewer
[src]

IID: nsIID = nsID(4172617920, 8111, 4575, [138, 57, 8, 0, 32, 12, 154, 102])

[src]

Perform a QueryInterface call on this object, attempting to dynamically cast it to the requested interface type. Returns Some(RefPtr) if the cast succeeded, and None otherwise. Read more

impl RefCounted for nsINavHistoryResultTreeViewer
[src]

[src]

Increment the reference count.

[src]

Decrement the reference count, potentially freeing backing memory.

impl Deref for nsINavHistoryResultTreeViewer
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.