The nsIPlacesView
interface provides a view-agnostic way to access information about a Places view.
For example, the representation of selection differs between trees, menus, and other such lists. Controllers should not be concerned with these details; controller code should not be required to decode the meaning of a selection depending on what kind of view produced the selection. Rather, each view is responsible for translating its own selection format into one the controller can understand. Views do this, and other things, by implementing the nsIPlacesView
interface.
nsIPlacesView
does not exist in IDL at the moment. It's currently implemented directly on each of the built-in Places views.nsINavHistoryResultNode[] getDragableSelection (); |
nsINavHistoryResultNode[][ ] getRemovableSelectionRanges (); |
nsINavHistoryResult getResult (); |
nsINavHistoryContainerResultNode getResultNode (); |
nsINavHistoryResultNode[] getSelectionNodes (); |
void selectAll(); |
Attribute | Type | Description |
hasSelection |
boolean |
Whether or not there are selected items. Read only. |
insertionPoint |
InsertionPoint |
The InsertionPoint at which new items will be inserted upon drop, paste, or creation. Read only. |
place |
string |
TheURI (as a string) of the root Place that the view displays. This may be modified dynamically to update the view. See Displaying Places information using views for examples. |
selectedNode |
nsINavHistoryResultNode |
The selected node in the view. If there are multiple selected nodes, this is null. Read only. |
Returns an array of selected nsINavHistoryResultNode
objects that can be dragged from the view.
nsINavHistoryResultNode[] getDragableSelection();
None.
An array of nsINavHistoryResultNode
objects.
Returns an array whose elements are themselves arrays of nsINavHistoryResultNode
objects that can be removed from the view. Each inner array represents a contiguous range of nodes that can be removed.
nsINavHistoryResultNode[][] getRemovableSelectionRanges();
None.
An array of arrays of nsINavHistoryResultNode
objects.
Returns the nsINavHistoryResult
object that the view displays.
nsINavHistoryResult getResult();
None.
The nsINavHistoryResult
object that the view displays.
Returns the root node, an nsINavHistoryContainerResultNode
object, of the view's result.
nsINavHistoryContainerResultNode getResultNode();
None.
The root nsINavHistoryContainerResultNode
of the view's result.
Returns an array of all currently selected nsINavHistoryResultNode
objects of the view. The nodes are not necessarily returned in the same order in which they occur in the model, or in the same container, or from the same provider.
nsINavHistoryResultNode[] getSelectionNodes();
None.
An array of nsINavHistoryResultNode
objects that are selected.
Selects all the nodes displayed in the view.
void selectAll();
None.