<?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="newmode" level="system" category="structure" file="core-env.mkxl">
        <cd:arguments>
            <cd:resolve name="argument-name"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="setmode" level="system" category="structure" file="core-env.mkxl">
        <cd:arguments>
            <cd:resolve name="argument-name"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="resetmode" level="system" category="structure" file="core-env.mkxl">
        <cd:arguments>
            <cd:resolve name="argument-name"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="newsystemmode" level="system" category="structure" file="core-env.mkxl">
        <cd:arguments>
            <cd:resolve name="argument-name"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="setsystemmode" level="system" category="structure" file="core-env.mkxl">
        <cd:arguments>
            <cd:resolve name="argument-name"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="resetsystemmode" level="system" category="structure" file="core-env.mkxl">
        <cd:arguments>
            <cd:resolve name="argument-name"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="preventmode" level="style" category="structure" file="core-env.mkxl">
        <cd:arguments>
            <cd:resolve name="keyword-name-list"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="enablemode" level="style" category="structure" file="core-env.mkxl">
        <cd:arguments>
            <cd:resolve name="keyword-name-list"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="disablemode" level="style" category="structure" file="core-env.mkxl">
        <cd:arguments>
            <cd:resolve name="keyword-name-list"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="globalpreventmode" level="system" category="structure" file="core-env.mkxl">
        <cd:arguments>
            <cd:resolve name="keyword-name-list"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="globalenablemode" level="system" category="structure" file="core-env.mkxl">
        <cd:arguments>
            <cd:resolve name="keyword-name-list"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="globaldisablemode" level="system" category="structure" file="core-env.mkxl">
        <cd:arguments>
            <cd:resolve name="keyword-name-list"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="definemode" level="style" category="structure" file="core-env.mkxl">
        <cd:arguments>
            <cd:resolve name="keyword-name-list"/>
            <cd:keywords optional="yes">
                <cd:constant type="yes"/>
                <cd:constant type="no" default="yes"/>
                <cd:constant type="keep"/>
            </cd:keywords>
        </cd:arguments>
    </cd:command>

    <cd:command name="booleanmodevalue" level="system" category="structure" file="core-env.mkxl">
        <cd:arguments>
            <cd:resolve name="argument-name"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="doifelsemode" level="style" category="structure" keywords="conditional" file="core-env.mkxl">
        <cd:arguments>
            <cd:resolve name="argument-name-list"/>
            <cd:resolve name="argument-true"/>
            <cd:resolve name="argument-false"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="doifmodeelse" level="style" category="structure" keywords="conditional" file="core-env.mkxl">
        <cd:arguments>
            <cd:resolve name="argument-name-list"/>
            <cd:resolve name="argument-true"/>
            <cd:resolve name="argument-false"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="doifmode" level="style" category="structure" keywords="conditional" file="core-env.mkxl">
        <cd:arguments>
            <cd:resolve name="argument-name-list"/>
            <cd:resolve name="argument-true"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="doifnotmode" level="style" category="structure" keywords="conditional" file="core-env.mkxl">
        <cd:arguments>
            <cd:resolve name="argument-name-list"/>
            <cd:resolve name="argument-true"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="mode" type="environment" level="style" category="structure" file="core-env.mkxl">
        <cd:arguments>
            <cd:resolve name="keyword-name-list"/>
        </cd:arguments>
    </cd:command>
                
    <cd:command name="notmode" type="environment" level="style" category="structure" file="core-env.mkxl">
        <cd:arguments>
            <cd:resolve name="keyword-name-list"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="doifelseallmodes" level="style" category="structure" keywords="conditional" file="core-env.mkxl">
        <cd:arguments>
            <cd:resolve name="argument-name-list"/>
            <cd:resolve name="argument-true"/>
            <cd:resolve name="argument-false"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="doifallmodeselse" level="style" category="structure" keywords="conditional" file="core-env.mkxl">
        <cd:arguments>
            <cd:resolve name="argument-name-list"/>
            <cd:resolve name="argument-true"/>
            <cd:resolve name="argument-false"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="doifallmodes" level="style" category="structure" keywords="conditional" file="core-env.mkxl">
        <cd:arguments>
            <cd:resolve name="argument-name-list"/>
            <cd:resolve name="argument-true"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="doifnotallmodes" level="style" category="structure" keywords="conditional" file="core-env.mkxl">
        <cd:arguments>
            <cd:resolve name="argument-name-list"/>
            <cd:resolve name="argument-true"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="allmodes" type="environment" level="style" category="structure" file="core-env.mkxl">
        <cd:arguments>
            <cd:resolve name="keyword-name-list"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="notallmodes" type="environment" level="style" category="structure" file="core-env.mkxl">
        <cd:arguments>
            <cd:resolve name="keyword-name-list"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="modeset" type="environment" level="style" category="structure" file="core-env.mkxl">
        <cd:arguments>
            <cd:keywords list="yes">
                <cd:constant type="cd:name"/>
                <cd:constant type="default"/>
            </cd:keywords>
            <cd:content/>
        </cd:arguments>
    </cd:command>

    <cd:command name="pushmode" level="system" category="structure" file="core-env.mkxl">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="popmode" level="system" category="structure" file="core-env.mkxl">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="pushsystemmode" level="system" category="structure" file="core-env.mkxl">
        <cd:arguments>
            <cd:resolve name="argument-name"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="popsystemmode" level="system" category="structure" file="core-env.mkxl">
        <cd:arguments>
            <cd:resolve name="argument-name"/>
        </cd:arguments>
    </cd:command>

</cd:interface>
