<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<?xml-stylesheet href="./_c74_ref.xsl" type="text/xsl"?>

<maxreference name="t.button" type="object" category="UI">
	<digest>A versatile hybrid UI button combining button, toggle, live.text, and pictctrl properties</digest>
	<description>
		An advanced custom user interface component that consolidates multiple standard Max interactive interaction styles into a single sleek layout space. Features a dynamic Jitter popup attribute panel and custom formatting controls.
	</description>

	<!-- INLETS -->
	<inletlist>
		<inlet id="0" type="int/float/bang">
			<digest>Triggers button behavior or directly sets internal values</digest>
			<description>
				Accepts <m>bang</m>, <m>int</m>, or <m>float</m> to activate the button. Behavior varies dynamically depending on the current active <at>mode</at>.
			</description>
		</inlet>
	</inletlist>

	<!-- OUTLETS -->
	<outletlist>
		<outlet id="0" type="int">
			<digest>Button state output (0 or 1)</digest>
			<description>Outputs the current active state of the button.</description>
		</outlet>
		<outlet id="1" type="list">
			<digest>Attribute configuration dump</digest>
			<description>Outputs settings adjustments made inside the popup interaction view windows.</description>
		</outlet>
	</outletlist>

	<!-- MESSAGES -->
	<methodlist>
		<method name="bang">
			<digest>Triggers the button state contextually</digest>
			<description>
				In <at>mode</at> 0 (touch-hold), sends an immediate momentary toggle cycle output. In mode 1 (toggle), flips the state on/off. In mode 2 (momentary), fires a standard self-timed timed click flash sequence.
			</description>
		</method>
		<method name="int">
			<digest>Sets the button state directly</digest>
			<description>
				Any value greater than 0 activates the button state; 0 releases or turns it off. In mode 2 (momentary), receiving a 1 activates the brief timed flash block.
			</description>
		</method>
	</methodlist>

	<!-- ATTRIBUTES -->
	<attributelist>
		<attribute name="mode" get="1" set="1" type="int" size="1">
			<digest>Sets the functional interaction logic behavior profile</digest>
			<description>
				Supported profiles are:
				<br />
				0 = <b>touch-hold</b> (Emulates native <o>pictctrl</m> mouse tracking logic loops)
				<br />
				1 = <b>toggle</b> (Emulates persistent <o>toggle</m> or <o>live.text</m> on/off status flips)
				<br />
				2 = <b>momentary</b> (Emulates traditional <o>button</m> flash animations)
			</description>
		</attribute>
		<attribute name="allowPopup" get="1" set="1" type="int" size="1">
			<digest>Toggles the availability of the advanced floating attribute view subwindow</digest>
			<description>
				When enabled (1), developers can click a corner button to expand a hidden configuration control overlay menu. When disabled (0), interaction remains locked strictly to the canvas base.
			</description>
		</attribute>
		<attribute name="labelOff" get="1" set="1" type="symbol" size="1">
			<digest>Text displayed when the button state is off</digest>
		</attribute>
		<attribute name="labelOn" get="1" set="1" type="symbol" size="1">
			<digest>Text displayed when the button state is on</digest>
		</attribute>
		<attribute name="radius" get="1" set="1" type="float" size="1">
			<digest>Corner radius layout curvature for rounded rectangles</digest>
		</attribute>
		<attribute name="bordersize" get="1" set="1" type="float" size="1">
			<digest>Stroke thickness pixels for the perimeter accent outline</digest>
		</attribute>
	</attributelist>
</maxreference>
