Call us at +1 586 62 ELLIE Office Opened
sales@elliecomputing.com

Newsletter
Keep up to date with the new features added to ECMerge, the new products that we release and receive special offers! (approx. once a month):
HTML version
Text version
Beta Test - Free licence
WeblogRSS 2.0
Testimonials

NewsRSS 2.0
December 12th, 2008: We just released ECMerge 2.2 beta. This version introduces several new features, from which the Launcher, automatic session, shared options, file types and numerous improvements.

November 21st, 2008: We just parametered ECMerge for a new converter (ExifTool) which extracts metadata from a large number of files types (exe, images, audio, video...), find all the need info on the converters page.
               

TextDocument.View object

 

 

Prototype for TextDocument.View objects. Is a kind of View object.

Syntax

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;

Parameters

none.

Property Of

none.

Implemented In

ECMerge 2.1

Description

TextDocument.View objects let you navigate by character position, obtain the selection or set it.

Properties

none specific.

Methods

clone_selection
navigate
set_selection

Examples

Example 1.

Set the selection on current view to the whole content.

current_frame.coordinator.current_view.set_selection (new TextDocument.Selection (current_frame.coordinator.document.content.left);

See Also 

 View object, DocumentFrame object

 

Method clone_selection

Syntax

function clone_selection ( )
returns a TextDocument.Selection object.

Parameters

none.

Method Of

TextDocument.View object

Implemented In

ECMerge 2.1

Description

Returns a new selection object which contains the same characters as those selected in the view.

Examples

Example 1.

Retrieves the selection of the current view:

current_frame.coordinator.current_view.clone_selection();

See Also 

 TextDocument.View object, TextDocument.Selection object

Method navigate

Syntax

function navigate (position)

Parameters

position. Integer. Character position in the given view

Method Of

TextDocument.View object

Implemented In

ECMerge 2.1

Description

Set the cursor position to the given position, and ensures that it is visible in the view.

Examples

Example 1.

Navigate to the start of 10th line:

var current_doc = current_frame.coordinator.document;
current_doc.root.children.fill ();
current_frame.coordinator.current_view.navigate ( current_doc.content[current_frame.coordinator.current_view.role].position_from_line (10) );

See Also 

 TextDocument.View object

Method set_selection

Syntax

function set_selection (selection)

Parameters

selection. TextDocument.Selection object. Selection to set on the view

Method Of

TextDocument.View object

Implemented In

ECMerge 2.1

Description

Selects in the view exactly the same characters as those included in selection.

Examples

Example 1.

Builds a selection containing all the text of the , then set it on the view (actually selecting all items):

var current_doc = current_frame.coordinator.document;
var side = current_frame.coordinator.current_view.role;
var sel = new TextDocument.Selection (current_doc.content[side], LinearRange(0, current_doc.content[side].length));

current_frame.coordinator.current_view.set_selection (sel);

See Also 

 TextDocument.View object, TextDocument.Selection object

Select your language English Français
© Ellié Computing 2004-2009 - Legal information - Resources