Ellié Computing Home Page
My Shopping Cart

Your shopping cart is empty

Display Cart

Call us at +1 586 62 ELLIE / +1 586 62 35543 Office Closed
sales@elliecomputing.com - Contact us


BinaryDocument.Selection object

 

 

Prototype for BinaryDocument.Selection objects. Is a kind of Document.Selection.

Syntax

You can create a selection of a whole binary document content this way (in this case, the content of the left side):

var selection = new BinaryDocument.Selection (my_doc.contents.left);

You can create a partial selection of a text document content this way:

var selection = new BinaryDocument.Selection (my_doc.contents.left, LinearRange (start, length));

Parameters

content. BinaryDocument.Content object. Content to be selected.
range. LinearRange object or Array of LinearRange objects. Range or ranges of content to be selected. If the value for this parameter is omitted, the whole content is selected.

Property Of

BinaryDocument object.

Implemented In

ECMerge 2.4

Description

BinaryDocument.Selection object defines a portion of text within a given content (and as such a given side/role for the comparison). Selections are used in several places to retrieve binary text or set the current selection of a view.

Properties

Property Description
ranges Array of LinearRange objects. Ranges of bytes contained by the selection.

 

Methods

 none specific.

Examples

Example 1.

Obtaining the text of the current selection in current view:

var sel = current_frame.coordinator.current_view.clone_selection();
alert ( "The text in the selection is:" + current_frame.coordinator.document.content[current_frame.coordinator.current_view.role].get_text(sel) );

See Also 

Document.Selection object, BinaryDocument.Content object,  BinaryDocument.View object.