Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5b

Application v 5.24b

  

 

Chapter TwentyPageView Integration

20.1 Page View

20.1.1 Overview

The Page View module handles HTML editing in page display mode as a word processor. There are direct API access functions for reading and writing data, controlling the editor and performing other tasks. In addition, Page View allows for script hooks during various operations.

Page View is an edit view attached to a Mapped Text Object and usually an HTML or related file. In addition, Page View usually paired with a Code View:

Each view will have its own Edit Object (positions and select) and share the same Mapped Text Object and Edit File (if opened from a file). See Section 19.1 Text View for more information on the Code View section.

The Mapped Text Object can be retrieve and used to read the contents of the edit file. Programmers should not directly alter the Mapped Text without going through the Edit Object. Transaction processing, and therefore undo, will automatically be processed through the Edit Object.

20.1.2 Related Functions

Most of the functions that apply are covered in other sections but are listed here.

Page View Specific Functions:

PageViewOpenFile — Open a file in a page view mode. Optional file type, display flags and alias name.

Edit Objects:

GetCaretXPosition — Return the current caret X position (column position) in native or realized position.

GetCaretYPosition — Return the current caret Y position (line position).

GetEditObjectChangeCount — Returns the number of pending changes or total changes, if flag is TRUE.

GetEditObjectElapsedTime — Returns the elapsed time in seconds since opened.

GetEditObjectName — Return the edit object/window name (source file or object).

GetEditObjectType — Return the edit/object window type.

GetSelectClue — Return the select clue.

GetSelectCount — Return the number of selected items (if the mode is array).

GetSelectEndXPosition — Return the select end X position.

GetSelectEndYPosition — Return the select end Y position.

GetSelectMode — Return the current select mode.

GetSelectStartXPosition — Return the select start X position.

GetSelectStartYPosition — Return the select start X position.

SetCaretPosition — Sets the caret position (updated on CloseHandle or UpdateEditWindow).

SetSelectArea — Sets the select area as one group are or an array or groups.

SetSelectClue — Sets the select clue.

SetSelectMode — Sets the select mode.

Mapped Text Objects:

GetMappedTextEncoding — Returns the encoding for a Mapped Text Object.

GetMappedTextEncodingString — Returns the encoding for a Mapped Text Object as a string.

GetMappedTextFilename — Returns the name of the file associated with a Mapped Text Object.

ReadLine — Reads the next line of data from a Basic File or Pool Object, or, reads a specified line from a Mapped Text or Edit Object.

WriteSegment — Writes a segment of string data to a Mapped Text or Edit Object at an optional specified position.