<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE dictionary SYSTEM "file://localhost/System/Library/DTDs/sdef.dtd">
<dictionary title="Accessibility Mapper Terminology">

    <!--
        Standard Suite — class definitions only.
        Commands (open, close, save, quit) are fulfilled automatically by AppKit
        and are intentionally omitted here to avoid event-handler conflicts.
    -->
    <suite name="Standard Suite" code="core"
           description="Common classes for most applications.">

        <class name="application" code="capp"
               description="The application's top-level scripting object."
               plural="applications">
            <cocoa class="NSApplication"/>
            <element type="document"/>
            <element type="window" access="r"/>
            <property name="name"      code="pnam" type="text"    access="r"
                       description="The name of the application."/>
            <property name="frontmost" code="pisf" type="boolean" access="r"
                       description="Is this the frontmost application?">
                <cocoa key="isActive"/>
            </property>
            <property name="version"   code="vers" type="text"    access="r"
                       description="The version of the application."/>
        </class>

        <class name="document" code="docu"
               description="A document."
               plural="documents">
            <cocoa class="NSDocument"/>
            <property name="name"     code="pnam" type="text"    access="r"
                       description="The document's name."/>
            <property name="modified" code="imod" type="boolean" access="r"
                       description="Has the document been modified since the last save?">
                <cocoa key="isDocumentEdited"/>
            </property>
            <property name="file"     code="file" type="file"    access="r"
                       description="The document's location on disk, if saved.">
                <cocoa key="fileURL"/>
            </property>
        </class>

        <class name="window" code="cwin"
               description="A window."
               plural="windows">
            <cocoa class="NSWindow"/>
            <property name="name"           code="pnam" type="text"      access="r"
                       description="The title of the window."/>
            <property name="id"             code="ID  " type="integer"   access="r"
                       description="The unique identifier of the window.">
                <cocoa key="windowNumber"/>
            </property>
            <property name="bounds"         code="pbnd" type="rectangle"
                       description="The bounding rectangle of the window in screen coordinates. Setting this repositions and resizes the window.">
                <cocoa key="boundsAsQDRect"/>
            </property>
            <property name="closeable"      code="hclb" type="boolean"   access="r"
                       description="Does the window have a close button?">
                <cocoa key="hasCloseBox"/>
            </property>
            <property name="miniaturizable" code="ismn" type="boolean"   access="r"
                       description="Can the window be minimized?">
                <cocoa key="isMiniaturizable"/>
            </property>
            <property name="miniaturized"   code="pmnd" type="boolean"
                       description="Is the window minimized?">
                <cocoa key="isMiniaturized"/>
            </property>
            <property name="resizable"      code="prsz" type="boolean"   access="r"
                       description="Can the window be resized?">
                <cocoa key="isResizable"/>
            </property>
            <property name="visible"        code="pvis" type="boolean"
                       description="Is the window visible?">
                <cocoa key="isVisible"/>
            </property>
            <property name="zoomable"       code="iszm" type="boolean"   access="r"
                       description="Can the window be zoomed?">
                <cocoa key="isZoomable"/>
            </property>
            <property name="zoomed"         code="pzum" type="boolean"
                       description="Is the window zoomed?">
                <cocoa key="isZoomed"/>
            </property>
        </class>

    </suite>

    <!-- Accessibility Mapper custom commands -->
    <suite name="Accessibility Mapper Suite" code="AcMp"
           description="Commands specific to Accessibility Mapper.">

        <!--
            geocode "94025"
            geocode "Cambridge, MA"
        -->
        <command name="geocode" code="AcMpGcod"
                 description="Navigate the frontmost document's map to a ZIP code or address.">
            <direct-parameter type="text" description="The ZIP code or address to navigate to."/>
            <cocoa class="GeocodeScriptCommand"/>
        </command>

        <!--
            set uid to add marker at latitude 37.3318 longitude -122.0312 with label "Library"
        -->
        <command name="add marker" code="AcMpAdMk"
                 description="Add an accessible-location marker to the frontmost document.">
            <parameter name="at latitude" code="AcLt" type="real"
                       description="Latitude in decimal degrees.">
                <cocoa key="latitude"/>
            </parameter>
            <parameter name="longitude" code="AcLg" type="real"
                       description="Longitude in decimal degrees.">
                <cocoa key="longitude"/>
            </parameter>
            <parameter name="with label" code="AcLb" type="text" optional="yes"
                       description="A descriptive name for the marker.">
                <cocoa key="label"/>
            </parameter>
            <result type="text"
                    description="The UUID of the new marker (pass to remove marker to delete it)."/>
            <cocoa class="AddMarkerScriptCommand"/>
        </command>

        <!--
            remove marker "uuid-string"
        -->
        <command name="remove marker" code="AcMpRmMk"
                 description="Remove an accessible-location marker from the frontmost document by UUID.">
            <direct-parameter type="text" description="The UUID of the marker to remove."/>
            <cocoa class="RemoveMarkerScriptCommand"/>
        </command>

    </suite>

</dictionary>
