<?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="matrixctrl" module="max" category="U/I">
	<digest>
		Matrix switch control
	</digest>
	<description>
		Provides a user interface control containing a group of cells in a grid. Cell states can either be on/off or incremental steps. This object is especially useful for controlling the <o>matrix~</o> 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>
				bang Outputs All Cells, list Sets Cells
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="OUTLET_TYPE">
			<digest>
				Cell Value (Column, Row, Value)
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="1" type="OUTLET_TYPE">
			<digest>
				Row/Column Values As list
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<palette category="Buttons" action="matrixctrl" pic="matrixctrl.svg" />
	<!--ARGUMENTS-->
	<objarglist>
		<objarg id="0" name="OBJARG_NAME" type="OBJARG_TYPE" optional="0">
			<digest>
				TEXT_HERE
			</digest>
			<description>
				TEXT_HERE
			</description>
		</objarg>
	</objarglist>
	<!--parameter-->
	<parameter />
	<!--MESSAGES-->
	<methodlist>
		<method name="bang">
			<arglist />
			<digest>
				Output all cell states
			</digest>
			<description>
				<m>bang</m> causes <o>matrixctrl</o> to dump its current state in lists of three values for each cell pair, in the format
				<br />
				<br />
				horizontal-coordinate vertical-coordinate value
			</description>
		</method>
		<method name="list">
			<arglist>
				<arg name="values" optional="0" type="list" />
			</arglist>
			<digest>
				Set a group of cell states
			</digest>
			<description>
				A list of ints sets cells in the <o>matrixctrl</o> object using the format &lt;horizontal-coordinate vertical-coordinate value&gt;. Multiple triplets of values can be used to set more than one cell. Coordinates for the cells start at 0 in the upper-left hand corner and the values for each cell start at 0 and go up to the value range minus one, set by the object's inspector. Substituting the symbols <m>inc</m> and <m>dec</m> in place of the value will increment or decrement that cell coordinate by a value of one. Changing the cell state with a list causes the list to be output from <o>matrixctrl</o>.
			</description>
		</method>
		<method name="cellpicture">
			<arglist>
				<arg name="filename" optional="0" type="symbol" />
			</arglist>
			<digest>
				Set cell image (obsolete)
			</digest>
			<description>
				This is a legacy message - it has been superseded by the <m>cellpict</m> attribute.
			</description>
		</method>
		<method name="clear">
			<arglist />
			<digest>
				Clear all cell states
			</digest>
			<description>
				The word <m>clear</m> will set the value of all cells to 0.
			</description>
		</method>
		<method name="bkgndpicture">
			<arglist>
				<arg name="filename" optional="0" type="symbol" />
			</arglist>
			<digest>
				Set background image (obsolete)
			</digest>
			<description>
				This is a legacy message - it has been superseded by the <m>bkgndpict</m> attribute.
			</description>
		</method>
		<method name="enablecell">
			<arglist>
				<arg name="coordinates" optional="0" type="list" />
			</arglist>
			<digest>
				Enable a disabled cell
			</digest>
			<description>
				The word <m>enablecell</m>, followed by a list of number pairs which specify the horizontal and vertical coordinates of a cell or cells, will set any designated cell or cells which have been disabled using the <m>disablecell</m> message to respond to mouse clicks again. The <m>enablecell</m> message expects at least one pair of numbers, but more may be added to enable multiple cells (e.g., <m>enable 1 1 1 2 2 2</m>).
			</description>
		</method>
		<method name="disable">
			<arglist>
				<arg name="coordinates" optional="0" type="list" />
			</arglist>
			<digest>
				Disable cells for editing
			</digest>
			<description>
				Performs the same as <m>disablecell</m>.
			</description>
		</method>
		<method name="disablecell">
			<arglist>
				<arg name="coordinates" optional="0" type="list" />
			</arglist>
			<digest>
				Disable cells for editing
			</digest>
			<description>
				The word <m>disablecell</m>, followed by a list of number pairs which specify the horizontal and vertical coordinates of a cell or cells, sets the designated cell or cells so that they do not respond to mouse clicks. The <m>disablecell</m> message expects at least one pair of numbers, but more may be added to disable multiple cells (e.g., <m>disable 0 0 3 4 9 12</m>). Although disabled cells will ignore mouse clicks, their values can be set using messages.
			</description>
		</method>
		<method name="getcolumn">
			<arglist>
				<arg name="column" optional="0" type="int" />
			</arglist>
			<digest>
				Get all cell states in one column
			</digest>
			<description>
				The word <m>getcolumn</m>, followed by a number, sends the values of the cells in the column designated by the number out its right outlet.
			</description>
		</method>
		<method name="getrow">
			<arglist>
				<arg name="row" optional="0" type="int" />
			</arglist>
			<digest>
				Get all cell states in one row
			</digest>
			<description>
				The word <m>getrow</m>, followed by a number, sends the values of the cells in the row designated by the number out its right outlet.
			</description>
		</method>
		<method name="(mouse)">
			<digest>
				Set cell state
			</digest>
			<description>
				A mouse click on a cell will increase its value by one. Values in <o>matrixctrl</o> will wrap back to 0 once they have reached their maximum possible state. Dragging across several cells will set their values to that of the first cell clicked. Dragging across cells while holding down the Shift key will allow you to drag in straight horizontal or vertical lines only.
			</description>
		</method>
		<method name="set">
			<arglist>
				<arg name="input" optional="0" type="list" />
			</arglist>
			<digest>
				Set cell states with no output
			</digest>
			<description>
				The word <m>set</m>, followed by a list as described above, changes the state of <o>matrixctrl</o> without echoing the values to the output.
			</description>
		</method>
		<method name="readanycell">
			<arglist>
				<arg name="filename" optional="0" type="list" />
			</arglist>
			<digest>
				Read any file for a cell image
			</digest>
			<description>
				The word <m>readanycell</m> followed by the name of a file will read any type of file into the <o>matrixctrl</o> object and attempt to interpret it as a cell image.
			</description>
		</method>
		<method name="readanybkgnd">
			<arglist>
				<arg name="filename" optional="0" type="list" />
			</arglist>
			<digest>
				Read any file for a background image
			</digest>
			<description>
				The word <m>readanybkgnd</m> followed by the name of a file will read any type of file into the <o>matrixctrl</o> object and attempt to interpret it as a background image.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<attributelist>
		<attribute name="active" get="1" set="1" type="int" size="1">
			<digest>
				Respond to mouse clicks
			</digest>
			<description>
				Toggles <o>matrixctrl</o> to ignore or respond to mouse clicks, respectively. By default, <o>matrixctrl</o> responds to mouse clicks.
			</description>
			<attributelist>
				<attribute name="category" get="1" set="1" type="symbol" size="1" value="Appearance" />
				<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="Enabled" />
				<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="onoff" />
			</attributelist>
		</attribute>
		<attribute name="autosize" get="1" set="1" type="int" size="1">
			<digest>
				Automatic resizing
			</digest>
			<description>
				Toggles automatically resizing to rows and columns for the <o>matrixctrl</o> object's display area when a cell picture is added.
			</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="Behavior" />
				<attribute name="default" get="1" set="1" type="int" size="1" value="0" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Autosize to Rows &amp; Columns" />
				<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="onoff" />
			</attributelist>
		</attribute>
		<attribute name="bgcolor" get="1" set="1" type="float" size="4">
			<digest>
				Background Color
			</digest>
			<description>
				Sets the default background color 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="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="Background Color" />
				<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="bkgndpict" get="1" set="1" type="symbol" size="1">
			<digest>
				Background image
			</digest>
			<description>
				Designates the graphics file that the <o>matrixctrl</o> object will use for the matrix background image. By convention, the <o>matrixctrl</o> object uses images saved in Portable Network Graphics (.png) format. If you are using Max on Windows and want to to work with images other than PNG or PICT files, we recommend that you install QuickTime and choose a complete install of all optional components. The symbol used as a filename must either be the name of a file in Max's current search path, or an absolute pathname for the file (e.g. &quot; <m>MyDisk:/Documents/UI Pictures/CoolBkgnd.png</m>&quot;). The word <m>bkgndpicture</m> by itself puts up a standard Open Document dialog box.
			</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="Image" />
				<attribute name="default" get="1" set="1" type="symbol" size="1" value="&lt;default&gt;" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Background Image File" />
				<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="imagefile" />
			</attributelist>
		</attribute>
		<attribute name="cellpict" get="1" set="1" type="symbol" size="1">
			<digest>
				Cell image
			</digest>
			<description>
				Designates the graphics file that the <o>matrixctrl</o> object will use for each cell. By convention, the <o>matrixctrl</o> object uses images saved in Portable Network Graphics (.png) format. If you are using Max on Windows and want to to work with images other than PNG or PICT files, we recommend that you install QuickTime and choose a complete install of all optional components. The symbol used as a filename must either be the name of a file in Max's current search path, or an absolute pathname for the file (e.g. &quot; <m>MyDisk:/Documents/UI Pictures/Cell.png</m>&quot;).
			</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="Image" />
				<attribute name="default" get="1" set="1" type="symbol" size="1" value="&lt;default&gt;" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Cell Image File" />
				<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="imagefile" />
			</attributelist>
		</attribute>
		<attribute name="clickedimage" get="1" set="1" type="int" size="1">
			<digest>
				Clicked cell flag
			</digest>
			<description>
				Specifies that the graphics file used by the <o>matrixctrl</o> object contains an additional image to be displayed when a cell is clicked.
			</description>
			<attributelist>
				<attribute name="category" get="1" set="1" type="atom" size="1" value="Image" />
				<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="Has Clicked Image" />
				<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="onoff" />
			</attributelist>
		</attribute>
		<attribute name="clickvalue" get="1" set="1" type="atom_long" size="1">
			<digest>
				Click value mode
			</digest>
			<description>
				Toggles the click value mode. If the <m>clickvalue</m> message is followed by a zero or a positive number, clicking on a cell sets its value to the given number. If <m>clickvalue</m> is followed by a negative number, the matrixctrl object reverts to its default behavior in which clicking a cell increments its value. The <m>clickvalue</m> message allows the use of the <o>matrixctrl</o> object to create grid editors by creating graphics files which contain a sequence of images, each of which is assigned to a different value; as you click through the sequence of images, the cell image will change to reflect velocity, note, etc.
			</description>
			<attributelist>
				<attribute name="category" get="1" set="1" type="atom" size="1" value="Value" />
				<attribute name="default" get="1" set="1" type="atom_long" size="1" value="-1" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Click Value" />
				<attribute name="paint" get="1" set="1" type="int" size="1" value="1" />
			</attributelist>
		</attribute>
		<attribute name="color" get="1" set="1" type="float" size="4">
			<digest>
				Cell Color On
			</digest>
			<description>
				Sets the default color for a cell in the &quot;on&quot; state 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="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="Cell Color On" />
				<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="circle_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="columns" get="1" set="1" type="atom_long" size="1">
			<digest>
				Number of columns
			</digest>
			<description>
				Sets the number of columns in the <o>matrixctrl</o> object's display.
			</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="Behavior" />
				<attribute name="default" get="1" set="1" type="atom_long" size="1" value="8" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Number of Columns" />
				<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="dialmode" get="1" set="1" type="int" size="1">
			<digest>
				Dial mode
			</digest>
			<description>
				Toggles causing the object to behave like a matrix of dials where a cell will need to be clicked and dragged on to change its value. <m>dialmode 0</m> will allow cells within the matrix to react to a simple click.
			</description>
			<attributelist>
				<attribute name="category" get="1" set="1" type="atom" size="1" value="Behavior" />
				<attribute name="default" get="1" set="1" type="int" size="1" value="0" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Dial Mode" />
				<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="onoff" />
			</attributelist>
		</attribute>
		<attribute name="dialtracking" get="1" set="1" type="int" size="1">
			<digest>
				Dial mode mouse tracking
			</digest>
			<description>
				Sets whether or not the <o>matrixctrl</o> object will use vertical mouse tracking while it is in <m>dialmode</m>.
			</description>
			<attributelist>
				<attribute name="category" get="1" set="1" type="atom" size="1" value="Behavior" />
				<attribute name="default" get="1" set="1" type="int" size="1" value="0" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Dial Tracking Distance" />
				<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="elementcolor" get="1" set="1" type="float" size="4">
			<digest>
				Cell Color Off
			</digest>
			<description>
				Sets the default color for a cell in the &quot;off&quot; state 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="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="Cell Color Off" />
				<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="circle_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="horizontalmargin" get="1" set="1" type="atom_long" size="1">
			<digest>
				Horizontal margin
			</digest>
			<description>
				Sets a horizontal margin (in pixels) between the outermost cells and the edge of the matrixctrl object's bounding box.
			</description>
			<attributelist>
				<attribute name="category" get="1" set="1" type="atom" size="1" value="Appearance" />
				<attribute name="default" get="1" set="1" type="atom_long" size="1" value="1" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Horizontal Margin" />
				<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="horizontalspacing" get="1" set="1" type="atom_long" size="1">
			<digest>
				Horizontal spacing
			</digest>
			<description>
				Sets the horizontal distance (in pixels) between adjacent cells in the matrixctrl object.
			</description>
			<attributelist>
				<attribute name="category" get="1" set="1" type="atom" size="1" value="Appearance" />
				<attribute name="default" get="1" set="1" type="atom_long" size="1" value="0" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Horizontal Spacing" />
				<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="imagemask" get="1" set="1" type="int" size="1">
			<digest>
				Image mask flag
			</digest>
			<description>
				Specifies that the <o>matrixctrl</o> cell graphics file has additional rows of images for use as image masks. This attribute is present for legacy support - it has been superseded by the use of alpha channels in images.
			</description>
			<attributelist>
				<attribute name="category" get="1" set="1" type="atom" size="1" value="Image" />
				<attribute name="default" get="1" set="1" type="int" size="1" value="0" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Has Image Mask" />
				<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="onoff" />
			</attributelist>
		</attribute>
		<attribute name="inactiveimage" get="1" set="1" type="int" size="1">
			<digest>
				Inactive image flag
			</digest>
			<description>
				Specifies that the <o>matrixctrl</o> cell graphics file has additional rows of images for use in an inactive state (set with an <m>active 0</m> message).
			</description>
			<attributelist>
				<attribute name="category" get="1" set="1" type="atom" size="1" value="Image" />
				<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="Has Inactive Image" />
				<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="onoff" />
			</attributelist>
		</attribute>
		<attribute name="invisiblebkgnd" get="1" set="1" type="int" size="1">
			<digest>
				Background invisible
			</digest>
			<description>
				Specifies that the <o>matrixctrl</o> will be drawn without a background image, and its cells will be superimposed over any underlying Max objects. <m>invisiblebkgnd 0</m> disables this feature.
			</description>
			<attributelist>
				<attribute name="category" get="1" set="1" type="atom" size="1" value="Appearance" />
				<attribute name="default" get="1" set="1" type="int" size="1" value="0" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Invisible Background" />
				<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="onoff" />
			</attributelist>
		</attribute>
		<attribute name="one/column" get="1" set="1" type="int" size="1">
			<digest>
				One Non-Zero Cell Per Column
			</digest>
			<description>
				TEXT_HERE
			</description>
			<attributelist>
				<attribute name="category" get="1" set="1" type="atom" size="1" value="Behavior" />
				<attribute name="default" get="1" set="1" type="int" size="1" value="0" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="One Non-Zero Cell Per Column" />
				<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="onoff" />
			</attributelist>
		</attribute>
		<attribute name="one/matrix" get="1" set="1" type="int" size="1">
			<digest>
				Single cell-per-matrix mode
			</digest>
			<description>
				Toggles only allowing one cell in the entire object to have a non-zero state. Setting any other cell in the matrix to a non-zero state causes any other non-zero cells to change to the zero state. <m>one/matrix 0</m> removes this constraint.
			</description>
			<attributelist>
				<attribute name="category" get="1" set="1" type="atom" size="1" value="Behavior" />
				<attribute name="default" get="1" set="1" type="int" size="1" value="0" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="One Non-Zero Cell Per Matrix" />
				<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="onoff" />
			</attributelist>
		</attribute>
		<attribute name="one/row" get="1" set="1" type="int" size="1">
			<digest>
				Single cell-per-row mode
			</digest>
			<description>
				Toggles only allowing one cell per row to have a non-zero state. Setting any cell in a row to a non-zero state causes any other non-zero cells to change to the zero state. <m>one/row 0</m> removes this constraint.
			</description>
			<attributelist>
				<attribute name="category" get="1" set="1" type="atom" size="1" value="Behavior" />
				<attribute name="default" get="1" set="1" type="int" size="1" value="0" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="One Non-Zero Cell Per Row" />
				<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="onoff" />
			</attributelist>
		</attribute>
		<attribute name="parameter_enable" get="1" set="1" type="int" size="1">
			<digest>
				Enable parameter mode handling
			</digest>
			<description>
				Enables use of this object with <link type="vignette" module="core" name="live_parameters">Max for Live Parameters</link> and allows for <link type="vignette" module="core" name="parameter_enable">setting initial parameter values</link> in the Max environment.
			</description>
			<attributelist>
				<attribute name="category" get="1" set="1" type="atom" size="1" value="Parameter" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Parameter Mode Enable" />
				<attribute name="order" 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="onoff" />
			</attributelist>
		</attribute>
		<attribute name="range" get="1" set="1" type="atom_long" size="1">
			<digest>
				Number of cell states
			</digest>
			<description>
				Sets the number of possible states each cell can have. It must be set to a value of at least 2 (for states 0 and 1).
			</description>
			<attributelist>
				<attribute name="category" get="1" set="1" type="atom" size="1" value="Value" />
				<attribute name="default" get="1" set="1" type="atom_long" size="1" value="2" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Cell Range" />
				<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="rows" get="1" set="1" type="atom_long" size="1">
			<digest>
				Number of rows
			</digest>
			<description>
				Sets the number of rows in the <o>matrixctrl</o> object's display.
			</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="Behavior" />
				<attribute name="default" get="1" set="1" type="atom_long" size="1" value="4" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Number of Rows" />
				<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="scale" get="1" set="1" type="int" size="1">
			<digest>
				Graphic scaling flag
			</digest>
			<description>
				Toggles scaling graphics when the <o>matrixctrl</o> object's display area is resized.
			</description>
			<attributelist>
				<attribute name="category" get="1" set="1" type="atom" 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="Scale When Resized" />
				<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="onoff" />
			</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="verticalmargin" get="1" set="1" type="atom_long" size="1">
			<digest>
				Vertical margin
			</digest>
			<description>
				Sets a vertical margin (in pixels) between the outermost cells and the edge of the matrixctrl object's bounding box.
			</description>
			<attributelist>
				<attribute name="category" get="1" set="1" type="atom" size="1" value="Appearance" />
				<attribute name="default" get="1" set="1" type="atom_long" size="1" value="1" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Vertical Margin" />
				<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="verticalspacing" get="1" set="1" type="atom_long" size="1">
			<digest>
				Vertical spacing
			</digest>
			<description>
				Sets the vertical distance (in pixels) between adjacent cells in the <o>matrixctrl</o> object.
			</description>
			<attributelist>
				<attribute name="category" get="1" set="1" type="atom" size="1" value="Appearance" />
				<attribute name="default" get="1" set="1" type="atom_long" size="1" value="0" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Vertical Spacing" />
				<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>
	</attributelist>
	<!--EXAMPLE-->
	<examplelist>
		<example img="matrixctrl.png" caption="matrixctrl can be used to control multiple gates and switches at once" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="dial" />
		<seealso name="kslider" />
		<seealso name="matrix~" />
		<seealso name="pictctrl" />
		<seealso name="pictslider" />
		<seealso name="router" />
		<seealso name="rslider" />
		<seealso name="slider" />
		<seealso name="ubutton" />
		<seealso name="basicchapter21" module="max" type="tutorial" />
		<seealso name="jitterchapter26" module="jit" type="tutorial" />
	</seealsolist>
	<discussion>
		<o>matrixctrl</o> is a user interface object that consists of a rectangular grid of switch-like controls called cells. All of the cells in a <o>matrixctrl</o> object have the same appearance and behavior. Each cell has two or more states. By default, the cells have two states, representing &quot;off&quot; and &quot;on.&quot; You can create cells with any number of states. Clicking on a cell increases its state by one. After a cell reaches its last state, it returns to its zero state when clicked again--thus, a cell with only two states will toggle back and forth between these states with each mouse click.
		<br />
		<br />
		<o>matrixctrl</o> was originally constructed to control the MSP object <o>matrix~</o>, but is useful for other user interface applications, such as groups of switches, groups of visual indicators, and drum-machine-oriented sequencers.
		<br />
		<br />
		Note: The <o>matrixctrl</o> object customarily uses images saved in Portable Network Graphics (.png) format. If you are using Max on Windows, we recommend that you install QuickTime and choose a complete install of all optional components to work with images other than PNG or PICT files.
	</discussion>
	<misc name="Picture File Format">
		<entry name="Specifications">
			<description>
				The background pictures the <o>matrixctrl</o> object uses are, by convention, saved in Portable Network Graphics (.png) format. If you are using Max on Windows and want to to work with images other than PNG or PICT files, we recommend that you install QuickTime and choose a complete install of all optional components. The symbol used as a filename must either be the name of a file in Max's current search path, or an absolute pathname for the file (e.g. &quot; <m>MyDisk:/Documents/UI Pictures/Cell.png</m>&quot;). If the <o>matrixctrl</o> is larger than the chosen picture, copies of the picture will be added to fill the object.
				<br />
				<br />
				Cell picture files must be in the following format:
				<br />
				<br />
				<img src="images/image137.png" />
				<br />
				<br />
				<br />
				<br />
				The picture is made up of a grid of images. All images have the same width and height. Each column of images represents one cell state. The picture must have at least two columns, since cells must have at least two states.
				<br />
				<br />
				The first row of images is used for the idle (or &quot;not clicked&quot;) appearance of the cells. The first row of images is mandatory; all subsequent rows are optional. The second row are images for the clicked appearance; these images will be used to draw the cell when it is clicked. The appearance of the cell reverts to its idle image when the mouse is released. The third row of images are used when the <o>matrixctrl</o> is in its inactive state, i.e. when it has received an <m>active 0</m> message.
				<br />
				<br />
				Image masks can be used to create cells with non-rectangular outlines. These masks are in the lower rows of the picture file. If you wish to use masks for any of the cell images, you must provide masks for all of them--each row of images will have a corresponding row of masks. Like all masks for Max's picture-based controls, black pixels create areas of the corresponding image that will be drawn, and while pixels create invisible areas.
			</description>
		</entry>
	</misc>
	<misc name="Output">
		<entry name="list">
			<description>
				When a cell changes state in response to a mouse click, a list is sent out the <o>matrixctrl</o> object's left outlet. The list contains the column, row, and value (state) of the clicked control. Individual cells can also be set by sending lists to the object's left inlet. Rows and columns are numbered starting with zero, at the upper-left corner of the matrix.
				<br />
				<br />
				The numbers received in the inlet are compared with the arguments. If the numbers are the same, and in the same order, they are sent out the outlet as a list.
			</description>
		</entry>
	</misc>
</c74object>
