<?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="definemarginblock" level="style" category="structure" keywords="layout" file="page-mbk.mkvi">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
            <cd:resolve name="keyword-name-optional"/>
            <cd:assignments list="yes" optional="yes">
                <cd:inherit name="setupmarginblock"/>
            </cd:assignments>
        </cd:arguments>
    </cd:command>

    <cd:command name="setupmarginblock" level="style" category="structure" keywords="layout" file="page-mbk.mkvi">
        <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:parameter>
                <cd:parameter name="width">
                    <cd:constant type="cd:dimension"/>
                </cd:parameter>
                <cd:parameter name="before">
                    <cd:constant type="cd:command"/>
                </cd:parameter>
                <cd:parameter name="after">
                    <cd:constant type="cd:command"/>
                </cd:parameter>
                <cd:parameter name="inbetween">
                    <cd:constant type="cd:command"/>
                </cd:parameter>
                <cd:parameter name="align">
                    <cd:inherit name="setupalign"/>
                </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:parameter name="top">
                    <cd:constant type="cd:command"/>
                </cd:parameter>
                <cd:parameter name="bottom">
                    <cd:constant type="cd:command"/>
                </cd:parameter>
                <cd:parameter name="location">
                    <cd:constant type="left"/>
                    <cd:constant type="right"/>
                    <cd:constant type="middle"/>
                    <cd:constant type="inmargin" default="yes"/>
                </cd:parameter>
                <cd:parameter name="left">
                    <cd:constant type="cd:command"/>
                </cd:parameter>
                <cd:parameter name="right">
                    <cd:constant type="cd:command"/>
                </cd:parameter>
            </cd:assignments>
        </cd:arguments>
    </cd:command>

    <!--

        <cd:command name="setupmarginblocks" level="style" category="structure" keywords="layout" file="page-mbk.mkvi">
            <cd:arguments>
                <cd:resolve name="keyword-name-list-optional"/>
                <cd:assignments list="yes">
                    <cd:inherit name="setupmarginblock"/>
                </cd:assignments>
            </cd:arguments>
        </cd:command>

    -->

    <cd:command name="marginblock" type="environment" level="document" category="structure" keywords="layout" file="page-mbk.mkvi">
        <cd:arguments>
            <cd:resolve name="keyword-name-optional"/>
        </cd:arguments>
    </cd:command>

</cd:interface>
