<?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="mousestate" module="max" category="Interaction">
	<digest>
		Report the mouse information
	</digest>
	<description>
		Provides button status and cursor position information about the mouse/cursor when the cursor is positioned within a Max patcher window. The mouse button is sampled every 50ms, while the mouse position is sampled every input bang.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			Max
		</metadata>
		<metadata name="tag">
			Interaction
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="INLET_TYPE">
			<digest>
				bang Triggers Mouse Location Reporte
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="INLET_TYPE">
			<digest>
				bang Triggers Mouse Location Reporte
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="OUTLET_TYPE">
			<digest>
				1 if Button Down, 0 if Up
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="1" type="OUTLET_TYPE">
			<digest>
				Mouse Horizontal Location
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="2" type="OUTLET_TYPE">
			<digest>
				Mouse Vertical Location
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="3" type="OUTLET_TYPE">
			<digest>
				Mouse Delta Horizontal
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="4" type="OUTLET_TYPE">
			<digest>
				Mouse Delta Vertical
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--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>
				Output mouse information
			</digest>
			<description>
				Sends out the current horizontal and vertical coordinates of the location of the mouse, as well as the change in location since the last output.
			</description>
		</method>
		<method name="nopoll">
			<arglist />
			<digest>
				Turn off mouse polling
			</digest>
			<description>
				Undoes a <m>poll</m> message, reverting <o>mousestate</o> to its normal condition of waiting for a <m>bang</m> before reporting.
			</description>
		</method>
		<method name="mode">
			<arglist>
				<arg name="input" optional="0" type="int" />
			</arglist>
			<digest>
				Set coordinate reference mode
			</digest>
			<description>
				The word <m>mode</m>, followed by a long value specifices the type of reference to use for the mouse coordinates from the second and third outlets. A value of 0 specifies to use screen-relative coordinates where 0,0 is the top left corner of the primary display. A value of 1 specifies patcher-relative coordinates where 0,0 is the top left corner of the content area of the <o>mousestate</o> object's patcher. A value of 2 specifies front-most patcher relative coordinates where 0,0 is the top left corner of the content area of the top patcher window.
			</description>
		</method>
		<method name="poll">
			<arglist />
			<digest>
				Set output on mouse movement
			</digest>
			<description>
				Causes <o>mousestate</o> to send out the mouse location, and the change in mouse location, whenever the mouse is moved, as well as when a <m>bang</m> is received.
			</description>
		</method>
		<method name="reset">
			<arglist />
			<digest>
				Reset the location origin
			</digest>
			<description>
				Resets the 0,0 point to its default setting, in the upper left corner of the screen.
			</description>
		</method>
		<method name="zero">
			<arglist />
			<digest>
				Set the location origin
			</digest>
			<description>
				Resets the point <o>mousestate</o> considers as the 0,0 point from which to measure the mouse location. The current location of the mouse is considered the new 0,0 point.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<!--EXAMPLE-->
	<examplelist>
		<example img="mousestate.png" caption="The mouse can provide continuous or discrete values" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="modifiers" />
		<seealso name="mousefilter" />
		<seealso name="basicchapter08" module="max" type="tutorial" />
	</seealsolist>
	<misc name="Output">
		<entry name="int">
			<description>
				<o>mousestate</o> must have received at least one <m>bang</m> or <m>poll</m> message in its inlet before any output is sent out.
				<br />
				<br />
				Out left outlet: Each time the mouse button is pressed, <m>1</m> is sent out. Each time the mouse button is released, <m>0</m> is sent out.
				<br />
				<br />
				Out 2nd outlet: The horizontal location of the mouse, measured in terms of the number of pixels the mouse is to the right of the 0 point.
				<br />
				<br />
				Out 3rd outlet: The vertical location of the mouse, measured in terms of the number of pixels the mouse is below the 0 point.
				<br />
				<br />
				Out 4th outlet: The change in horizontal location of the mouse, since the last time the mouse location was reported.
				<br />
				<br />
				Out right outlet: The change in vertical location of the mouse, since the last time the mouse location was reported.
			</description>
		</entry>
	</misc>
</c74object>
