Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5d

Application v 5.25a

  

 

Chapter TwentyPageView Integration (continued)

PageViewOpenFile Function

Overview

The PageViewOpenFile function opens an MDI split view filing for viewing and editing as HTML in page layout mode. As part of Page View window, the second (lower) edit client is a Code View editor.

Syntax/Parameters

Syntax

handle = PageViewOpenFile ( string source, [dword type], [dword display], [string alias] );

Parameters

source

A string containing a qualified filename or a URL.

type

An optional dword specifying an override file type. If omitted, the script will attempt to identify the file type and use that type. The default is FT_HTML.

display

An optional dword as display flags. Presently ignored, reserved for future releases. See remarks.

alias

A string that when specified becomes the alias name of the window. This is useful when opening a temp file version of another file. The alias can be the name displayed on the tab while contents of the source file is being displayed and edited.

Return Value

A window handle or NULL_HANDLE (0) if there is an error. Use the GetLastError function to retrieve a formatted error code. The value is the handle to the MDI container window for all views displayed and can be used to access other window functions. This handle is not a script object and does not need to be closed.

If the view is opened, the Edit Manager entry index can be retrieved by using the GetLastError function.

Remarks

If the application desktop is not running, the function will fail by returning NULL_HANDLE with a last error of ERROR_CONTEXT. If the host application does not support this feature, the last error will be ERROR_CANCEL.

The default style for a text view is split edit windows in a single MDI view. This function differs from running a FILE_OPEN from the RunMenuFunction in that is provides direct access to the Page View manager.

Special HTML conditions and user notifications are suppressed. For example, if an HTML file is opened from Microsoft Word, a warning will not be presented. Further, for files with excessively long lines of code, they will be automatically rewrapped.

Related Functions

Platform Support

Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL