Name
canvas (LzCanvas) — The top-most view in a Laszlo application.
Description
The canvas is the container for all views within an application.
The LzCanvas
class represents the viewable
area of the application. There is one instance of
LzCanvas
, named canvas
. The
canvas contains all views within an application.
The canvas
tag is the document root of an LZX
application file. It contains class, resource, and font definitions,
library includes, and view and other instances.
See the Guide
for a complete discussion of the canvas
tag.
In addition to any events documented in the section below, these events are also available:
oninit
This event is sent right before a node becomes active
-- e.g. before a view displays, or before a layout affects its
subviews.
In addition to any fields documented in the section below, these fields are also available:
String
build
: build number of the LPS that generated this application (for .lzo files,
this is the build of the server that generated the optimized file, not the
one that served it).
String
expires
: expiration date of this LPS application (based on expiry of server that generated
the application, not the one that served it).
Details
Static Methods (1)
-
versionInfoString()
-
<method name="versionInfoString" />
static public function versionInfoString();
Compute version info as a string
Initial Attributes (2)
Initial Attributes are given as attributes in LZX but are not generally available as properties in JavaScript.
-
accessible
-
<attribute name="accessible" type="boolean" />
Specifies if this application is intended to be accessible
-
debug
-
<attribute name="debug" type="boolean" />
If true, the application is compiled with debugging enabled.
See the
Debugging chapter of
the Guide for more information about debugging.
Properties (10)
-
dataloadtimeout
-
<attribute name="dataloadtimeout" type="numberExpression" />
public var dataloadtimeout : Number = 30000;
If present, specifies the default timeout in milliseconds of data load requests
-
datasets
-
<attribute name="datasets" type="object" />
public var datasets : Object;
Dictionary of all named datasets.
-
initdelay
-
<attribute name="initdelay" />
public var initdelay = 0.0;
-
lpsrelease
-
<attribute name="lpsrelease" type="string" />
public final var lpsrelease : String;
release of the LPS that generated this application (for .lzo files,
this is the release of the server that generated the optimized file, not the one that
served it).
-
lpsversion
-
<attribute name="lpsversion" type="number" />
public final var lpsversion : Number;
version number of the LPS that generated this application (for .lzo files,
this is the version number of the server that generated the optimized file, not the one
that served it).
-
medialoadtimeout
-
<attribute name="medialoadtimeout" type="numberExpression" />
public var medialoadtimeout : Number = 30000;
If present, specifies the default timeout in milliseconds of media load requests
-
nodeLevel
-
<attribute name="nodeLevel" />
public var nodeLevel = 0.0;
-
percentcreated
-
<attribute name="percentcreated" />
public var percentcreated;
A number from 0-1 that represents the
percentage of the app that has been instantiated.
-
proxied
-
<attribute name="proxied" type="inheritableBooleanLiteral" value=""inherit"" />
public var proxied : Boolean;
If true, requests for data and media are proxied through LPS server.
if false, requests are made directly to target URLs.
if inherit, inherit from lzproxied query arg.
-
version
-
<attribute name="version" type="string" value=""1.1"" />
public var version : Number;
The lpsversion of this lzx application.
Methods (3)
-
compareVersion()
-
<method name="compareVersion" args="ver, over" />
public function compareVersion(ver, over);
Compares two version strings.
-
initialize()
-
<method name="initialize" args="args" />
public function initialize(args);
-
setDefaultContextMenu()
-
<method name="setDefaultContextMenu" args="cmenu" />
public function setDefaultContextMenu(cmenu : LzContextMenu);
LzView.setDefaultContextMenu
Install default menu items for the right-mouse-button
Events (4)
-
onmousedown
-
<attribute name="onmousedown" />
public event onmousedown;
Sent whenever the mouse button goes down
-
onmousemove
-
<attribute name="onmousemove" />
public event onmousemove;
Sent whenever the mouse moves
-
onmouseup
-
<attribute name="onmouseup" />
Sent whenever the mouse button goes up
-
onpercentcreated
-
<attribute name="onpercentcreated" />
public event onpercentcreated;
Sent whenever the number of created nodes changes
LZX Synopsis
<class name="
LzCanvas" extends="
LzView
">
<attribute name="
datasets
" type="
object" />
<attribute name="
proxied
" type="
inheritableBooleanLiteral" value="
"inherit"" />
<attribute name="
version
" type="
string" value="
"1.1"" />
</class>
JavaScript Synopsis
public
LzCanvas extends
LzView
{
}