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

<!--

  $Id: Max.sdef 1335 2008-01-21 05:59:38Z stephen_booth $

  Copyright (C) 2005 - 2008 Stephen F. Booth <me@sbooth.org>

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

-->

<dictionary title="Max terminology">

	<!--
		STANDARD SUITE
	-->
	<suite name="Standard Suite" code="core"
		description="Common classes and commands for all applications.">

		<cocoa name="NSCoreSuite"/>

		<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>
			<!--
				According to TN2106, 'open' should return the resulting document
				object.  However, the Cocoa implementation does not do this yet.
			<result type="specifier"/>
			-->
		</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="Whether or not changes should 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.">
				<cocoa key="File"/>
			</parameter>
		</command>

		<command name="save" code="coresave" description="Save a document.">
			<direct-parameter type="specifier"
				description="The document(s) or window(s) to save."/>
			<parameter name="in" code="kfil" type="file" optional="yes"
				description="The file in which to save the document.">
				<cocoa key="File"/>
			</parameter>
			<parameter name="as" code="fltp" type="text" optional="yes"
				description="The type of file to save.">
				<cocoa key="FileType"/>
			</parameter>
		</command>

		<!--
		<enumeration name="printing error handling" code="enum">
			<enumerator name="standard" code="lwst"
				description="Standard PostScript error handling"/>
			<enumerator name="detailed" code="lwdt"
				description="print a detailed report of PostScript errors"/>
		</enumeration>

		<record-type name="print settings" code="pset">
			<property name="copies" code="lwcp" type="integer"
				description="the number of copies of a document to be printed">
				<cocoa key="NSCopies"/>
			</property>
			<property name="collating" code="lwcl" type="boolean"
				description="Should printed copies be collated?">
				<cocoa key="NSMustCollate"/>
			</property>
			<property name="starting page" code="lwfp" type="integer"
				description="the first page of the document to be printed">
				<cocoa key="NSFirstPage"/>
			</property>
			<property name="ending page" code="lwlp" type="integer"
				description="the last page of the document to be printed">
				<cocoa key="NSLastPage"/>
			</property>
			<property name="pages across" code="lwla" type="integer"
				description="number of logical pages laid across a physical page">
				<cocoa key="NSPagesAcross"/>
			</property>
			<property name="pages down" code="lwld" type="integer"
				description="number of logical pages laid out down a physical page">
				<cocoa key="NSPagesDown"/>
			</property>
			<property name="error handling" code="lweh" type="printing error handling"
				description="how errors are handled">
				<cocoa key="NSDetailedErrorReporting"/>
			</property>
			<property name="fax number" code="faxn" type="text"
				description="for fax number">
				<cocoa key="NSFaxNumber"/>
			</property>
			<property name="target printer" code="trpr" type="text"
				description="for target printer">
				<cocoa key="NSPrinterName"/>
			</property>
		</record-type>

		<command name="print" code="aevtpdoc" description="Print a document.">
			<direct-parameter
				description="The file(s), document(s), or window(s) to be printed.">
				<type type="file" list="yes"/>
				<type type="specifier"/>
			</direct-parameter>
			<parameter name="with properties" code="prdt" type="print settings" optional="yes"
				description="The print settings to use.">
				<cocoa key="PrintSettings"/>
			</parameter>
			<parameter name="print dialog" code="pdlg" type="boolean" optional="yes"
				description="Should the application show the print dialog?">
				<cocoa key="ShowPrintDialog"/>
			</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="Whether or not changed documents should be saved before closing.">
				<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 object whose elements are to be counted"/>
			<parameter name="each" code="kocl" type="type" optional="yes"
				description="The class of objects to be counted.">
				<cocoa key="ObjectClass"/>
			</parameter>
			<result type="integer" description="the number of elements"/>
		</command>

		<command name="delete" code="coredelo" description="Delete an object.">
			<cocoa class="NSDeleteCommand"/>
			<direct-parameter type="specifier" description="the object to delete"/>
		</command>

		<command name="duplicate" code="coreclon"
			description="Copy object(s) and put the copies at a new location.">
			<cocoa class="NSCloneCommand"/>
			<direct-parameter type="specifier"
				description="the object(s) to duplicate"/>
			<parameter name="to" code="insh" type="location specifier" optional="yes"
				description="The location for the new object(s).">
				<cocoa key="ToLocation"/>
			</parameter>
			<parameter name="with properties" code="prdt" type="record" optional="yes"
				description="Properties to be set in the new duplicated object(s).">
				<cocoa key="WithProperties"/>
			</parameter>
			<result type="specifier" description="the duplicated object(s)"/>
		</command>

		<command name="exists" code="coredoex" description="Verify if an object exists.">
			<cocoa class="NSExistsCommand"/>
			<direct-parameter type="any" description="the object in question"/>
			<result type="boolean" description="true if it exists, false if not"/>
		</command>

		<command name="make" code="corecrel" description="Make 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="to the new object"/>
		</command>

		<command name="move" code="coremove" description="Move object(s) to a new location.">
			<cocoa class="NSMoveCommand"/>
			<direct-parameter type="specifier" description="the object(s) to move"/>
			<parameter name="to" code="insh" type="location specifier"
				description="The new location for the object(s).">
				<cocoa key="ToLocation"/>
			</parameter>
			<result type="specifier" description="the moved object(s)"/>
		</command>

		<class name="application" code="capp"
			description="Max'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 frontmost (active) application?">
				<cocoa key="isActive"/>
			</property>
			<property name="version" code="vers" type="text" access="r"
				description="The version of the application."/>
			<element type="document">
				<cocoa key="orderedDocuments"/>
			</element>
			<element type="window" access="r">
				<cocoa key="orderedWindows"/>
			</element>
			<responds-to name="open">
				<cocoa method="handleOpenScriptCommand:"/>
			</responds-to>
			<!--
			<responds-to name="print">
				<cocoa method="handlePrintScriptCommand:"/>
			</responds-to>
			-->
			<responds-to name="quit">
				<cocoa method="handleQuitScriptCommand:"/>
			</responds-to>
			<responds-to name="convert">
				<cocoa method="handleConvertScriptCommand:"/>
			</responds-to>
		</class>

		<class name="document" code="docu" description="A document representing a compact disc.">
			<cocoa class="CompactDiscDocument"/>
			<property name="name" code="pnam" type="text" access="r"
				description="The document's name.">
				<cocoa key="displayName"/>
			</property>
			<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.">
				<cocoa key="fileURL"/>
			</property>
			<element type="track"/>
			<property name="encode allowed" code="Enco" type="boolean" access="r" 
				description="Does the state of the document allow the selected tracks to be encoded?">
				<cocoa key="encodeAllowed"/>
			</property>
			<property name="query MusicBrainz allowed" code="Quer" type="boolean" access="r" 
				description="Does the state of the document allow MusicBrainz to be queried for disc information?">
				<cocoa key="queryMusicBrainzAllowed"/>
			</property>
			<property name="rip in progress" code="RIP " type="boolean" access="r" 
				description="Does this document contain tracks currently being ripped?">
				<cocoa key="ripInProgress"/>
			</property>
			<property name="encode in progress" code="EIP " type="boolean" access="r" 
				description="Does this document contain tracks currently being encoded?">
				<cocoa key="encodeInProgress"/>
			</property>
			<property name="disc in drive" code="Disc" type="boolean" access="r"
				description="Is the disc associated with this document in the drive?">
				<cocoa key="discInDrive"/>
			</property>
			<property name="disc ID" code="MBID" type="text" access="r"
				description="The disc's MusicBrainz ID.">
				<cocoa key="discID"/>
			</property>
			<property name="title" code="Titl" type="text"
				description="The disc's title.">
				<cocoa key="title"/>
			</property>
			<property name="artist" code="Arts" type="text"
				description="The disc's artist.">
				<cocoa key="artist"/>
			</property>
			<property name="date" code="Date" type="text"
				description="The disc's date.">
				<cocoa key="date"/>
			</property>
			<property name="genre" code="Genr" type="text"
				description="The disc's genre.">
				<cocoa key="genre"/>
			</property>
			<property name="composer" code="Comp" type="text"
				description="The disc's composer.">
				<cocoa key="composer"/>
			</property>
			<property name="comment" code="Comm" type="text"
				description="The disc's comment.">
				<cocoa key="comment"/>
			</property>
			<!--
			<property name="albumArt" code="art " type="image"
				description="The album artwork associated with the disc.">
				<cocoa key="albumArt"/>
			</property>
			<property name="albumArtWidth" code="artw" type="integer" access="r"
				description="The width, in pixels, of the disc's album art.">
				<cocoa key="albumArtWidth"/>
			</property>
			<property name="albumArtHeight" code="arth" type="integer" access="r"
				description="The height, in pixels, of the disc's album art.">
				<cocoa key="albumArtHeight"/>
			</property>
			-->
			<property name="total tracks" code="TTot" type="integer" access="r"
				description="The total number of tracks on the disc.">
				<cocoa key="countOfTracks"/>
			</property>
			<property name="disc number" code="DNum" type="integer"
				description="The number of this disc in the set.">
				<cocoa key="discNumber"/>
			</property>
			<property name="total discs" code="DTot" type="integer"
				description="The total number of discs in the set.">
				<cocoa key="discTotal"/>
			</property>
			<property name="compilation" code="Cmpl" type="boolean"
				description="Is this disc a compilation?">
				<cocoa key="compilation"/>
			</property>
			<property name="MCN" code="MCN " type="text" access="r"
				description="The disc's media catalog number (MCN).">
				<cocoa key="MCN"/>
			</property>
			<responds-to name="close">
				<cocoa method="handleCloseScriptCommand:"/>
			</responds-to>
			<!--
			<responds-to name="print">
				<cocoa method="handlePrintScriptCommand:"/>
			</responds-to>
			-->
			<responds-to name="save">
				<cocoa method="handleSaveScriptCommand:"/>
			</responds-to>
			<responds-to name="encode">
				<cocoa method="handleEncodeScriptCommand:"/>
			</responds-to>
			<responds-to name="eject disc">
				<cocoa method="handleEjectDiscScriptCommand:"/>
			</responds-to>
			<responds-to name="query MusicBrainz">
				<cocoa method="handleQueryMusicBrainzScriptCommand:"/>
			</responds-to>
			<responds-to name="toggle track information">
				<cocoa method="handleToggleTrackInformationScriptCommand:"/>
			</responds-to>
			<responds-to name="toggle album art">
				<cocoa method="handleToggleAlbumArtScriptCommand:"/>
			</responds-to>
			<responds-to name="download album art">
				<cocoa method="handleFetchAlbumArtScriptCommand:"/>
			</responds-to>
		</class>

		<class name="window" code="cwin" description="A window.">
			<cocoa class="NSWindow"/>
			<property name="name" code="pnam" type="text" access="r"
				description="The full 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="Whether the window has a close box.">
				<cocoa key="hasCloseBox"/>
			</property>
			<property name="minimizable" code="ismn" type="boolean" access="r"
				description="Whether the window can be minimized.">
				<cocoa key="isMiniaturizable"/>
			</property>
			<property name="minimized" code="pmnd" type="boolean"
				description="Whether the window is currently minimized.">
				<cocoa key="isMiniaturized"/>
			</property>
			<property name="resizable" code="prsz" type="boolean" access="r"
				description="Whether the window can be resized.">
				<cocoa key="isResizable"/>
			</property>
			<property name="visible" code="pvis" type="boolean"
				description="Whether the window is currently visible.">
				<cocoa key="isVisible"/>
			</property>
			<property name="zoomable" code="iszm" type="boolean" access="r"
				description="Whether the window can be zoomed.">
				<cocoa key="isZoomable"/>
			</property>
			<property name="zoomed" code="pzum" type="boolean"
				description="Whether the window is currently zoomed.">
				<cocoa key="isZoomed"/>
			</property>
			<property name="document" code="docu" type="document" access="r"
				description="The document whose contents are being displayed in the window."/>
			<responds-to name="close">
				<cocoa method="handleCloseScriptCommand:"/>
			</responds-to>
			<responds-to name="print">
				<cocoa method="handlePrintScriptCommand:"/>
			</responds-to>
			<responds-to name="save">
				<cocoa method="handleSaveScriptCommand:"/>
			</responds-to>
		</class>

	</suite>


	<!--
		TEXT SUITE
	-->
	<suite name="Text Suite" code="TEXT"
		description="A set of basic classes for text processing.">

		<cocoa name="NSTextSuite"/>

		<value-type name="color" code="cRGB">
			<cocoa class="NSColor"/>
		</value-type>

		<class name="rich text" plural="rich text" code="ctxt"
			description="Rich (styled) text">
			<cocoa class="NSTextStorage"/>
			<!-- this "type" element and the ones that follow, while they
				contradict the DTD, are NOT errors.  Cocoa Scripting in 10.4
				uses them to accomplish certain type conversions. -->
			<type type="text"/>
			<property name="color" code="colr" type="color"
				description="The color of the first character.">
				<cocoa key="foregroundColor"/>
			</property>
			<property name="font" code="font" type="text"
				description="The name of the font of the first character.">
				<cocoa key="fontName"/>
			</property>
			<property name="size" code="ptsz" type="integer"
				description="The size in points of the first character.">
				<cocoa key="fontSize"/>
			</property>
			<element type="character"/>
			<element type="paragraph"/>
			<element type="word"/>
			<element type="attribute run"/>
			<element type="attachment"/>
		</class>

		<class name="character" code="cha "
			description="This subdivides the text into characters.">
			<cocoa class="NSTextStorage"/>
			<type type="text"/>
			<property name="color" code="colr" type="color"
				description="The color of the first character.">
				<cocoa key="foregroundColor"/>
			</property>
			<property name="font" code="font" type="text"
				description="The name of the font of the first character.">
				<cocoa key="fontName"/>
			</property>
			<property name="size" code="ptsz" type="integer"
				description="The size in points of the first character.">
				<cocoa key="fontSize"/>
			</property>
			<element type="character"/>
			<element type="paragraph"/>
			<element type="word"/>
			<element type="attribute run"/>
			<element type="attachment"/>
		</class>

		<class name="paragraph" code="cpar"
			description="This subdivides the text into paragraphs.">
			<cocoa class="NSTextStorage"/>
			<type type="text"/>
			<property name="color" code="colr" type="color"
				description="The color of the first character.">
				<cocoa key="foregroundColor"/>
			</property>
			<property name="font" code="font" type="text"
				description="The name of the font of the first character.">
				<cocoa key="fontName"/>
			</property>
			<property name="size" code="ptsz" type="integer"
				description="The size in points of the first character.">
				<cocoa key="fontSize"/>
			</property>
			<element type="character"/>
			<element type="paragraph"/>
			<element type="word"/>
			<element type="attribute run"/>
			<element type="attachment"/>
		</class>

		<class name="word" code="cwor"
			description="This subdivides the text into words.">
			<cocoa class="NSTextStorage"/>
			<type type="text"/>
			<property name="color" code="colr" type="color"
				description="The color of the first character.">
				<cocoa key="foregroundColor"/>
			</property>
			<property name="font" code="font" type="text"
				description="The name of the font of the first character.">
				<cocoa key="fontName"/>
			</property>
			<property name="size" code="ptsz" type="integer"
				description="The size in points of the first character.">
				<cocoa key="fontSize"/>
			</property>
			<element type="character"/>
			<element type="paragraph"/>
			<element type="word"/>
			<element type="attribute run"/>
			<element type="attachment"/>
		</class>

		<class name="attribute run" code="catr"
			description="This subdivides the text into chunks that all have the same attributes.">
			<cocoa class="NSTextStorage"/>
			<type type="text"/>
			<property name="color" code="colr" type="color"
				description="The color of the first character.">
				<cocoa key="foregroundColor"/>
			</property>
			<property name="font" code="font" type="text"
				description="The name of the font of the first character.">
				<cocoa key="fontName"/>
			</property>
			<property name="size" code="ptsz" type="integer"
				description="The size in points of the first character.">
				<cocoa key="fontSize"/>
			</property>
			<element type="character"/>
			<element type="paragraph"/>
			<element type="word"/>
			<element type="attribute run"/>
			<element type="attachment"/>
		</class>

		<class name="attachment" code="atts" inherits="rich text"
			description="Represents an inline text attachment. This class is used mainly for make commands.">
			<cocoa class="NSAttachmentTextStorage"/>
			<property name="file name" code="atfn" type="text"
				description="The path to the file for the attachment">
				<cocoa key="filename"/>
			</property>
		</class>

	</suite>

	<!--
		MAX SUITE
	-->
	<suite name="Max Suite" code="MaxX" 
		description="Max specific classes.">
			
		<class name="track" plural="tracks" code="Trck"
			description="A track contained in a CD.">
			<cocoa class="Track"/>
			<property name="rip in progress" code="RIP " type="boolean" access="r" 
				description="Is this track is currently being ripped?">
				<cocoa key="ripInProgress"/>
			</property>
			<property name="encode in progress" code="EIP " type="boolean" access="r" 
				description="Is this track is currently being encoded?">
				<cocoa key="encodeInProgress"/>
			</property>
			<property name="selected" code="Selc" type="boolean"
				description="Is this track is currently selected?">
				<cocoa key="selected"/>
			</property>
			<property name="title" code="Titl" type="text"
				description="The title of the track.">
				<cocoa key="title"/>
			</property>
			<property name="artist" code="Arts" type="text"
				description="The track's artist.">
				<cocoa key="artist"/>
			</property>
			<property name="date" code="Date" type="text"
				description="The track's date.">
				<cocoa key="date"/>
			</property>
			<property name="genre" code="Genr" type="text"
				description="The track's genre.">
				<cocoa key="genre"/>
			</property>
			<property name="composer" code="Comp" type="text"
				description="The track's composer.">
				<cocoa key="composer"/>
			</property>
			<property name="size" code="Size" type="integer" access="r" 
				description="The track's size, in bytes.">
				<cocoa key="size"/>
			</property>
			<property name="minute" code="Min " type="integer" access="r" 
				description="The track's minute.">
				<cocoa key="size"/>
			</property>
			<property name="second" code="Sec " type="integer" access="r" 
				description="The track's second.">
				<cocoa key="size"/>
			</property>
			<property name="frame" code="Fram" type="integer" access="r" 
				description="The track's frame.">
				<cocoa key="size"/>
			</property>
			<property name="number" code="Num " type="integer" access="r" 
				description="The track's number.">
				<cocoa key="number"/>
			</property>
			<property name="first sector" code="FSec" type="integer" access="r" 
				description="The track's first sector.">
				<cocoa key="firstSector"/>
			</property>
			<property name="last sector" code="LSec" type="integer" access="r" 
				description="The track's last sector.">
				<cocoa key="lastSector"/>
			</property>
			<property name="channels" code="Chan" type="integer" access="r" 
				description="The number of channels in the track.">
				<cocoa key="size"/>
			</property>
			<property name="has pre-emphasis" code="PreE" type="boolean" access="r" 
				description="Does this track have pre-emphasis?">
				<cocoa key="preEmphasis"/>
			</property>
			<property name="digital copy permitted" code="Copy" type="boolean" access="r" 
				description="Does this track allows digital copies?">
				<cocoa key="copyPermitted"/>
			</property>
			<property name="ISRC" code="ISRC" type="text" access="r"
				description="The track's international standard recording code (ISRC).">
				<cocoa key="ISRC"/>
			</property>
		</class>

		<command name="convert" code="Maxconvr"
			description="Convert an audio file to a different format.">
			<direct-parameter description="The file(s) to be converted.">
				<type type="file"/>
				<type type="file" list="yes"/>
			</direct-parameter>
		</command>

		<command name="encode" code="Maxencod" 
			description="Encode the selected tracks.">
			<direct-parameter type="specifier"
				description="The document(s) containing the tracks to encode."/>
		</command>
		<command name="eject disc" code="Maxeject" 
			description="Eject the disc.">
			<direct-parameter type="specifier"
				description="The document(s) containing the disc to eject."/>
		</command>
		<command name="query MusicBrainz" code="Maxquery" 
			description="Query MusicBrainz for disc information.">
			<direct-parameter type="specifier"
				description="The document(s) containing the disc for which information is desired."/>
		</command>
		<command name="toggle track information" code="Maxtgtrc" 
			description="Toggle the display of the track information drawer.">
			<direct-parameter type="specifier"
				description="The document(s) containing the drawers to show."/>
		</command>
		<command name="toggle album art" code="Maxtgart" 
			description="Toggle the display of the album artwork information drawer.">
			<direct-parameter type="specifier"
				description="The document(s) containing the drawers to show."/>
		</command>
		<command name="download album art" code="Maxfetch" 
			description="Download album artwork from Amazon.">
			<direct-parameter type="specifier"
				description="The document(s) containing the disc for which information is desired."/>
		</command>
	
	</suite>

</dictionary>
