<?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" file="pack-box.mkiv">
        <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" file="pack-box.mkiv">
        <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" file="pack-box.mkiv">
        <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" file="pack-box.mkiv">
        <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" file="pack-box.mkiv">
        <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" file="pack-box.mkiv">
        <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" file="pack-lyr.mkiv">
        <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" file="pack-lyr.mkiv">
        <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" file="pack-lyr.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="flushlayer" file="pack-lyr.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="tightlayer" file="pack-lyr.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="placelayer" file="pack-lyr.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="composedlayer" file="pack-lyr.mkiv">
        <cd:arguments>
            <cd:resolve name="argument-name"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="setlayer" file="pack-lyr.mkiv">
        <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" file="pack-lyr.mkiv">
        <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" file="pack-lyr.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
            <cd:resolve name="keyword-name"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="doifelselayerdata" file="pack-lyr.mkiv">
        <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" file="pack-lyr.mkiv">
        <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" file="pack-lyr.mkiv"/>

    <cd:command name="layerheight" file="pack-lyr.mkiv"/>

    <cd:command name="setMPlayer" file="pack-lyr.mkiv">
        <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" file="pack-lyr.mkiv">
        <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>
