Here are the built-in functions implemented by the front end in the "standard" module. Additional modules and functions are available for front ends, but are specific to the front-end type.
The names of front-end functions and pre-defined arguments are case-sensitive.
Adds the text passed as an argument to the content of the clipboard of the front-end platform:
ui.Interface.frontCall("standard","cbadd", [text], [result])
text = text to be added
result = variable that holds results of the function execution (1
= success, 0
= error)
Clears the content of the clipboard:
ui.Interface.frontCall("standard","cbсlear", [], [result])
result = variable that holds results of the function execution (1
= success, 0
= error)
Takes no input arguments.
Returns the current content of the clipboard:
ui.Interface.frontCall("standard","cbget", [], [text])
text = text found in the clipboard
Takes no input arguments.
Pastes the content of the clipboard to the current field:
ui.Interface.frontCall("standard","cbpaste", [], [result])
result = variable that holds results of the function execution (1
= success, 0
= error)
Takes no input arguments.
Sets the content of the clipboard:
ui.Interface.frontCall("standard","cbset", [text], [result])
text = text to be set
result = variable that holds results of the function execution (1 = success, 0 = error)
The text is passed as argument.
Returns a front-end property value (according to the property name passed as the argument):
ui.Interface.frontCall("standard","feinfo", [name], [result])
name = name of the property
result = variable that holds results of the function execution (1
= success, 0
= error)
fename |
returns the name of the front end |
fepath |
returns the installation directory of the front-end executable |
ostype |
returns the type of the operating system installed on the client's host (can be Windows, OSX, HPUX, AIX®, SOLARIS, Linux) |
osversion |
returns the current version of the operating system installed on the client's host |
numscreens |
returns the number of screens available on the front-end platform (typically, 1) |
screenresolution |
returns the screen resolution of the front-end platform (with a screen number as optional argument). For mobile devices, the value can change depending on the device orientation |
ip |
returns the IP address of the network interface used for GUI connection |
datadirectory |
returns the directory name that can be used to transfer temporary files. This directory is common to all front-end instances and is cleaned when the front-end instance starts and ends |
target |
returns the target code name for the build platform, identifying the operating system at which the front-end binary code was compiled. This front call serves for debugging purpose; it can change if the target OS changes (e.g. after version upgrades) |
isActiveX |
returns TRUE when the front-end runs in Active X mode (LyciaDesktop) |
outputmap |
returns the output map for the current application run by LyciaWeb |
Returns the environment variable set in the user session on the front-end platform:
ui.Interface.frontCall("standard","getenv", [name], [value])
name = name of the environment variable
value = value of the environment variable.
Returns the local identifier that corresponds to the AUI window id passed as an argument, in the window manager where the front end is displaying application forms:
ui.Interface.frontCall("standard","getwindowid", [aui-win-id], [loc-win-id])
aui-win-id = id of the window node in the AUI tree:
OPEN WINDOW aui-win-id AT 5, 2 WITH 20 ROWS, 80 COLUMNS
loc-win-id = id of the window in the window manager where the front end is running
The node id must refer to a Window node: Otherwise, 0 is returned.
In the traditional mode, window widgets are simple frames.
Use 0 as an aui-win-id argument to get the top level window id in the local windowing system.
LyciaDesktop, LyciaWeb: server responds without requesting the client side
Opens an URL with the default URL handler available on the front-end platform.
This is typically a web browser for HTTP: URLs, or the mailer for "mailto:" URLs, but the corresponding application may also be dedicated to the object type specified by the URL:
ui.Interface.frontCall("standard","launchurl", [url [,mode]], [])
url = URL to invoke
mode (optional) = front end specific meaning
launchurl is a powerful feature: Front-end applications can register themselves as URL handlers. So you can start applications on the front end through the lauchurl front call.
Opens a file dialog window on the local file system where the end user can enter a directory path:
ui.Interface.frontCall("standard","opendir", [path,caption], [result])
path = default path
caption = caption to be displayed
result = name of the selected directory (or NULL if canceled)
If the user cancels the dialog, the front-call returns NULL for result.
Allows opening existing files: A file dialog window on the local file system is opened where the end user can enter the file path:
ui.Interface.frontCall("standard","openfile", [path,name,filetype,caption], [result])
path = default path
name = name to be displayed for the file type
filetype = file types (as a blank separated list of extensions)
caption = caption to be displayed
result = name of the selected file (or NULL if canceled)
If the user cancels the dialog, the front-call returns NULL for result.
Allows saving new files: A file dialog window on the local file system is opened where the end user can enter the file path:
ui.Interface.frontCall("standard","savefile", [path,name,filetype,caption], [result])
path = default path
name = name to be displayed for the file type
filetype = file types (as a blank separated list of extensions)
caption = caption to be displayed
result = name of the selected file (or NULL if canceled)
If the user cancels the dialog, the front-call returns NULL for result.
Defines the basic URL to find gICAPI web components files:
ui.Interface.frontCall("standard","setwebcomponentpath", [url], [])
url = basic URL to the web-component file:
For example, when web-component file is located in QUERIX_DIR/progs/wc02_action folder (web-component file should be present in program sources)
LET url ="http://localhost:9090/LyciaWeb/res/default/wc02_action"
LET url ="qx://application/wc02_action"
Opens a file on the front-end platform with the program associated with the file extension:
ui.Interface.frontCall("standard","shellexec", [document,action], [result])
document = document file to be opened
action (optional, ) = action to perform, related to the way the file type is registered in Windows Registry
result = variable that holds results of the function execution (1
= success, 0
= error)
To view documents which can be displayed by web browsers, it is better to use launchurl instead.
execute
Will execute a command on the workstation with or without waiting:
ui.Interface.frontCall("standard", "execute", [cmd, wait], [result])
cmd = command to be executed
wait = wait option (TRUE=wait, FALSE=do not wait)
result = variable that holds results of the function execution (1
= success, 0
= error)
If the second argument is set to 1 (TRUE), the runtime system will wait until the front end gives the control back after the local command was executed.
hardcopy
Will prints a screen shot of the current window:
ui.Interface.frontCall("standard", "hardcopy", [pgsize], [result])
pgsize = pass 1 to adapt the screen shot to the page size
result = variable that holds results of the function execution (1
= success, 0
= error)
pgsize is optional: Either leave out, or enter 1 to indicate that the screen shot must be adapted to the page size.
mdclose
Will unload a DLL or shared library front-call module:
ui.Interface.frontCall("standard", "mdclose", [name], [result])
name = name of the module to be closed
result = variable that holds results of the function execution (0 = success, -1 = module not found, -2 = cannot unload, busy)
Front call modules are loaded on demand.
After calling a function of a specific module, you can use mdclose to unload the shared library and save resources.
playsound
Will open the sound file passed as argument and plays the sound on the front end:
ui.Interface.frontCall("standard", "playsound", [text], [])
filename = sound file to play
If the file is not located on the front end, it will be automatically transferred to the front end through the file-transfer facility.
Supported sound formats depend on the front-end infrastructure (platform, technology, web browser, etc.).
setreportprinter
Will allow overriding the printer configuration used for report generation for the current application:
ui.Interface.frontCall("standard", "setreportprinter", [printer], [result])
printer = string describing the printer to be used for report generation
result = variable that holds results of the function execution (1
= success, 0
= error)
Printer argument is a string that describes the printer to be used for report generation:
ui.Interface.frontCall("standard", "setreportprinter", [moliere, Portrait, A4, 96 dpi, 1 copy, Ascendent, Color, Auto], [result])
setreportfont
Will allow overriding the font used for report generation for the current application:
ui.Interface.frontCall("standard", "setreportfont", [font], [result])
font = string describing the font to be used for report generation
result = variable that holds results of the function execution (1
= success, 0
= error)
Font argument is a string that describe the font to be used for report generation:
ui.Interface.frontCall("standard", "setreportfont", [Helvetica, Bold, Italic, 13], [true])