Prototype for FolderDocument.View objects. Is a kind of View object.
You cannot create View object directly. Views are created as necessary when DocumentFrame objects are created for a document.
var my_doc;
var doc_frame = add_frame (my_doc);
var left_view = doc_frame.coordinator.views.left;
none.
none.
ECMerge 2.1
FolderDocument.View objects let you navigate to a given item, obtain the selection or set it.
none specific.
clone_selection
navigate
set_selection
Sets the selection to the current one with an additional item called "/path/file.txt":
var sel =
current_frame.coordinator.current_view.clone_selection();
sel.add ("/path/file.txt");
current_frame.coordinator.current_view.set_selection
(sel);
FolderDocument object, FolderDocument.Selection object
function clone_selection ( )
returns a
FolderDocument.Selection
object.
none.
FolderDocument.View object
ECMerge 2.1
Returns a new selection object which contains the same elements as those selected in the view.
Retrieves the selection of the current view:
current_frame.coordinator.current_view.clone_selection();
FolderDocument.View object, FolderDocument.Selection object
function navigate (item)
item. FolderDocument.Item object. item to which the view should navigate.
FolderDocument.View object
ECMerge 2.1
Opens folders as necessary then set the current position and selection of the view to the given item.
Navigate to the first item inside the root:
var current_doc = current_frame.coordinator.document;
current_doc.root.children.fill ();
if (current_doc.root.children.length > 0)
current_frame.coordinator.current_view.navigate
(current_doc.root.children[0]);
FolderDocument.View object, FolderDocument.Item object
function set_selection (selection)
selection. FolderDocument.Selection object. Selection to set on the view
FolderDocument.View object
ECMerge 2.1
Selects in the view exactly the same items as those included in selection.
Builds a selection containing all the items, then set it on the view (actually selecting all items):
var current_doc = current_frame.coordinator.document;
var sel = new FolderDocument.Selection (current_doc,
true);
current_frame.coordinator.current_view.set_selection
(sel);
FolderDocument.View object, FolderDocument.Selection object