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

<dictionary title="Standard Terminology">
	<!--hide for easy view-->
	<suite name="Standard Suite" code="????" description="Common classes and commands for all applications.">
		<command name="open" code="aevtodoc" description="Open a document.">
			<direct-parameter description="The file(s) to be opened.">
				<type type="file"/>
				<type type="file" list="yes"/>
			</direct-parameter>
		</command>
		
		<enumeration name="save options" code="savo">
			<enumerator name="yes" code="yes " description="Save the file."/>
			<enumerator name="no" code="no  " description="Do not save the file."/>
			<enumerator name="ask" code="ask " description="Ask the user whether or not to save the file."/>
		</enumeration>
		
		<command name="close" code="coreclos" description="Close a document.">
			<cocoa class="NSCloseCommand"/>
			<direct-parameter type="specifier" description="the document(s) or window(s) to close."/>
			<parameter name="saving" code="savo" type="save options" optional="yes" description="Should changes be saved before closing?">
				<cocoa key="SaveOptions"/>
			</parameter>
			<parameter name="saving in" code="kfil" type="file" optional="yes" description="The file in which to save the document, if so.">
				<cocoa key="File"/>
			</parameter>
		</command>
		
		<command name="quit" code="aevtquit" description="Quit the application.">
			<cocoa class="NSQuitCommand"/>
			<parameter name="saving" code="savo" type="save options" optional="yes" description="Should changes be saved before quitting?">
				<cocoa key="SaveOptions"/>
			</parameter>
		</command>
		
		<command name="count" code="corecnte" description="Return the number of elements of a particular class within an object.">
			<cocoa class="NSCountCommand"/>
			<direct-parameter type="specifier" description="The objects to be counted."/>
			<parameter name="each" code="kocl" type="type" optional="yes" description="The class of objects to be counted." hidden="yes">
				<cocoa key="ObjectClass"/>
			</parameter>
			<result type="integer" description="The count."/>
		</command>
		
		<command name="delete" code="coredelo" description="Delete an object.">
			<cocoa class="NSDeleteCommand"/>
			<direct-parameter type="specifier" description="The object(s) to delete."/>
		</command>
		
		<command name="exists" code="coredoex" description="Verify that an object exists.">
			<cocoa class="NSExistsCommand"/>
			<direct-parameter type="any" description="The object(s) to check."/>
			<result type="boolean" description="Did the object(s) exist?"/>
		</command>
		
		<command name="make" code="corecrel" description="Create a new object.">
			<cocoa class="NSCreateCommand"/>
			<parameter name="new" code="kocl" type="type" description="The class of the new object.">
				<cocoa key="ObjectClass"/>
			</parameter>
			<parameter name="at" code="insh" type="location specifier" optional="yes" description="The location at which to insert the object.">
				<cocoa key="Location"/>
			</parameter>
			<parameter name="with data" code="data" type="any" optional="yes" description="The initial contents of the object.">
				<cocoa key="ObjectData"/>
			</parameter>
			<parameter name="with properties" code="prdt" type="record" optional="yes" description="The initial values for properties of the object.">
				<cocoa key="KeyDictionary"/>
			</parameter>
			<result type="specifier" description="The new object."/>
		</command>
		
		<class name="application" code="capp" description="The application's top-level scripting object.">
			<cocoa class="NSApplication"/>
			<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 active application?">
				<cocoa key="isActive"/>
			</property>
			<property name="version" code="vers" type="text" access="r" description="The version number of the application."/>
			<element type="window" access="r">
				<cocoa key="orderedWindows"/>
			</element>
			<responds-to command="open">
				<cocoa method="handleOpenScriptCommand:"/>
			</responds-to>
			<responds-to command="quit">
				<cocoa method="handleQuitScriptCommand:"/>
			</responds-to>
            <property name="isRunningExtractions" code="TUiR" type="boolean" access="r">
                <cocoa key="hasRunningExtractions"/>
            </property>
		</class>
		
		<class name="window" code="cwin" description="A window.">
			<cocoa class="NSWindow"/>
			<property name="name" code="pnam" type="text" access="r" description="The title of the window.">
				<cocoa key="title"/>
			</property>
			<property name="id" code="ID  " type="integer" access="r" description="The unique identifier of the window.">
				<cocoa key="uniqueID"/>
			</property>
			<property name="index" code="pidx" type="integer" description="The index of the window, ordered front to back.">
				<cocoa key="orderedIndex"/>
			</property>
			<property name="bounds" code="pbnd" type="rectangle" description="The bounding rectangle of 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="Does the window have a minimize button?">
				<cocoa key="isMiniaturizable"/>
			</property>
			<property name="miniaturized" code="pmnd" type="boolean" description="Is the window minimized right now?">
				<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 right now?">
				<cocoa key="isVisible"/>
			</property>
			<property name="zoomable" code="iszm" type="boolean" access="r" description="Does the window have a zoom button?">
				<cocoa key="isZoomable"/>
			</property>
			<property name="zoomed" code="pzum" type="boolean" description="Is the window zoomed right now?">
				<cocoa key="isZoomed"/>
			</property>
			<responds-to command="close">
				<cocoa method="handleCloseScriptCommand:"/>
			</responds-to>
		</class>
	</suite>
	
	<suite name="The Unarchiver Suite" code="TUSc" description="Commands and definitions for unarchaving tasks">
		<enumeration name="File Destination" code="TUFD" inline="2"
			description="Where to unarchive">
			<enumerator name="Original" code="Orig" description="The same folder as the archive"/>
			<enumerator name="Ask User" code="AskU" hidden="yes" description="Ask the user"/>
			<enumerator name="Desktop" code="Desk" description="The user desktop"/>
			<enumerator name="User Default" code="UDef" description="The folder selected by the user on the preferences panel"/>
		</enumeration>
		<enumeration name="Create new folder" code="TUCF" inline="20"
			description="">
			<enumerator name="Never" code="NevE"/>
			<enumerator name="Only" code="OnlY" description="Only if there is more than one element on the top level"/>
			<enumerator name="Always" code="AlwA"/>
		</enumeration>
		<command name="unarchive" code="TUSCUnar"
			description="Unarchive the archives to the destination. If an option is not given, the user default settings will be used. Raise an error with number 1 and desription:'The file /the/path/ doesn't exist.' if a file doesn't exist.">
			<synonym name="extract"/>
			<synonym name="unpack"/>
			<cocoa class="TUUnarchiveScriptCommand"/>
			<direct-parameter code="Docs"
				description="The files to unarchive, always use POSIX paths (i.e. '/the/path/to/the/archive' )">
				<type type="text" list="yes"/>
			</direct-parameter>
			<parameter name="to" code="dest" optional="yes" description="Where to unarchive as an absolute path or a constant">
				<type type="text"/>
				<type type="File Destination"/>
				<cocoa key="destination"/>
			</parameter>
			<parameter name="deleting Original" optional="yes" type="boolean" code="Dele"
				description="If the archives should be deleted when the operation is finished">
				<cocoa key="deletingOriginal"/>
			</parameter>
			<parameter name="creating Folder" optional="yes" type="Create new folder" code="Crea"
				description="Create a new folder for every archive.">
				<cocoa key="creatingFolder"/>
			</parameter>
			<parameter name="wait Until Finished" optional="yes" type="boolean" code="WaUF"
				description="The script execution is stopped until all the unarhiving tasks are completed. Default is 'True'">
				<cocoa key="waitUntilFinished"/>
			</parameter>
			<!--parameter name="opening Folder" optional="yes" type="boolean" code="opFo"
			 description="If the destination folder should be opened when extraction is finished">
			 <cocoa key="opening"/>
			 TODO: There is a bug, so it can't be implemented
			 </parameter-->
		</command>
		<!--<enumeration name="Task to cancel" code="TUtC" inline="20"
			description="">
			<enumerator name="All tasks" code="TaAl" description="All the extractions, including the user extractions.">
				<synonym name="All"/>
			</enumerator>
			<enumerator hidden="yes" name="Current task" code="TaCT" description="TODO: not implemented"/>
		</enumeration>
		<command name="cancel" code="TUSCcaEx" description="Cancel a extraction task (currently only all tasks)">
			<cocoa class="TUCancelExtractionScriptCommand"/>
			<direct-parameter description="What to cancell, currently only all">
				<type type="Task to cancel"/>
			</direct-parameter>
		</command>-->
	</suite>
</dictionary>
