<?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="radiogroup" module="max" category="U/I">
	<digest>
		Radio button or check box
	</digest>
	<description>
		Provides a user interface for option selection. There are two modes of operation: radio button and checkbox.
	</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>
				Flags and Commands
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="OUTLET_TYPE">
			<digest>
				Flags Out
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<palette category="Interface, Buttons" action="radiogroup" pic="radiogroup.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 the current value
			</digest>
			<description>
				In radio button mode: A <m>bang</m> outputs the currently selected radio button number.
				<br />
				<br />
				In check box mode: A <m>bang</m> outputs a list of zeros and ones representing the on/off state of the check boxes.
				<br />
				<br />
				In flag mode: A <m>bang</m> send the integer that corresponds to the bit pattern of the currently checked boxes (i.e., if boxes one, two, and three are checked, a <m>bang</m> will output a value of <m>7</m>)out the <o>radiogroup</o> object's output.
			</description>
		</method>
		<method name="int">
			<arglist>
				<arg name="selection" optional="0" type="int" />
			</arglist>
			<digest>
				Set the value, display and cause output
			</digest>
			<description>
				In radio button mode: An integer sets the radio button selection and outputs the input value. Numbering starts with 0, and a negative number indicates that no buttons will be selected.
				<br />
				<br />
				In flag mode: An integer value received in the <o>radiogroup</o> object's inlet will set the buttons or checkboxes to reflect the bit pattern of the integer value (i.e., a value of 19 will select boxes one, two, and five, corresponding to the binary value <m>10011</m>) and send the integer value out the <o>radiogroup</o> object's output.
			</description>
		</method>
		<method name="list">
			<arglist>
				<arg name="states" optional="0" type="list" />
			</arglist>
			<digest>
				Set checkbox states
			</digest>
			<description>
				In check box mode: list of zeros and ones sets the check box states and causes output of the input list. If you have specified check box mode and have the flag mode set using the <m>flagmode 1</m> message, a list of zeros and ones sets the check box states and causes output of the input list.
			</description>
		</method>
		<method name="enableitem">
			<arglist>
				<arg name="indices" optional="0" type="list" />
			</arglist>
			<digest>
				Enable checkbox/radio-button items
			</digest>
			<description>
				In radio button and check box modes: The word <m>enableitem</m>, followed by followed by a number or list of numbers, will enable the items whose numbers are indicated if they have been disabled with the <m>disableitem</m> message.
			</description>
		</method>
		<method name="disableitem">
			<arglist>
				<arg name="indices" optional="0" type="list" />
			</arglist>
			<digest>
				Disable checkbox/radio-button items
			</digest>
			<description>
				In radio button and check box modes: disable the items whose numbers are indicated (they will be drawn in grey and will not respond to clicks, although they will still respond to <m>set</m> messages, ints or lists).
			</description>
		</method>
		<method name="(mouse)">
			<digest>
				Set object values
			</digest>
			<description>
				In <m>radio button</m> mode, clicking on a radio button will set the radio button selection and output the corresponding button number (numbering starts from zero). In <m>check box</m> mode, clicking on a check box will change its state (from one to zero or from zero to one) and output a list of zeros and ones corresponding to the on/off state of the boxes. if the entire group of buttons/boxes is inactive (grayed out) it will not respond to clicks. if an individual item is disabled (grayed out) it will not respond to clicks, although active items in the group will still respond to clicks as usual. The <m>Flag Mode</m> variation on the <m>check box</m> mode has check boxes that correspond to bit positions for a binary value (i.e. the first checkbox corresponds to the 1s, the second to 2s, the third to 4s, etc.) Clicking on a check box will select or deselect the check box and output the integer value which corresponds to the bit pattern.
			</description>
		</method>
		<method name="set">
			<arglist>
				<arg name="selection" optional="0" type="list" />
			</arglist>
			<digest>
				Set the value with no output
			</digest>
			<description>
				In radio button mode: The word <m>set</m>, followed by a number, sets the currently selected radio button without triggering any output.
				<br />
				<br />
				In check box mode: The word <m>set</m>, followed by a list of zeros and ones, sets the check box states without triggering any output.
				<br />
				<br />
				If you are using check box mode and are also using Flag Mode, a number will set the state of the first 32 checkboxes in a pattern which corresponds to the bit pattern of the number without triggering output (see the <m>flagmode</m> section for more information).
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<attributelist>
		<attribute name="activecolor" get="1" set="1" type="float" size="4">
			<digest>
				Active item color
			</digest>
			<description>
				Sets the color for the active radiobuttons/checkboxes 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="Color" />
				<attribute name="legacydefault" get="1" set="1" type="float" size="4" value="0. 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="bgcolor" get="1" set="1" type="float" size="4">
			<digest>
				Background color
			</digest>
			<description>
				Sets the background color for 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="1. 1. 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" />
			</attributelist>
		</attribute>
		<attribute name="elementcolor" get="1" set="1" type="float" size="4">
			<digest>
				Off 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="Off 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="side_arch" />
				<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="enabled" get="1" set="1" type="atom" size="1">
			<digest>
				Enables/disable buttons
			</digest>
			<description>
				Enables/disables buttons. The word <m>enabled</m>, followed by followed by a list of zeroes and ones whose length is the same as the number of buttons or boxes, will disable (0) or enable (1) the item in the list position that corresponds to the button or box (e.g., <m>enableitem 1 1 1 0</m> will disable only the fourth button or box).
			</description>
			<attributelist>
				<attribute name="category" get="1" set="1" type="atom" size="1" value="Value" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Items Enabled" />
				<attribute name="paint" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="selfsave" get="1" set="1" type="int" size="1" value="1" />
			</attributelist>
		</attribute>
		<attribute name="flagmode" get="1" set="1" type="int" size="1">
			<digest>
				Flag mode
			</digest>
			<description>
				Sets the flag mode of operation for the <o>radiogroup</o> object. In this mode, each check box corresponds to one bit in an integer value (i.e., the first radio button or checkbox corresponds to the ones bit, the second button or checkbox to the twos bit, the third button or checkbox to the fours bit, etc.). The message <m>flagmode 0</m> disables this mode (default).
			</description>
			<attributelist>
				<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="0" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Output Using Single Number (Merged Binary Flags)" />
				<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="inactive" get="1" set="1" type="int" size="1">
			<digest>
				Inactive state
			</digest>
			<description>
				Toggles the active or inactive state of the entire group of radio buttons or check boxes.
			</description>
			<attributelist>
				<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="0" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Is Entire Group Inactive?" />
				<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="inactivecolor" get="1" set="1" type="atom" size="1">
			<digest>
				Inactive item color
			</digest>
			<description>
				Sets the color for the inactive radiobuttons/checkboxes in RGBA format.
			</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="itemtype" get="1" set="1" type="atom_long" size="1">
			<digest>
				Operation mode
			</digest>
			<description>
				Selects the mode of operation for the <o>radiogroup</o> object.
				<br />
				<m>Button</m> (the default)
				<br />
				<m>Checkbox</m> 
			</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="atom_long" size="1" value="0" />
				<attribute name="enumvals" get="1" set="1" type="atom" size="2">
					<enumlist>
						<enum name="Radio Buttons">
							<digest>
								TEXT_HERE
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="Check Boxes">
							<digest>
								TEXT_HERE
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
					</enumlist>
				</attribute>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Item Type" />
				<attribute name="paint" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="selfsave" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="enumindex" />
			</attributelist>
		</attribute>
		<attribute name="offset" get="1" set="1" type="int" size="1">
			<digest>
				Pixel offset
			</digest>
			<description>
				Sets the pixel offset (spacing) between the tops of the buttons/boxes. the minimum offset is 14 pixels, the default offset is 16 pixels.
			</description>
			<attributelist>
				<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="16" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Offset" />
				<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="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="selection" get="1" set="1" type="atom" size="1">
			<digest>
				Currently selected button or box
			</digest>
			<description>
				Specifies the currently selected button or box.
			</description>
			<attributelist>
				<attribute name="category" get="1" set="1" type="atom" size="1" value="Value" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Current Selection" />
				<attribute name="paint" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="selfsave" get="1" set="1" type="int" size="1" value="1" />
			</attributelist>
		</attribute>
		<attribute name="shape" get="1" set="1" type="int" size="1">
			<digest>
				Shape
			</digest>
			<description>
				TEXT_HERE
			</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="0" />
				<attribute name="enumvals" get="1" set="1" type="atom" size="3">
					<enumlist>
						<enum name="Classic">
							<digest>
								TEXT_HERE
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="Square">
							<digest>
								TEXT_HERE
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="Circle">
							<digest>
								TEXT_HERE
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
					</enumlist>
				</attribute>
				<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="Shape" />
				<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="enumindex" />
			</attributelist>
		</attribute>
		<attribute name="size" get="1" set="1" type="atom_long" size="1">
			<digest>
				Number of buttons or boxes
			</digest>
			<description>
				Specifies the number of buttons or boxes. The default is 2, and the maximum is 64. Note: If you care using the radiogroup object in check box mode and have enabled Flag Mode, you will only be able to set 32 checkboxes.
			</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="atom_long" size="1" value="2" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Number of Items" />
				<attribute name="paint" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="selfsave" 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>
	</attributelist>
	<!--EXAMPLE-->
	<examplelist>
		<example img="radiogroup.png" caption="Radio buttons allow a single selection, and multiple selection check boxes can control several gates" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="button">
			Flash on any message, send a <m>bang</m> 
		</seealso>
		<seealso name="matrixctrl" />
		<seealso name="pictctrl" />
		<seealso name="toggle" />
		<seealso name="ubutton" />
		<seealso name="basicchapter21" module="max" type="tutorial" />
	</seealsolist>
	<discussion>
		The <o>radiogroup</o> object has two modes of operation: radio button and check box. In radio button mode, the <o>radiogroup</o> object provides a user-definable number of buttons in a group, only one of which may be selected at a time. In check box mode, the indicators in the <o>radiogroup</o> object function as a set of on/off indicators. Check box mode also supports a way to have the checkboxes act as indicators for the bit pattern of a binary representation of an integer (see the <m>flagmode</m> message).
		<br />
		<br />
		Note: <o>radiogroup</o> can be re-sized horizontally so it will extend under comment boxes placed to the right of the buttons or boxes. this way, clicking on the text to the right of the button will also set the button selection or box state.
	</discussion>
	<misc name="Output">
		<entry name="int">
			<description>
				In radio button mode: Clicking on a radio button outputs an int corresponding to the radio button selected. Numbering begins with 0.
				<br />
				<br />
				In flag mode: Clicking on a check box outputs an int corresponding to the bit pattern represented by the checked boxes (i.e., if boxes one, two, and three are checked, a <m>bang</m> will output a value of <m>7</m>).
			</description>
		</entry>
		<entry name="list">
			<description>
				In check box mode: A <m>bang</m> will output a list of zeros and one which indicate the on/off state of the group of check boxes.
			</description>
		</entry>
	</misc>
</c74object>
