basepanel.lzx

<library>
    <!-- CLASS: BASE PANEL ============================================ -->
    <!-- A simple beveled panel with a title field and a close button   -->
    <!-- that is extended by the infopanel class.                       -->
    <!-- ============================================================== -->
    <class name="basepanel" height="100" width="100">
        <!-- VIEWS -->
        <view name="myframe" width="100%" height="100%">
            <view name="top" width="${parent.width}" height="19">
                <view name="l" resource="tpLft" x="-1" y="-1"/>
                <view name="m" resource="tpMdl" stretches="width" width="${parent.width - 22}" x="5"/>

                <basebutton name="r" resource="tpRgt_base" x="${parent.m.x + parent.m.width - 1}" y="-1" onclick="classroot.close(null)"/>
            </view>

            <view name="middle" width="${parent.width}" options="releasetolayout">
                <view name="l" resource="lft" x="-2" stretches="height" height="${parent.height}"/>
                <view name="content" x="${parent.l.width + -2}" width="${parent.width - 6}" height="${parent.height}"/>
                <view name="r" resource="rgt" stretches="height" x="${parent.content.x + parent.width - 8}" height="${parent.height}"/>
            </view>

            <view name="bottom" width="${parent.width}" height="7">
                <view name="l" resource="btLft" x="0"/>
                <view name="m" resource="btMdl" stretches="width"/>
                <view name="r" resource="btRgt"/>
                <stableborderlayout axis="x"/>
            </view>

            <resizelayout axis="y" spacing="0"/>
        </view>

        <text name="title" fgcolor="#DAE3E8" width="${parent.width-30}" x="5" y="1"/>

        <view name="contents" x="3" y="19" height="${parent.height - 27}" width="${parent.width - 6}" bgcolor="#9BA9B1"/> 

        <attribute name="defaultplacement" value="contents" type="string"/>
        
        <!-- METHODS -->
        <!-- close is abstract; define in subclass -->

        <!-- this is currently unused, but allows for coloriation of panel -->
        <method name="transformto" args="tm">
                myframe.setColorTransform(tm);
        </method>
        
        <method name="setWindowTitle" args="s">
                this.title.setAttribute('text', s);
        </method>
        
    </class>
</library>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
* Copyright 2001-2008 Laszlo Systems, Inc.  All Rights Reserved.              *
* Use is subject to license terms.                                            *
* X_LZ_COPYRIGHT_END ****************************************************** -->
<!-- @LZX_VERSION@                                                         -->

Cross References

Classes