<?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="led" module="max" category="U/I">
	<digest>
		Color on/off button
	</digest>
	<description>
	</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>
				int Sets LED, bang Reverses It
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="OUTLET_TYPE">
			<digest>
				Outputs 1 or 0 When LED is Changed or Set
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<palette category="Buttons" action="led" pic="led.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>
				Flash display and cause output
			</digest>
			<description>
				Flashes <o>led</o> on and off quickly, and outputs <m>0</m>.				<br />
				<br />
				Clicking on an <o>led</o> toggles it back and forth between bright and dark, outputting <m>1</m> and <m>0</m>.
			</description>
		</method>
		<method name="int">
			<arglist>
				<arg name="input" optional="0" type="int" />
			</arglist>
			<digest>
				Set on/off state and cause output
			</digest>
			<description>
				If the number is <m>0</m>, <o>led</o> shows its darkened state, and outputs <m>0</m>. If the number is not 0, <o>led</o> shows its brightened state and outputs <m>1</m>.
			</description>
		</method>
		<method name="float">
			<arglist>
				<arg name="input" optional="0" type="float" />
			</arglist>
			<digest>
				Set on/off state and cause output
			</digest>
			<description>
				Converted to <m>int</m>.
			</description>
		</method>
		<method name="(mouse)">
			<digest>
				Toggle on/off state and cause output
			</digest>
			<description>
				Clicking on an <o>led</o> object toggles it back and forth between bright and dark, outputting 1 and 0.
			</description>
		</method>
		<method name="pict">
			<arglist>
				<arg name="color" optional="0" type="int" />
			</arglist>
			<digest>
				Set graphic color
			</digest>
			<description>
				In left inlet: the word <m>pict</m>, followed by an integer, changes the color used by <o>led</o>.
			</description>
		</method>
		<method name="set">
			<arglist>
				<arg name="on/off-flag (0 or non-zero)" optional="0" type="int" />
			</arglist>
			<digest>
				Set on/off state with no output
			</digest>
			<description>
				The word <m>set</m>, followed by a non-zero number causes <o>led</o> to show its brightened state, but causes no output; <m>set 0</m> shows the <o>led</o> object in a darkened state, but causes no output.
			</description>
		</method>
		<method name="toggle">
			<arglist />
			<digest>
				Toggle on/off state and cause output
			</digest>
			<description>
				Switches the <o>led</o> from dark to bright and sends <m>1</m> out the outlet; or vice-versa, from bright to dark, sending <m>0</m> out the outlet.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<attributelist>
		<attribute name="bgcolor" get="1" set="1" type="float" size="4">
			<digest>
				Background color
			</digest>
			<description>
				Sets the background color of the <o>led</o> 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.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="button_background" />
				<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="blinktime" get="1" set="1" type="int" size="1">
			<digest>
				Flash duration
			</digest>
			<description>
				Specifies the duration (in milliseconds) that the <o>led</o> object will flash when it is clicked upon or receives a <m>bang</m> message.
			</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="Value" />
				<attribute name="default" get="1" set="1" type="int" size="1" value="150" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Blink Time in Milliseconds" />
				<attribute name="save" get="1" set="1" type="int" size="1" value="1" />
			</attributelist>
		</attribute>
		<attribute name="offcolor" get="1" set="1" type="float" size="4">
			<digest>
				Inactive LED Color
			</digest>
			<description>
				TEXT_HERE
			</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="Inactive LED Color" />
				<attribute name="legacydefault" get="1" set="1" type="float" size="4" value="0.6 0. 0. 1." />
				<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="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="oncolor" get="1" set="1" type="float" size="4">
			<digest>
				Hilited LED Color
			</digest>
			<description>
				TEXT_HERE
			</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="Hilited LED Color" />
				<attribute name="legacydefault" get="1" set="1" type="float" size="4" value="1. 0. 0. 1." />
				<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="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="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="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="thickness" get="1" set="1" type="float" size="1">
			<digest>
				LED Size (Proportional)
			</digest>
			<description>
				TEXT_HERE
			</description>
			<attributelist>
				<attribute name="category" get="1" set="1" type="atom" size="1" value="Color" />
				<attribute name="default" get="1" set="1" type="float" size="1" value="95." />
				<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="LED Size (Proportional)" />
				<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="useoffcolor" get="1" set="1" type="int" size="1">
			<digest>
				Use Inactive Color
			</digest>
			<description>
				TEXT_HERE
			</description>
			<attributelist>
				<attribute name="category" get="1" set="1" type="atom" size="1" value="Color" />
				<attribute name="default" get="1" set="1" type="int" size="1" value="1" />
				<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="Use Inactive Color" />
				<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>
	</attributelist>
	<!--EXAMPLE-->
	<examplelist>
		<example img="led.png" caption="Displays an on/off state, announces activity with a flash, or can be used as a toggle" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="button">
			Flash on any message, send a <m>bang</m> 
		</seealso>
		<seealso name="pictctrl" />
		<seealso name="togedge" />
		<seealso name="toggle" />
	</seealsolist>
	<misc name="Output">
		<entry name="int">
			<description>
				The output is <m>1</m> when <o>led</o> is bright, <m>0</m> when it is dark. A <m>bang</m> in the inlet flashes <o>led</o> on and off and sends <m>0</m> out the outlet.
			</description>
		</entry>
	</misc>
</c74object>
