<?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="setupblackrules" level="style" category="rules" keywords="colors" file="pack-mrl.mkxl">
        <cd:arguments>
            <cd:assignments list="yes">
                <cd:parameter name="width">
                    <cd:constant type="max"/>
                    <cd:constant type="cd:dimension"/>
                </cd:parameter>
                <cd:parameter name="height">
                    <cd:constant type="max"/>
                    <cd:constant type="cd:dimension"/>
                </cd:parameter>
                <cd:parameter name="depth">
                    <cd:constant type="max"/>
                    <cd:constant type="cd:dimension"/>
                </cd:parameter>
                <cd:parameter name="distance">
                    <cd:constant type="cd:dimension"/>
                </cd:parameter>
                <cd:parameter name="n">
                    <cd:constant type="cd:number"/>
                </cd:parameter>
                <cd:parameter name="alternative">
                    <cd:constant type="a" default="yes"/>
                    <cd:constant type="b"/>
                </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="type">
                    <cd:constant type="mp"/>
                    <cd:constant type="yes"/>
                    <cd:constant type="no"/>
                </cd:parameter>
                <cd:parameter name="mp">
                    <cd:constant type="cd:name"/>
                </cd:parameter>
                <cd:parameter name="rulethickness">
                    <cd:constant type="cd:dimension"/>
                </cd:parameter>
                <cd:parameter name="shrink">
                    <cd:constant type="cd:dimension"/>
                </cd:parameter>
                <cd:parameter name="stretch">
                    <cd:constant type="cd:dimension"/>
                </cd:parameter>
                <cd:parameter name="on">
                    <cd:constant type="cd:dimension"/>
                </cd:parameter>
                <cd:parameter name="off">
                    <cd:constant type="cd:dimension"/>
                </cd:parameter>
                <cd:parameter name="snapping">
                    <cd:resolve name="value-snapping"/>
                </cd:parameter>
            </cd:assignments>
        </cd:arguments>
    </cd:command>

    <cd:command name="blackrule" level="document" category="rules" keywords="colors" file="pack-mrl.mkxl">
        <cd:arguments>
            <cd:assignments list="yes" optional="yes">
                <cd:inherit name="setupblackrules"/>
            </cd:assignments>
        </cd:arguments>
    </cd:command>

    <cd:command name="blackrules" level="document" category="rules" keywords="colors" file="pack-mrl.mkxl">
        <cd:arguments>
            <cd:assignments list="yes" optional="yes">
                <cd:inherit name="setupblackrules"/>
            </cd:assignments>
        </cd:arguments>
    </cd:command>

    <cd:command name="vl" level="document" category="rules" file="pack-mrl.mkxl">
        <cd:arguments>
            <cd:resolve name="keyword-number-optional"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="hl" level="document" file="pack-mrl.mkxl">
        <cd:arguments>
            <cd:resolve name="keyword-number-optional"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="somekindoftab" level="style" category="rules" file="tabl-mis.mkxl">
        <cd:arguments>
            <cd:assignments list="yes" optional="yes">
                <cd:parameter name="alternative">
                    <cd:constant type="horizontal"/>
                    <cd:constant type="vertical" default="yes"/>
                </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="n">
                    <cd:constant type="cd:number"/>
                </cd:parameter>
                <cd:parameter name="m">
                    <cd:constant type="cd:number"/>
                </cd:parameter>
            </cd:assignments>
        </cd:arguments>
    </cd:command>

    <cd:command name="frule" level="style" category="rules" file="grph-rul.mkxl">
        <cd:arguments>
            <cd:keywords delimiters="none" list="yes">
                <cd:constant type="cd:dimension" prefix="width␣" method="none"/>
                <cd:constant type="cd:dimension" prefix="height␣" method="none"/>
                <cd:constant type="cd:dimension" prefix="depth␣" method="none"/>
                <cd:constant type="cd:dimension" prefix="radius␣" method="none"/>
                <cd:constant type="cd:dimension" prefix="line␣" method="none"/>
                <!-- the type option accepts 'mp' or 'fill' as arguments -->
                <cd:constant type="cd:text" prefix="type␣" method="none"/>
                <cd:constant type="cd:text" prefix="data␣" method="none"/>
                <cd:constant type="cd:text" prefix="name␣" method="none"/>
                <cd:constant type="cd:dimension" prefix="radius␣" method="none"/>
                <cd:constant type="cd:text" prefix="corner␣" method="none"/>
            </cd:keywords>
            <cd:delimiter name="relax"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="autorule" level="style" category="rules" file="node-rul.mkxl">
        <cd:arguments>
            <cd:keywords delimiters="none" list="yes">
                <cd:constant type="cd:dimension" prefix="width␣" method="none"/>
                <cd:constant type="cd:dimension" prefix="height␣" method="none"/>
                <cd:constant type="cd:dimension" prefix="depth␣" method="none"/>
                <cd:constant type="cd:dimension" prefix="xoffset␣" method="none"/>
                <cd:constant type="cd:dimension" prefix="yoffset␣" method="none"/>
                <cd:constant type="cd:dimension" prefix="left␣" method="none"/>
                <cd:constant type="cd:dimension" prefix="right␣" method="none"/>
            </cd:keywords>
            <cd:delimiter name="relax"/>
        </cd:arguments>
    </cd:command>

</cd:interface>
