<?xml version="1.0" encoding="utf-8" standalone="yes"?>

<?xml-stylesheet href="./_c74_ref.xsl" type="text/xsl"?>

<!--This is an automatically generated file. DO NOT EDIT THIS FILE DIRECTLY. Rather, use the _ref.xml files found in the 'edits' folder.-->
<c74object name="autopattr" module="max" category="Data">
	<digest>
		Expose multiple objects to the pattr system
	</digest>
	<description>
		Causes multiple objects within a patcher to be automatically included in the pattr system.
		<br />
		<br />
		Note: you should use only one instance of an <o>autopattr</o> object per level in a patch.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			Max
		</metadata>
		<metadata name="tag">
			Data
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="INLET_TYPE">
			<digest>
				messages or data in
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="OUTLET_TYPE">
			<digest>
				include connection
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="1" type="OUTLET_TYPE">
			<digest>
				exclude connection
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="2" type="OUTLET_TYPE">
			<digest>
				passout
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="3" type="OUTLET_TYPE">
			<digest>
				dumpout
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg name="name" optional="1" type="symbol">
			<digest>
				Object name
			</digest>
			<description>
				A symbol argument can be used to set the <o>autopattr</o> object's <m>name</m>. In the absence of an argument, the <o>autopattr</o> object is given an arbitrary, semi-random name, such as u197000004.
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="bang">
			<arglist />
			<digest>
				Message passed through
			</digest>
			<description>
				<m>bang</m> is passed through the <o>autopattr</o> object and output from its center right outlet.
			</description>
		</method>
		<method name="int">
			<arglist>
				<arg name="input" optional="0" type="int" />
			</arglist>
			<digest>
				Message passed through
			</digest>
			<description>
				An <m>int</m> is passed through the <o>autopattr</o> object and output from its center right outlet.
			</description>
		</method>
		<method name="float">
			<arglist>
				<arg name="input" optional="0" type="float" />
			</arglist>
			<digest>
				Message passed through
			</digest>
			<description>
				<m>float</m> is passed through the <o>autopattr</o> object and output from its center right outlet.
			</description>
		</method>
		<method name="list">
			<arglist>
				<arg name="input" optional="0" type="list" />
			</arglist>
			<digest>
				Message passed through
			</digest>
			<description>
				<m>list</m> is passed through the <o>autopattr</o> object and output from its center right outlet.
			</description>
		</method>
		<method name="anything">
			<arglist>
				<arg name="input/arguments" optional="0" type="list" />
			</arglist>
			<digest>
				Analyze message, pass through non-functions
			</digest>
			<description>
				Any <m>message</m> is analyzed. If the first element of the <m>message</m> matches the name of an object maintained by the <o>autopattr</o>, the subsequent arguments in the <m>message</m> set that object's value. If the first element of the <m>message</m> matches <m>get</m> (name), where (name) matches the name of an object maintained by the <o>autopattr</o>, the value of that object is sent from the <o>autopattr</o> object's right outlet, prepended by the object's name. Otherwise, the <m>message</m> is passed through the <o>autopattr</o> object and output from its center right outlet.
			</description>
		</method>
		<method name="getattributes">
			<arglist />
			<digest>
				Report accessed objects
			</digest>
			<description>
				Causes a list of all objects names maintained by the <o>autopattr</o> object to be output from the right outlet, prepended by the symbol <m>attributes</m>.
			</description>
		</method>
		<method name="getstate">
			<arglist />
			<digest>
				Report accessed object values
			</digest>
			<description>
				Causes a series of lists to be output from the <o>autopattr</o> object's right outlet, one for every object maintained by the <o>autopattr</o>. Each list begins with the name of the object, and is followed by the object's current value.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<attributelist>
		<attribute name="autoname" get="1" set="1" type="int" size="1">
			<digest>
				Auto-name state
			</digest>
			<description>
				The word <m>autoname</m>, followed by a 1 or 0, enables or disables the <o>autopattr</o> object's autoname state. The default is 0 (off). When enabled, the <o>autopattr</o> object will automatically name any unnamed objects in the patcher supported by the <o>pattr</o> system and bind to them, if possible. Naming only occurs when the patcher loads, when the <o>autopattr</o> object is again instantiated, or when the <o>autopattr</o> object receives the message <m>autoname 1</m>. New objects placed in a patcher after the <o>autopattr</o> has been instantiated will not be autonamed until one of these conditions is met.
			</description>
		</attribute>
		<attribute name="autorestore" get="1" set="1" type="int" size="1">
			<digest>
				Auto-restore state
			</digest>
			<description>
				The word <m>autorestore</m>, followed by a 1 or 0, enables or disables the <o>autopattr</o> object's autorestore state. The default is 1 (on). When enabled, the <o>autopattr</o> object will automatically output its last-saved values when the patcher is loaded, and distribute them to bound objects. Values are saved whenever the patcher is saved.
			</description>
		</attribute>
		<attribute name="dirty" get="1" set="1" type="int" size="1">
			<digest>
				Patcher dirty flag
			</digest>
			<description>
				The word <m>dirty</m>, followed by a 1 or 0, enables or disables the patcher-dirty flag. The default is 0 (disabled). When enabled, the <o>autopattr</o> object will dirty the patch whenever its state changes.
			</description>
		</attribute>
		<attribute name="greedy" get="1" set="1" type="int" size="1">
			<digest>
				Greedy mode
			</digest>
			<description>
				The word <m>greedy</m>, followed by a 1 or 0, enables or disables the attribute-gathering feature of the <o>autopattr</o> object. The default is 0 (disabled). When enabled, any internal attributes of objects attached to the left outlet of the <o>autopattr</o> object will be exposed to the <o>pattr</o> system (as well as the normal value, if present).
			</description>
		</attribute>
		<attribute name="name" get="1" set="1" type="symbol" size="1">
			<digest>
				Object name
			</digest>
			<description>
				The word <m>name</m>, followed by a symbol, sets the <o>autopattr</o> object's patcher name.
			</description>
		</attribute>
	</attributelist>
	<!--EXAMPLE-->
	<examplelist>
		<example img="autopattr.png" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="pattr" />
		<seealso name="pattrforward" />
		<seealso name="pattrhub" />
		<seealso name="pattrmarker" />
		<seealso name="pattrstorage" />
		<seealso module="max" name="pattrchapter02" type="tutorial" />
	</seealsolist>
	<misc name="Output">
		<entry name="anything">
			<description>
				Out center-right outlet: Any <m>message</m> not matching a <m>get</m> or <m>set</m> request to an object maintained by the <o>autopattr</o> is passed, unchanged, through the center right outlet.
				<br />
				<br />
				Out right outlet: <m>get</m> queries to an object maintained by the <o>autopattr</o> are output from the right outlet, also known as the <m>dumpout</m> outlet.
			</description>
		</entry>
		<entry name="(internal)">
			<description>
				Out left outlet: Any user interface object (or other object that responds to the internal messaging system utilized by <o>autopattr</o>) connected to the left outlet of the <o>autopattr</o> object will be automatically named (if necessary) and bound to. If the <o>autopattr</o> object's <m>greedy</m> attribute has been enabled, any attributes associated with the bound object will also be exposed to the <o>pattr</o> system. The name is automatically generated from the object's class name (e.g. a connected <link name="number" type="refpage">number box</link> might be named number[1].) At the time of this writing, the following Max user interface objects can be bound in this fashion: <o>dial</o>, <o>function</o>, <o>gain~</o>, <link name="gswitch2" type="refpage">ggate</link>, <o>gswitch</o>, <o>js</o>, <o>jsui</o> (see the JavaScript in Max manual for more information on using the <o>pattr</o> system with JavaScript), <o>led</o>, <o>matrixctrl</o>, <o>multislider</o>, <link name="number" type="refpage">number box</link> (int and float), <o>pictctrl</o>, <o>pictslider</o>, <o>radiogroup</o>, <o>rslider</o>, <o>slider</o>, <o>table</o>, <o>textedit</o>, <o>toggle</o> and <o>umenu</o>.				<br />
				<br />
				Out center-left outlet: Any user interface object (or other object that responds to the internal messaging system utilized by <o>autopattr</o>) connected to the center left outlet of the <o>autopattr</o> object will be automatically named (if necessary) and excluded from the <o>autopattr</o> object's bound-object list.
			</description>
		</entry>
	</misc>
</c74object>
