<?xml version="1.0" encoding="UTF-8"?>

<?context-directive job ctxfile x-setups.ctx ?>

<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">

    <cd:command name="setuplayeredtext" level="style" category="background" file="pack-box.mkxl">
        <cd:arguments>
            <cd:resolve name="keyword-name-list-optional"/>
            <cd:assignments list="yes">
                <cd:parameter name="style">
                    <cd:resolve name="value-style"/>
                </cd:parameter>
                <cd:parameter name="color">
                    <cd:constant type="cd:color"/>
                </cd:parameter>
                <cd:inherit name="setupframed"/>
            </cd:assignments>
        </cd:arguments>
    </cd:command>

    <cd:command name="layeredtext" level="document" category="background" file="pack-box.mkxl">
        <cd:arguments>
            <cd:assignments list="yes" optional="yes">
                <cd:inherit name="setuplayer"/>
            </cd:assignments>
            <cd:assignments list="yes" optional="yes">
                <cd:inherit name="setuplayeredtext"/>
            </cd:assignments>
            <cd:resolve name="argument-text"/>
            <cd:content/>
        </cd:arguments>
    </cd:command>

    <cd:command name="placelayeredtext" level="document" category="background" file="pack-box.mkxl">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
            <cd:assignments list="yes" optional="yes">
                <cd:inherit name="setuplayer"/>
            </cd:assignments>
            <cd:assignments list="yes" optional="yes">
                <cd:inherit name="setuplayeredtext"/>
            </cd:assignments>
            <cd:resolve name="argument-text"/>
            <cd:content/>
        </cd:arguments>
    </cd:command>

    <cd:command name="setlayerframed" level="document" category="background" file="pack-box.mkxl">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
            <cd:assignments list="yes" optional="yes">
                <cd:inherit name="setuplayer"/>
            </cd:assignments>
            <cd:assignments list="yes" optional="yes">
                <cd:inherit name="setupframed"/>
            </cd:assignments>
            <cd:content/>
        </cd:arguments>
    </cd:command>

    <cd:command name="setlayerframed" variant="combination" level="document" category="background" file="pack-box.mkxl">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
            <cd:assignments list="yes" optional="yes">
                <cd:inherit name="setuplayer"/>
                <cd:inherit name="setupframed"/>
            </cd:assignments>
            <cd:content/>
        </cd:arguments>
    </cd:command>

    <cd:command name="setlayertext" level="document" category="background" file="pack-box.mkxl">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
            <cd:assignments list="yes" optional="yes">
                <cd:inherit name="setuplayer"/>
            </cd:assignments>
            <cd:assignments list="yes" optional="yes">
                <cd:parameter name="align">
                    <cd:inherit name="setupalign"/>
                </cd:parameter>
                <cd:parameter name="width">
                    <cd:constant type="cd:dimension"/>
                </cd:parameter>
                <cd:parameter name="style">
                    <cd:resolve name="value-style"/>
                </cd:parameter>
                <cd:parameter name="color">
                    <cd:constant type="cd:color"/>
                </cd:parameter>
            </cd:assignments>
            <cd:resolve name="argument-text"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="definelayer" level="style" category="background" file="pack-lyr.mkxl">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
            <cd:resolve name="keyword-name-optional"/>
            <cd:assignments list="yes" optional="yes">
                <cd:inherit name="setuplayer"/>
            </cd:assignments>
        </cd:arguments>
    </cd:command>

    <cd:command name="setuplayer" level="style" category="background" file="pack-lyr.mkxl">
        <cd:arguments>
            <cd:resolve name="keyword-name-list-optional"/>
            <cd:assignments list="yes">
                <cd:parameter name="state">
                    <cd:constant type="start" default="yes"/>
                    <cd:constant type="stop"/>
                    <cd:constant type="continue"/>
                    <cd:constant type="next"/>
                    <cd:constant type="repeat"/>
                </cd:parameter>
                <cd:parameter name="option">
                    <cd:constant type="test"/>
                </cd:parameter>
                <cd:parameter name="page">
                    <cd:constant type="cd:number"/>
                </cd:parameter>
                <cd:parameter name="width">
                    <cd:constant type="cd:dimension"/>
                </cd:parameter>
                <cd:parameter name="height">
                    <cd:constant type="cd:dimension"/>
                </cd:parameter>
                <cd:parameter name="region">
                    <cd:constant type="cd:name"/>
                </cd:parameter>
                <cd:parameter name="rotation">
                    <cd:constant type="left"/>
                    <cd:constant type="right"/>
                    <cd:constant type="inner"/>
                    <cd:constant type="outer"/>
                    <cd:constant type="cd:number"/>
                </cd:parameter>
                <cd:parameter name="position">
                    <cd:constant type="yes"/>
                    <cd:constant type="no" default="yes"/>
                    <cd:constant type="overlay"/>
                </cd:parameter>
                <cd:parameter name="hoffset">
                    <cd:constant type="max"/>
                    <cd:constant type="cd:dimension"/>
                </cd:parameter>
                <cd:parameter name="voffset">
                    <cd:constant type="max"/>
                    <cd:constant type="cd:dimension"/>
                </cd:parameter>
                <cd:parameter name="offset">
                    <cd:constant type="cd:dimension"/>
                </cd:parameter>
                <cd:parameter name="dx">
                    <cd:constant type="cd:dimension"/>
                </cd:parameter>
                <cd:parameter name="dy">
                    <cd:constant type="cd:dimension"/>
                </cd:parameter>
                <cd:parameter name="sx">
                    <cd:constant type="cd:number"/>
                </cd:parameter>
                <cd:parameter name="sy">
                    <cd:constant type="cd:number"/>
                </cd:parameter>
                <cd:parameter name="x">
                    <cd:constant type="cd:dimension"/>
                </cd:parameter>
                <cd:parameter name="y">
                    <cd:constant type="cd:dimension"/>
                </cd:parameter>
                <cd:parameter name="corner">
                    <cd:constant type="left" default="yes"/>
                    <cd:constant type="middle"/>
                    <cd:constant type="right"/>
                    <cd:constant type="top" default="yes"/>
                    <cd:constant type="bottom"/>
                </cd:parameter>
                <cd:parameter name="location">
                    <cd:constant type="grid"/>
                    <cd:resolve name="value-aligned"/>
                </cd:parameter>
                <cd:parameter name="line">
                    <cd:constant type="cd:number"/>
                </cd:parameter>
                <cd:parameter name="column">
                    <cd:constant type="cd:number"/>
                </cd:parameter>
                <cd:parameter name="direction">
                    <cd:constant type="normal" default="yes"/>
                    <cd:constant type="reverse"/>
                </cd:parameter>
                <cd:parameter name="doublesided">
                    <cd:constant type="yes"/>
                    <cd:constant type="no"/>
                </cd:parameter>
                <cd:parameter name="method">
                    <cd:constant type="fit"/>
                    <cd:constant type="overlay" default="yes"/>
                </cd:parameter>
                <cd:parameter name="repeat">
                    <cd:constant type="yes"/>
                </cd:parameter>
                <cd:parameter name="preset">
                    <cd:constant type="lefttop"/>
                    <cd:constant type="righttop"/>
                    <cd:constant type="leftbottom"/>
                    <cd:constant type="rightbottom"/>
                    <cd:constant type="middle"/>
                    <cd:constant type="middletop"/>
                    <cd:constant type="middlebottom"/>
                    <cd:constant type="middleleft"/>
                    <cd:constant type="middleright"/>
                    <cd:constant type="lefttopleft"/>
                    <cd:constant type="lefttopright"/>
                    <cd:constant type="cd:name"/>
                </cd:parameter>
            </cd:assignments>
        </cd:arguments>
    </cd:command>

    <cd:command name="resetlayer" level="style" category="background" file="pack-lyr.mkxl">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="flushlayer" level="document" category="background" file="pack-lyr.mkxl">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="tightlayer" level="document" category="background" file="pack-lyr.mkxl">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="placelayer" level="document" category="background" file="pack-lyr.mkxl">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="composedlayer" level="document" category="background" file="pack-lyr.mkxl">
        <cd:arguments>
            <cd:resolve name="argument-name"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="setlayer" level="document" category="background" file="pack-lyr.mkxl">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
            <cd:keywords optional="yes">
                <cd:constant type="left"/>
                <cd:constant type="right"/>
                <cd:constant type="even"/>
                <cd:constant type="odd"/>
            </cd:keywords>
            <cd:assignments list="yes" optional="yes">
                <cd:inherit name="setuplayer"/>
            </cd:assignments>
            <cd:content/>
        </cd:arguments>
    </cd:command>

    <cd:command name="definelayerpreset" level="system" category="background" file="pack-lyr.mkxl">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
            <cd:assignments list="yes">
                <cd:inherit name="setuplayer"/>
            </cd:assignments>
        </cd:arguments>
    </cd:command>

    <cd:command name="definelayerpreset" variant="name" level="system" category="background" file="pack-lyr.mkxl">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
            <cd:resolve name="keyword-name"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="doifelselayerdata" level="system" category="background" keywords="conditional" file="pack-lyr.mkxl">
        <cd:arguments>
            <cd:resolve name="argument-name"/>
            <cd:resolve name="argument-true"/>
            <cd:resolve name="argument-false"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="doiflayerdataelse" level="system" category="background" keywords="conditional" file="pack-lyr.mkxl">
        <cd:arguments>
            <cd:resolve name="argument-name"/>
            <cd:resolve name="argument-true"/>
            <cd:resolve name="argument-false"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="layerwidth" level="system" category="background" file="pack-lyr.mkxl"/>

    <cd:command name="layerheight" level="system" category="background" file="pack-lyr.mkxl"/>

    <cd:command name="setMPlayer" level="document" category="background" keywords="metapost" file="pack-lyr.mkxl">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
            <cd:resolve name="keyword-name"/>
            <cd:assignments list="yes" optional="yes">
                <cd:inherit name="setuplayer"/>
            </cd:assignments>
            <cd:content/>
        </cd:arguments>
    </cd:command>

    <cd:command name="getMPlayer" level="document" category="background" keywords="metapost" file="pack-lyr.mkxl">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
            <cd:assignments list="yes" optional="yes">
                <cd:inherit name="setupframed"/>
            </cd:assignments>
            <cd:content/>
        </cd:arguments>
    </cd:command>

</cd:interface>
