nsINavHistoryResult
From MDC
nsINavHistoryResult describes the result of a history or bookmark query.
Places results use a Model-View-Controller (MVC) design pattern. Result objects represent the model in which the data is stored. External components provide the view and controller pieces of the puzzle; they define how the data looks and how the data is interacted with. More specifically, the nsINavHistoryResultViewer interface provides the View component of the pattern, and nsINavHistoryResultViewObserver is the Controller.
The result indicates to the view when something changes by using the nsINavHistoryResultViewer interface. Viewers register themselves through the nsINavHistoryResult.registerViewer() method. The viewer then tells the actual view object what to do.
You can use nsINavHistoryResultTreeViewer as the viewer; this provides a prepackaged interaction with a nsiTreeBoxObject. If you need a different view, you'll need to create your own viewer interface.
The viewer provides notifications to the controller when view events occur; this is done using the nsINavHistoryResultViewObserver interface.
Contents |
nsINavHistoryResultTreeViewer is defined in toolkit/components/places/public/nsINavHistoryResult.idl. It is scriptable and
unfrozen (hasn't changed since Mozilla 1.9).
Inherits from: nsISupports
[edit] Attributes
| Attribute | Type | Description |
sortingMode
| unsigned short
| Specifies the sorting mode for the result. This value must be one of nsINavHistoryQueryOptions.SORT_BY_*. Changing this value updates the corresponding options for the result so that reusing the current options and queries will always return results based on the current view.
|
sortingAnnotation
| AUTF8String
| The annotation to use in SORT_BY_ANNOTATION_* sorting modes; you must set this value before setting the sortingMode attribute.
|
viewer
| nsINavHistoryResultViewer
| The viewer for this result. The viewer is responsible for actually updating the view object itself, as well as for handling events on the view. |
root
| nsINavHistoryContainerResultNode
| The root of the results. This container gives you access to all the results in the tree.
Note: Keep in mind that you need to open containers for their results to be valid.
|