<?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="preset" module="max" category="U/I">
	<digest>
		Store and recall settings
	</digest>
	<description>
		<o>preset</o> can store and recall the parameters of any specified user interface objects at the click of a mouse. It can also be used as a user interface link to a named pattrstorage object.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			Max
		</metadata>
		<metadata name="tag">
			U/I
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="INLET_TYPE">
			<digest>
				Store or Recall Presets
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="OUTLET_TYPE">
			<digest>
				Connect to Objects to Include in a Preset
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="1" type="OUTLET_TYPE">
			<digest>
				Preset Number When Recalled
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="2" type="OUTLET_TYPE">
			<digest>
				Connect to Objects to Exclude From a Preset
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="3" type="OUTLET_TYPE">
			<digest>
				Preset Number When Stored
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<palette action="preset" category="Basic" order="10" pic="preset.svg" />
	<!--ARGUMENTS-->
	<objarglist>
		<objarg id="0" name="OBJARG_NAME" type="OBJARG_TYPE" optional="0">
			<digest>
				TEXT_HERE
			</digest>
			<description>
				TEXT_HERE
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="bang">
			<arglist />
			<digest>
				Recall last preset
			</digest>
			<description>
				Sends out the settings of the preset that was most recently recalled with an <m>int</m> or a mouse click.
			</description>
		</method>
		<method name="int">
			<arglist>
				<arg name="slotnumber" optional="0" type="int" />
			</arglist>
			<digest>
				Recall numbered preset
			</digest>
			<description>
				Sending any integer will trigger the preset of the same number.
			</description>
		</method>
		<method name="float">
			<arglist>
				<arg name="preset-number" optional="0" type="float" />
			</arglist>
			<digest>
				Converted to <m>int</m>.
			</digest>
			<description>
			</description>
		</method>
		<method name="list">
			<arglist />
			<digest>
				Recall last preset
			</digest>
			<description>
				See the <m>bang</m> listing.
			</description>
		</method>
		<method name="clear">
			<arglist>
				<arg name="slotnumber" optional="0" type="int" />
			</arglist>
			<digest>
				Erase a specific preset
			</digest>
			<description>
				Erases the contents of the most recently sent preset. The word <m>clear</m>, followed by a number, erases the contents of that numbered preset.
			</description>
		</method>
		<method name="clearall">
			<arglist />
			<digest>
				Erase all presets
			</digest>
			<description>
				Erases the contents of all presets.
			</description>
		</method>
		<method name="(mouse)">
			<digest>
				Store and recall presets
			</digest>
			<description>
				Clicking on a button in the <o>preset</o> object will recall a stored preset.
				<br />
				<br />
				Shift-clicking on a button in the <o>preset</o> object will store a preset.
			</description>
		</method>
		<method name="name">
			<arglist>
				<arg name="ID" optional="0" type="symbol" />
			</arglist>
			<digest>
				Specify ID for preset files
			</digest>
			<description>
				The word <m>name</m>, followed by a symbol, sets the ID Name for the preset. The ID Name allows the preset to have a unique ID so that files created for it will not read into other presets.
			</description>
		</method>
		<method name="store">
			<arglist>
				<arg name="slotnumber" optional="0" type="int" />
			</arglist>
			<digest>
				Store a preset slot
			</digest>
			<description>
				The word <m>store</m>, followed by a number, stores the current setting of all user interface objects in the same window in the preset indicated by the number. If objects are connected to the <o>preset</o> object's left outlet with patch cords, only those connected objects will be affected.
				<br />
				<br />
				The presets (storage locations in the <o>preset</o> object) are numbered left-to-right, top-to-bottom. When settings are stored in a preset, the dot's color changes to indicate that it contains something. Settings can also be stored in a preset by holding down the Shift key and clicking on the preset with the mouse.
			</description>
		</method>
		<method name="read">
			<arglist>
				<arg name="filename" optional="1" type="symbol" />
				<arg name="slotnumber" optional="1" type="int" />
			</arglist>
			<digest>
				Read a preset file
			</digest>
			<description>
				The word <m>read</m>, followed by no arguments or a number, displays an Open Document dialog box for choosing a file of preset data to read. If the preset has been given a Preset Name Code, only files of the type specified by the code will be displayed. The number argument specifies the preset number into which the file data should be read. If the number is 0 or -1, the data in the file will be read into the number of presets contained in the file starting with the first one. If the word <m>read</m> is followed by a symbol or a number and a symbol, no dialog box is displayed. Instead, the symbol is taken as a filename from which to read presets. The number functions as previously described.
			</description>
		</method>
		<method name="write">
			<arglist>
				<arg name="filename" optional="1" type="symbol" />
				<arg name="slotnumber" optional="1" type="int" />
			</arglist>
			<digest>
				Write a preset file
			</digest>
			<description>
				The word <m>write</m>, followed by no arguments or a number, displays a Save As dialog box for specifying a destination filename for writing the preset data. If the preset has been given a Preset Name Code, the file is given this code as its file type. The number argument specifies the preset number from which the preset data should be written. If the number is 0 or -1, all presets will be written. If the word <m>write</m> is followed by a symbol or a number and a symbol, no dialog box is displayed. Instead, the symbol is taken as a filename to use for writing the data, and the file will be placed in the current default folder. The number functions as previously described.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<attributelist>
		<attribute name="active1" get="1" set="1" type="float" size="4">
			<digest>
				Active Color
			</digest>
			<description>
				Sets the active preset color of the object in RGBA format
			</description>
			<attributelist>
				<attribute name="category" get="1" set="1" type="atom" size="1" value="Color" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Active Color" />
				<attribute name="legacydefault" get="1" set="1" type="float" size="4" value="0.79 0.83 1. 1." />
				<attribute name="paint" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="preview" get="1" set="1" type="symbol" size="1" value="rect_fill" />
				<attribute name="save" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="set" get="1" set="1" type="pointer" size="1" value="pointer" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="rgba" />
				<attribute name="stylemap" get="1" set="1" type="symbol" size="1" value="color" />
			</attributelist>
		</attribute>
		<attribute name="active2" get="1" set="1" type="atom" size="1">
			<digest>
				TEXT_HERE
			</digest>
			<description>
				TEXT_HERE
			</description>
			<attributelist>
				<attribute name="invisible" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="obsolete" get="1" set="1" type="int" size="1" value="1" />
			</attributelist>
		</attribute>
		<attribute name="bgcolor" get="1" set="1" type="float" size="4">
			<digest>
				Background Color
			</digest>
			<description>
				Sets the background color of the object in RGBA format
			</description>
			<attributelist>
				<attribute name="basic" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="category" get="1" set="1" type="atom" size="1" value="Color" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Background Color" />
				<attribute name="legacydefault" get="1" set="1" type="float" size="4" value="0.94 0.94 0.94 1." />
				<attribute name="paint" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="preview" get="1" set="1" type="symbol" size="1" value="rect_fill" />
				<attribute name="save" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="set" get="1" set="1" type="pointer" size="1" value="pointer" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="rgba" />
			</attributelist>
		</attribute>
		<attribute name="bordercolor" get="1" set="1" type="atom" size="1">
			<digest>
				TEXT_HERE
			</digest>
			<description>
				TEXT_HERE
			</description>
			<attributelist>
				<attribute name="invisible" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="obsolete" get="1" set="1" type="int" size="1" value="1" />
			</attributelist>
		</attribute>
		<attribute name="bubblesize" get="1" set="1" type="int32" size="1">
			<digest>
				Bubble size
			</digest>
			<description>
				Sets the size of the preset &quot;bubble&quot;, in pixels. A bubble must be larger than 2 pixels.
			</description>
			<attributelist>
				<attribute name="category" get="1" set="1" type="symbol" size="1" value="Appearance" />
				<attribute name="default" get="1" set="1" type="int32" size="1" value="8" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Slot Size" />
				<attribute name="paint" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="save" get="1" set="1" type="int" size="1" value="1" />
			</attributelist>
		</attribute>
		<attribute name="circlecolor" get="1" set="1" type="atom" size="1">
			<digest>
				TEXT_HERE
			</digest>
			<description>
				TEXT_HERE
			</description>
			<attributelist>
				<attribute name="invisible" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="obsolete" get="1" set="1" type="int" size="1" value="1" />
			</attributelist>
		</attribute>
		<attribute name="clicked1" get="1" set="1" type="atom" size="1">
			<digest>
				TEXT_HERE
			</digest>
			<description>
				TEXT_HERE
			</description>
			<attributelist>
				<attribute name="invisible" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="obsolete" get="1" set="1" type="int" size="1" value="1" />
			</attributelist>
		</attribute>
		<attribute name="clicked2" get="1" set="1" type="atom" size="1">
			<digest>
				TEXT_HERE
			</digest>
			<description>
				TEXT_HERE
			</description>
			<attributelist>
				<attribute name="invisible" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="obsolete" get="1" set="1" type="int" size="1" value="1" />
			</attributelist>
		</attribute>
		<attribute name="embed" get="1" set="1" type="int" size="1">
			<digest>
				Save presets with the patcher
			</digest>
			<description>
				Toggles the ability to save your presets as part of the main patch (The default behavior is 1 (save presets with the patcher).
			</description>
			<attributelist>
				<attribute name="basic" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="category" get="1" set="1" type="symbol" size="1" value="Behavior" />
				<attribute name="default" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Save Preset in Patcher" />
				<attribute name="save" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="onoff" />
			</attributelist>
		</attribute>
		<attribute name="emptycolor" get="1" set="1" type="float" size="4">
			<digest>
				Empty Color
			</digest>
			<description>
				TEXT_HERE
			</description>
			<attributelist>
				<attribute name="category" get="1" set="1" type="atom" size="1" value="Color" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Empty Color" />
				<attribute name="legacydefault" get="1" set="1" type="float" size="4" value="0.83 0.83 0.83 1." />
				<attribute name="paint" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="preview" get="1" set="1" type="symbol" size="1" value="rect_fill" />
				<attribute name="save" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="set" get="1" set="1" type="pointer" size="1" value="pointer" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="rgba" />
				<attribute name="stylemap" get="1" set="1" type="symbol" size="1" value="elementcolor" />
			</attributelist>
		</attribute>
		<attribute name="margin" get="1" set="1" type="atom" size="1">
			<digest>
				Panel edge spacing
			</digest>
			<description>
				Sets the edge spacing in pixels, for the <o>preset</o> object's panel
			</description>
			<attributelist>
				<attribute name="invisible" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="obsolete" get="1" set="1" type="int" size="1" value="1" />
			</attributelist>
		</attribute>
		<attribute name="pattrstorage" get="1" set="1" type="symbol" size="1">
			<digest>
				Link to named <o>pattrstorage</o> object
			</digest>
			<description>
				the <m>pattrstorage</m> attribute takes as its argument the name of a <o>pattrstorage</o> object and sets the <o>preset</o> object to allow its use as a user interface object for the named <o>pattrstorage</o> object's contents.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Pattrstorage" />
			</attributelist>
		</attribute>
		<attribute name="showtrack" get="1" set="1" type="atom" size="1">
			<digest>
				Show preset numbers/names on mouseover
			</digest>
			<description>
				Toggles the display of preset numbers on mouse-over. The default setting is 1 (on).
				<br />
				<br />
				If a <o>preset</o> object is linked to a <o>pattrstorage</o> object whose presets are identified using the <m>slotname</m> message, the slot name for the corresponding <o>pattrstorage</o> slot will be displayed on mouseover.
			</description>
			<attributelist>
				<attribute name="invisible" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="obsolete" get="1" set="1" type="int" size="1" value="1" />
			</attributelist>
		</attribute>
		<attribute name="spacing" get="1" set="1" type="atom" size="1">
			<digest>
				Bubble spacing
			</digest>
			<description>
				Sets the spacing, in pixels, between bubbles
			</description>
			<attributelist>
				<attribute name="invisible" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="obsolete" get="1" set="1" type="int" size="1" value="1" />
			</attributelist>
		</attribute>
		<attribute name="stored1" get="1" set="1" type="float" size="4">
			<digest>
				Stored Color
			</digest>
			<description>
				Sets the stored preset color of the object in RGBA format.
			</description>
			<attributelist>
				<attribute name="category" get="1" set="1" type="atom" size="1" value="Color" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Stored Color" />
				<attribute name="legacydefault" get="1" set="1" type="float" size="4" value="0.412 0.412 0.412 1." />
				<attribute name="paint" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="preview" get="1" set="1" type="symbol" size="1" value="rect_fill" />
				<attribute name="save" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="set" get="1" set="1" type="pointer" size="1" value="pointer" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="rgba" />
				<attribute name="stylemap" get="1" set="1" type="symbol" size="1" value="accentcolor" />
			</attributelist>
		</attribute>
		<attribute name="stored2" get="1" set="1" type="atom" size="1">
			<digest>
				TEXT_HERE
			</digest>
			<description>
				TEXT_HERE
			</description>
			<attributelist>
				<attribute name="invisible" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="obsolete" get="1" set="1" type="int" size="1" value="1" />
			</attributelist>
		</attribute>
		<attribute name="style" get="1" set="1" type="symbol" size="1">
			<digest>
				Style
			</digest>
			<description>
				Sets the <link type="vignette" module="core" name="styles">style</link> to be applied to the object. Styles can be set using the <link type="vignette" module="core" name="format_palette">Format palette</link>.
			</description>
			<attributelist>
				<attribute name="category" get="1" set="1" type="symbol" size="1" value="Appearance" />
				<attribute name="introduced" get="1" set="1" type="symbol" size="1" value="7.0.0" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Style" />
				<attribute name="paint" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="save" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="style" />
			</attributelist>
		</attribute>
		<attribute name="textcolor" get="1" set="1" type="float" size="4">
			<digest>
				Text Color
			</digest>
			<description>
				Sets the text color of the object in RGBA format.
			</description>
			<attributelist>
				<attribute name="category" get="1" set="1" type="atom" size="1" value="Color" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Text Color" />
				<attribute name="legacydefault" get="1" set="1" type="float" size="4" value="0.5 0.5 0.5 1." />
				<attribute name="paint" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="preview" get="1" set="1" type="symbol" size="1" value="text_number" />
				<attribute name="save" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="set" get="1" set="1" type="pointer" size="1" value="pointer" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="rgba" />
			</attributelist>
		</attribute>
	</attributelist>
	<!--EXAMPLE-->
	<examplelist>
		<example img="preset.png" caption="Remember many past settings and recall them later" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="grab" />
		<seealso module="max" name="pattrchapter01" type="tutorial" />
	</seealsolist>
	<misc name="Output">
		<entry name="int or float">
			<description>
				Out left outlet: When a preset is recalled, either by a mouse click or by a number in the inlet, the settings stored in that preset are sent out the outlet to all connected objects, or, if no objects are connected, to all user interface objects in the window.
			</description>
		</entry>
		<entry name="int">
			<description>
				Out second outlet: When a preset is recalled, the number of the preset is sent out.
			</description>
		</entry>
		<entry name="int">
			<description>
				Out fourth outlet: When a preset is stored, the number of the preset is sent out.
			</description>
		</entry>
		<entry name="(internal)">
			<description>
				Any user interface objects connected to the third outlet of <o>preset</o> will be excluded from the effects of that <o>preset</o>. (This is particularly useful when there are many objects you want to affect with <o>preset</o>, and only a few you want to exclude.)
				<br />
				<br />
				Objects whose data is stored in a preset include almost all user interface objects. Although an <o>itable</o> object will get stored and recalled, a <o>table</o> object must be connected to the <o>preset</o> object's outlet with a patch cord. The outlet of <o>preset</o> can also be connected to a <o>send</o> object, to communicate with objects connected to a <o>receive</o> object of the same name.
				<br />
				<br />
				The number of visible presets can be adjusted by resizing the <o>preset</o> object's box. The maximum number of presets in a single <o>preset</o> object is 2048.
			</description>
		</entry>
	</misc>
</c74object>
