Name

canvas (LzCanvas) — The top-most view in a Laszlo application.

Synopsis

LZX: canvas
JavaScript: LzCanvas
Type: Class
Access: public
Topic: LFC.Views
Declared in: WEB-INF/lps/lfc/views/LaszloCanvas.lzs

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).

Superclass Chain

node (LzNode) » view (LzView) » canvas (LzCanvas)

Known Subclasses

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" />
public event 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 ">
  <method name=" versionInfoString " />
  <attribute name=" dataloadtimeout " type="numberExpression" />
  <attribute name=" datasets " type="object" />
  <attribute name=" initdelay " />
  <attribute name=" lpsrelease " type="string" />
  <attribute name=" lpsversion " type="number" />
  <attribute name=" medialoadtimeout " type="numberExpression" />
  <attribute name=" nodeLevel " />
  <attribute name=" percentcreated " />
  <attribute name=" proxied " type="inheritableBooleanLiteral" value=""inherit"" />
  <attribute name=" version " type="string" value=""1.1"" />
  <method name=" compareVersion " args="ver, over" />
  <method name=" initialize " args="args" />
  <event name=" onmousedown " />
  <event name=" onmousemove " />
  <event name=" onmouseup " />
  <event name=" onpercentcreated " />
  <method name=" setDefaultContextMenu " args="cmenu" />
</class>

JavaScript Synopsis

public LzCanvas extends  LzView  {
  static public function versionInfoString ();
  public var dataloadtimeout  : Number = 30000;
  public var datasets  : Object;
  public var initdelay  = 0.0;
  public final var lpsrelease  : String;
  public final var lpsversion  : Number;
  public var medialoadtimeout  : Number = 30000;
  public var nodeLevel  = 0.0;
  public var percentcreated ;
  public var proxied  : Boolean;
  public var version  : Number;
  prototype public function compareVersion (ver, over);
  prototype public function initialize (args);
  prototype public event onmousedown ;
  prototype public event onmousemove ;
  prototype public event onmouseup ;
  prototype public event onpercentcreated ;
  prototype public function setDefaultContextMenu (cmenu : LzContextMenu);
}