supportclasses.lzx

<library>
    <class name="ruler_element" oninit="this.digit_display.setAttribute('text', this.digit)">
        <attribute name="digit" value="100" type="string"/>
        
        <view bgcolor="0x1D2B64" width="100%" height="1"/>
        <view bgcolor="0x1D2B64" x="${parent.width -1}" width="1" height="3" y="-2"/>
        <view bgcolor="0xD6D29F" width="${parent.width - 1}" height="100%" y="1"/>
        <text name="digit_display" x="${parent.width - 10}" y="-15" width="50">100</text>
    </class>
 
    <class name="ruler">
        <attribute name="NumOfSegments" value="20"/>
        <attribute name="SegmentWidth" value="20"/>
        
        <view bgcolor="0x1D2B64" width="50" height="15"/>
        <text name="ruler" fgcolor="0xFFFFFF" x="7" width="40" y="1">
          RULER
        </text>
        
        <view name="content" height="${parent.height -15}" y="15">
           <ruler_element width="50" height="100%" digit=" "/>
           <ruler_element width="50" height="100%" digit="100"/>
           <ruler_element width="50" height="100%" digit="150"/>
           <ruler_element width="50" height="100%" digit="200"/>
           <ruler_element width="50" height="100%" digit="250"/>
           <ruler_element width="50" height="100%" digit="300"/>
           <ruler_element width="50" height="100%" digit="350"/>
           <ruler_element width="50" height="100%" digit="400"/>
           <ruler_element width="50" height="100%" digit="450"/>
           <ruler_element width="50" height="100%" digit="500"/>
           <ruler_element width="50" height="100%" digit="550"/>
           <ruler_element width="50" height="100%" digit="600"/>
           <ruler_element width="50" height="100%" digit="650"/>
           <ruler_element width="50" height="100%" digit="700"/>
           <ruler_element width="50" height="100%" digit="750"/>
           <ruler_element width="50" height="100%" digit=" "/>
               <simplelayout axis="x"/>  
        </view>
        
    </class>
    
    <class name="box" width="49" height="49" oninit="this.setup()" bgcolor="red">
        <!-- view bgcolor="red" x="-6" y="-6" stretches="both" /--> <!-- resource="box3.png" -->
        <text name="title" fgcolor="white" align="center" valign="middle" pixellock="true">BBBB</text>
        <method name="setup">
            this.title.setAttribute("text", this.id)
            this.title.setAttribute("x", Math.floor((this.width - this.title.getTextWidth())/2.0));
        </method>
    </class>
    
    <class name="borderedbox" extends="box">
        <view bgcolor="yellow" x="2" y="2" width="${parent.width -4}" height="${parent.height - 4}"/>
    </class>
    
    <class name="boxtitle" width="49" height="20">
        <attribute name="label" type="string"/>
        <text name="title" align="center" valign="middle" pixellock="true">ROTATION</text>
        <handler name="oninit">
            this.title.setAttribute("text", this.label)
            this.title.setAttribute("x", Math.floor((this.width - this.title.getTextWidth())/2.0));
        </handler>
    </class>
 
    <class name="slide">
        <animatorgroup name="playslide" process="sequential" start="false">
            <animator attribute="opacity" to="1" duration="2000"/>
            <animator attribute="opacity" to="0" duration="333"/>
        </animatorgroup>
    </class>

  
    <class name="header" height="20" width="100%" bgcolor="0x1D2B64" oninit="this.title.setAttribute('text', this.label);">
        <attribute name="label" type="string"/>
        <text name="title" x="5" y="3" width="100%" fgcolor="white"> Header</text>
    </class>

    <class name="paramdisplay" width="668">
        <attribute name="label" value="test" type="string"/>
        <button name="bt" onclick="this.parent.onclick.sendEvent()">Report</button>
        <view name="display" bgcolor="0x1D2B64" height="22" width="${parent.width - parent.bt.width}" opacity="0.6">
            <text name="tx" x="10" y="3" fgcolor="white" width="100%"/>
        </view>
        <simplelayout axis="x"/>
        <method name="setdisplay" args="t">
            this.display.tx.setAttribute("text", t)
        </method>
    </class>

    <class name="descriptor" height="36" width="100%" oninit="this.title.setAttribute('text', this.label); this.descript.setAttribute('text', this.description); ">
        <attribute name="label" type="string"/>
        <attribute name="description" type="string"/>
        <view width="100%" height="100%" bgcolor="0xFFFFFF" opacity="0.3"/>
        <text name="title" x="7" y="1" width="100%">(1) what</text>
        <text name="descript" x="7" y="17" width="100%">(1) what</text>
    </class>
</library>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
* Copyright 2001-2007 Laszlo Systems, Inc.  All Rights Reserved.              *
* Use is subject to license terms.                                            *
* X_LZ_COPYRIGHT_END ****************************************************** -->

Cross References

Classes