<?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="definetextbackground" level="style" category="background" file="anch-bck.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
            <cd:resolve name="keyword-name-optional"/>
            <cd:assignments list="yes" optional="yes">
                <cd:inherit name="setuptextbackground"/>
            </cd:assignments>
        </cd:arguments>
    </cd:command>

    <cd:command name="setuptextbackground" level="style" category="background" file="anch-bck.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:parameter>
                <cd:parameter name="location">
                    <cd:constant type="text" default="yes"/>
                    <cd:constant type="paragraph"/>
                    <cd:constant type="always"/>
                    <cd:constant type="none"/>
                </cd:parameter>
                <cd:parameter name="criterium">
                    <cd:constant type="cd:number"/>
                </cd:parameter>
                <cd:parameter name="alternative">
                    <cd:constant type="cd:number"/>
                </cd:parameter>
                <cd:parameter name="mp">
                    <cd:constant type="cd:name"/>
                </cd:parameter>
                <cd:parameter name="method">
                    <cd:constant type="cd:name"/>
                </cd:parameter>
                <cd:parameter name="background">
                    <cd:constant type="color"/>
                </cd:parameter>
                <cd:parameter name="backgroundcolor">
                    <cd:constant type="cd:color"/>
                </cd:parameter>
                <cd:parameter name="corner">
                    <cd:constant type="rectangular" default="yes"/>
                    <cd:constant type="round"/>
                </cd:parameter>
                <cd:parameter name="level">
                    <cd:constant type="cd:number"/>
                </cd:parameter>
                <cd:parameter name="backgroundoffset">
                    <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="align">
                    <cd:inherit name="setupalign"/>
                </cd:parameter>
                <cd:parameter name="dash">
                    <cd:constant type="cd:number"/>
                </cd:parameter>
                <cd:parameter name="radius">
                    <cd:constant type="cd:dimension"/>
                </cd:parameter>
                <cd:parameter name="frame">
                    <cd:constant type="on" default="yes"/>
                    <cd:constant type="off"/>
                </cd:parameter>
                <cd:parameter name="framecolor">
                    <cd:constant type="cd:color"/>
                </cd:parameter>
                <cd:parameter name="rulethickness">
                    <cd:constant type="cd:dimension"/>
                </cd:parameter>
                <cd:parameter name="voffset">
                    <cd:constant type="cd:dimension"/>
                </cd:parameter>
                <cd:parameter name="frameoffset">
                    <cd:constant type="cd:dimension"/>
                </cd:parameter>
                <cd:parameter name="leftoffset">
                    <cd:resolve name="value-leftskip"/>
                </cd:parameter>
                <cd:parameter name="rightoffset">
                    <cd:resolve name="value-rightskip"/>
                </cd:parameter>
                <cd:parameter name="topoffset">
                    <cd:constant type="small"/>
                    <cd:constant type="medium"/>
                    <cd:constant type="big"/>
                    <cd:constant type="line"/>
                    <cd:constant type="cd:dimension"/>
                </cd:parameter>
                <cd:parameter name="bottomoffset">
                    <cd:constant type="small"/>
                    <cd:constant type="medium"/>
                    <cd:constant type="big"/>
                    <cd:constant type="line"/>
                    <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:arguments>
    </cd:command>

    <cd:command name="textbackground" type="environment" level="document" category="background" file="anch-bck.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
            <cd:assignments list="yes" optional="yes">
                <cd:inherit name="setuptextbackground"/>
            </cd:assignments>
        </cd:arguments>
    </cd:command>

    <cd:command name="textbackground" type="environment" generated="yes" variant="example" level="document" category="background" file="anch-bck.mkiv">
        <cd:sequence>
            <cd:variable value="textbackground"/>
        </cd:sequence>
        <cd:arguments>
            <cd:assignments list="yes" optional="yes">
                <cd:inherit name="setuptextbackground"/>
            </cd:assignments>
        </cd:arguments>
    </cd:command>

    <cd:command name="textbackground" generated="yes" variant="example" level="document" category="background" file="anch-bck.mkiv">
        <cd:sequence>
            <cd:variable value="textbackground"/>
        </cd:sequence>
        <cd:arguments>
            <cd:content/>
        </cd:arguments>
    </cd:command>

    <cd:command name="textbackgroundmanual" type="environment" level="system" category="background" file="anch-bck.mkiv"/>

</cd:interface>
