Prototype for BinaryDocument.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.4
BinaryDocument.View objects let you navigate by byte position, obtain the selection or set it.
none specific.
clone_selection
navigate
set_selection
Set the selection on current view to the whole content.
current_frame.coordinator.current_view.set_selection (new BinaryDocument.Selection (current_frame.coordinator.document.content.left);
View object, DocumentFrame object
function clone_selection ( )
returns a
BinaryDocument.Selection
object.
none.
BinaryDocument.View object
ECMerge 2.4
Returns a new selection object which contains the same bytes as those selected in the view.
Retrieves the selection of the current view:
current_frame.coordinator.current_view.clone_selection();
BinaryDocument.View object, BinaryDocument.Selection object
function navigate (position)
position. Integer. Byte position in the given view
BinaryDocument.View object
ECMerge 2.4
Set the cursor position to the given position, and ensures that it is visible in the view.
Navigate to the start of 100 th byte of the file:
var current_doc = current_frame.coordinator.document;
current_frame.coordinator.current_view.navigate
(100);
BinaryDocument.View object
function set_selection (selection)
selection. BinaryDocument.Selection object. Selection to set on the view
BinaryDocument.View object
ECMerge 2.4
Selects in the view exactly the same characters as those included in selection.
Builds a selection containing all the binary file, then set it on the view (actually selecting all bytes):
var current_doc = current_frame.coordinator.document;
var side = current_frame.coordinator.current_view.role;
var sel = new BinaryDocument.Selection
(current_doc.content[side], LinearRange(0,
current_doc.content[side].length));
current_frame.coordinator.current_view.set_selection
(sel);
BinaryDocument.View object, BinaryDocument.Selection object