Sfairadora

  • Reference Guide

Document_settings

The type of the item document.settings. It corresponds to the document section Settings.
Type
Name
Description
Byte
document_type
The type of the document. One of the following constants:
DOCUMENT_TYPE_STANDARD
Standard document.
DOCUMENT_TYPE_SINGLE
DOCUMENT_TYPE_TEMPLATE
DOCUMENT_TYPE_TOOL_SET
DOCUMENT_TYPE_FILE_MANIPULATOR
Atom optional
parent_data_id
The identifier of the master document. If not set, the value "master" is set. Applicable to tool sets.
String const
file_name
The full name of the file in which the document is stored (a read only value).
(see below) optional
file_manipulator_info
If the document is a file manipulator, information specific to a file manipulator is stored here.
Enki optional
on_load
The function invoked synchronously after reading the document from the file.
Enki optional
program
The function executed asynchronously while the document is open.
Enki optional
on_close
The function invoked synchronously before closing the document.
Enki optional
updater
Used internally.
Bool
main_window_principal
If set TRUE, closing the main window closes entire document.
Inherited value of the type Int
code_page
The code page for strings contained in the document.
Inherited value of the type Int
language
The language of the document. One of the language constants.
Seq(style) unicity: name
styles
The text style table of the document. Corresponds to the window Text Formatting Styles.
The elements of the sequence are named with the names of the styles they define. Thus, it is possible to write for instance:
document.settings.styles.display_label_text
(where display_label_text is the name of the style used to draw text labels.)
see page
page
The page size used to print texts from the document.
see signs
signs
The symbol settings.

file_manipulator_info

Type
Name
Description
String
name
The name under which the file manipulator is listed in the menu File|New and in the File type list in the file open dialog.
Seq(file format)
(see below)
formats
The list of the file formats to which the file manipulator is applicable.
Enki
read_file
The function reading the data from the file. It receives a string parameter file_name containing the full path to the file to be opened. The Enki language file manipulation functions are used to open and read the file.
Enki
write_file
The function writing the data to the file. Analogical to read_file.
Enki
init_empty
The function invoked when a new document is created using the file manipulator through the menu File|New.
String
current_manipulator
If a document is open using a file manipulator, the full path to the manipulator is stored here.
String
current_format
If a document is open using a file manipulator, the extension of the file name from which the document has been read is stored here.

File Format

Type
Name
Description
String
name
The name of the file format in the form displayed to user.
Bool
default
If set TRUE, this file manipulator is the default manipulator for the file type. It is used when more than one file manipulator handles the same file format.
Seq(String)
extensions
The list of file extensions associated with the file format. The extensions are listed without the leading dot (e.g. "jpg" for JPEG).