<?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="showgrid" level="document" category="layout" file="page-grd.mkiv">
        <cd:arguments>
            <cd:keywords list="yes" optional="yes">
                <cd:constant type="reset"/>
                <cd:constant type="bottom" default="yes"/>
                <cd:constant type="top"/>
                <cd:constant type="none"/>
                <cd:constant type="all" default="yes"/>
                <cd:constant type="lines"/>
                <cd:constant type="frame"/>
                <cd:constant type="nonumber"/>
                <cd:constant type="right" default="yes"/>
                <cd:constant type="left"/>
                <cd:constant type="outer"/>
                <cd:constant type="inner"/>
                <cd:constant type="columns" default="yes"/>
            </cd:keywords>
        </cd:arguments>
    </cd:command>

    <cd:command name="definegridsnapping" level="style" category="layout" file="spac-ver.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
            <cd:keywords list="yes">
                <cd:constant type="local"/>
                <cd:constant type="global"/>
                <cd:constant type="noheight"/>
                <cd:constant type="nodepth"/>
                <cd:constant type="box"/>
                <cd:constant type="max"/>
                <cd:constant type="min"/>
                <cd:constant type="none"/>
                <cd:constant type="line"/>
                <cd:constant type="halfline"/>
                <cd:constant type="first"/>
                <cd:constant type="last"/>
                <cd:constant type="minheight"/>
                <cd:constant type="maxheight"/>
                <cd:constant type="mindepth"/>
                <cd:constant type="maxdepth"/>
                <cd:constant type="top"/>
                <cd:constant type="bottom"/>
                <cd:constant type="strut"/>
                <cd:constant type="cd:number"/>
                <cd:constant type="cd:number" prefix="minheight" method="range"/>
                <cd:constant type="cd:number" prefix="maxheight" method="range"/>
                <cd:constant type="cd:number" prefix="mindepth" method="range"/>
                <cd:constant type="cd:number" prefix="maxdepth" method="range"/>
                <cd:constant type="cd:number" prefix="box" method="range"/>
                <cd:constant type="cd:number" prefix="top" method="range"/>
                <cd:constant type="cd:number" prefix="bottom" method="range"/>
                <cd:constant type="cd:number" prefix="offset" method="range"/>
            </cd:keywords>
        </cd:arguments>
    </cd:command>

    <cd:command name="snaptogrid" level="document" category="layout" file="spac-ver.mkiv">
        <cd:arguments>
            <cd:keywords optional="yes">
                <cd:resolve name="value-grid"/>
            </cd:keywords>
            <cd:csname/>
            <cd:content/>
        </cd:arguments>
    </cd:command>

    <cd:command name="snaptogrid" variant="list" level="document" category="layout" file="spac-ver.mkiv">
        <cd:arguments>
            <cd:keywords list="yes" optional="yes">
                <cd:inherit name="definegridsnapping"/>
            </cd:keywords>
            <cd:csname/>
            <cd:content/>
        </cd:arguments>
    </cd:command>

    <cd:command name="placeongrid" level="document" category="layout" file="spac-ver.mkiv">
        <cd:arguments>
            <cd:keywords optional="yes">
                <cd:resolve name="value-grid"/>
            </cd:keywords>
            <cd:content/>
        </cd:arguments>
    </cd:command>

    <cd:command name="placeongrid" variant="list" level="document" category="layout" file="spac-ver.mkiv">
        <cd:arguments>
            <cd:keywords list="yes" optional="yes">
                <cd:inherit name="definegridsnapping"/>
            </cd:keywords>
            <cd:content/>
        </cd:arguments>
    </cd:command>

    <cd:command name="gridsnapping" type="environment" level="document" category="layout" file="spac-ver.mkiv">
        <cd:arguments>
            <cd:keywords optional="yes">
                <cd:resolve name="value-grid"/>
            </cd:keywords>
        </cd:arguments>
    </cd:command>

    <cd:command name="gridsnapping" type="environment" variant="list" level="document" category="layout" file="spac-ver.mkiv">
        <cd:arguments>
            <cd:keywords list="yes" optional="yes">
                <cd:inherit name="definegridsnapping"/>
            </cd:keywords>
        </cd:arguments>
    </cd:command>

    <cd:command name="usegridparameter" level="system" category="layout" file="spac-ver.mkiv">
        <cd:arguments>
            <cd:csname/>
        </cd:arguments>
    </cd:command>

    <cd:command name="showgridsnapping" level="document" category="layout" file="spac-ver.mkiv"/>

    <cd:command name="basegrid" level="document" category="graphics" file="meta-grd.mkiv">
        <cd:arguments>
            <cd:assignments list="yes" optional="yes">
                <cd:parameter name="nx">
                    <cd:constant type="cd:number"/>
                </cd:parameter>
                <cd:parameter name="ny">
                    <cd:constant type="cd:number"/>
                </cd:parameter>
                <cd:parameter name="dx">
                    <cd:constant type="cd:number"/>
                </cd:parameter>
                <cd:parameter name="dy">
                    <cd:constant type="cd:number"/>
                </cd:parameter>
                <cd:parameter name="factor">
                    <cd:constant type="cd:number"/>
                </cd:parameter>
                <cd:parameter name="scale">
                    <cd:constant type="cd:number"/>
                </cd:parameter>
                <cd:parameter name="xstep">
                    <cd:constant type="cd:number"/>
                </cd:parameter>
                <cd:parameter name="ystep">
                    <cd:constant type="cd:number"/>
                </cd:parameter>
                <cd:parameter name="offset">
                    <cd:constant type="cd:dimension"/>
                </cd:parameter>
                <cd:parameter name="xoffset">
                    <cd:constant type="cd:dimension"/>
                </cd:parameter>
                <cd:parameter name="yoffset">
                    <cd:constant type="cd:dimension"/>
                </cd:parameter>
                <cd:parameter name="align">
                    <cd:constant type="middle"/>
                </cd:parameter>
                <cd:parameter name="unit">
                    <cd:constant type="cm" default="yes"/>
                    <cd:constant type="mm"/>
                    <cd:constant type="in"/>
                    <cd:constant type="pc"/>
                    <cd:constant type="pt"/>
                    <cd:constant type="bp"/>
                </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="rulecolor">
                    <cd:constant type="cd:color"/>
                </cd:parameter>
                <cd:parameter name="rulethickness">
                    <cd:constant type="cd:dimension"/>
                </cd:parameter>
            </cd:assignments>
        </cd:arguments>
    </cd:command>

    <cd:command name="grid" level="document" category="graphics" file="meta-grd.mkiv">
        <cd:arguments>
            <cd:assignments list="yes" optional="yes">
                <cd:inherit name="basegrid"/>
            </cd:assignments>
        </cd:arguments>
    </cd:command>

</cd:interface>
