<?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="bpatcher" module="max" category="U/I">
	<digest>
		Embed a subpatch with a visible UI
	</digest>
	<description>
		Abstracts the contents of a patcher or subpatcher for use in other patchers, displaying only those visual elements which are desired. The number of inlets and outlets in a <o>bpatcher</o> object is determined by the number of <o>inlet</o> and <o>outlet</o> objects contained in its subpatch window.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			Max
		</metadata>
	</metadatalist>
	<palette action="bpatcher" category="Basic" order="11" pic="bpatcher.svg" />
	<!--INLETS-->
	<!--OUTLETS-->
	<!--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="(drag)">
			<digest>
				Load a patcher
			</digest>
			<description>
				When a patcher file is dragged from the Max File Browser to a <o>bpatcher</o> object, the file will be loaded.
			</description>
		</method>
		<method name="(mouse)">
			<digest>
				Route gesture to contained patcher
			</digest>
			<description>
				When the window containing the <o>bpatcher</o> object is locked (or the Command key on Macintosh or Control key on Windows is held down) and the mouse is clicked inside the <o>bpatcher</o> object’s box, the gesture is handled by the patch inside the box.
				<br />
				If the Shift and Command keys on Macintosh or Shift and Control keys on Windows are held down while clicking on a <o>bpatcher</o> object, dragging the mouse moves the upper-left corner of the visible part of the patch inside the box. The Assistance area of the patcher window shows the pixel values of the offset. If Enable Drag-Scrolling is unchecked in the bpatcher Inspector window, this feature is disabled.
				<br />
				If the Command and Option keys on Macintosh or Control and Alt keys on Windows are held down while clicking in a <o>bpatcher</o> object, a pop-up menu allows you to open the original file of the patch contained inside the box in its own window, or change the patch currently contained inside the box in its own window.
			</description>
		</method>
		<method name="replace">
			<arglist>
				<arg name="filename" optional="0" type="symbol" />
			</arglist>
			<digest>
				Replace a contained patcher
			</digest>
			<description>
				The <m>replace</m> message is intended for use in conjunction with scripting messages to the <o>thispatcher</o> object. If you send a <m>replace</m> message via an inlet to the <o>bpatcher</o> object, it will only work if there is no patcher inside the <o>bpatcher</o>; the inlet to the <o>bpatcher</o> object is used for sending messages into its subpatcher, not for sending messages to the <o>bpatcher</o> object itself.
				<br />
				To use the <m>replace</m> message feature via scripting messages, give your <o>bpatcher</o> object a Scripting Name using the Inspector, then use the message <m>script sendbox <i>&lt;bpatcher-name&gt;</i> replace <i>&lt;patcher-name&gt;</i> </m> to send the message to the named <o>bpatcher</o> object.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<attributelist>
		<attribute name="args" get="1" set="1" type="atom" size="256">
			<digest>
				Contained patcher arguments
			</digest>
			<description>
				When followed by a number of ints, floats, or symbols, this attribute lets you input arguments to your patcher which will be saved along with the main patch.
			</description>
			<attributelist>
				<attribute name="category" get="1" set="1" type="atom" size="1" value="Patcher" />
				<attribute name="default" get="1" set="1" type="atom" size="0" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Argument(s)" />
				<attribute name="order" get="1" set="1" type="int" size="1" value="2" />
				<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="text_large" />
			</attributelist>
		</attribute>
		<attribute name="bgcolor" get="1" set="1" type="float" size="4">
			<digest>
				Background color
			</digest>
			<description>
				Sets the background color of the patcher visible in the <o>bpatcher</o> window.
			</description>
			<attributelist>
				<attribute name="category" get="1" set="1" type="symbol" size="1" value="Color" />
				<attribute name="default" get="1" set="1" type="float" size="4" value="1. 1. 1. 1." />
				<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="save" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="rgba" />
			</attributelist>
		</attribute>
		<attribute name="embed" get="1" set="1" type="int" size="1">
			<digest>
				Embed subpatch flag
			</digest>
			<description>
				Toggles the ability to embed the subpatch you are using and save it as part of the main patch (just as with a <o><b>patcher</b></o> object) instead of the subpatch being saved in a separate file. This value can only be set using the Embed Patcher in Parent setting in the <o>bpatcher</o> object's Inspector. The default behavior is 0 (save the subpatch as a separate file).
			</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="Patcher" />
				<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="Embed Patcher in Parent" />
				<attribute name="order" get="1" set="1" type="int" size="1" value="3" />
				<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="name" get="1" set="1" type="symbol" size="1">
			<digest>
				Embedded patch filename
			</digest>
			<description>
				Designates the pathname of the patcher file for the <o>bpatcher</o> to use. This value can only be set using the Patcher File setting in the <o>bpatcher</o> object's Inspector.
			</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="Patcher" />
				<attribute name="default" get="1" set="1" type="symbol" size="1" value="&lt;none&gt;" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Patcher File" />
				<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="patcher" />
			</attributelist>
		</attribute>
	</attributelist>
	<!--EXAMPLE-->
	<examplelist>
		<example img="bpatcher.png" caption="View the contents of a subpatcher...... The contents of this patch can be windowed... ...using offset messages to a small bpatcher containing it" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="patcher" />
		<seealso name="pcontrol" />
		<seealso name="thispatcher" />
		<seealso module="max" name="interfacechapter01" type="tutorial" />
		<seealso module="core" name="search_path" type="vignette" />
	</seealsolist>
	<misc name="Output">
		<entry name="(User-Defined)">
			<description>
				If the patcher being used in a <o>bpatcher</o> contains <o><b>outlet</b></o> objects, they will appear in corresponding left-to-right order as outlets in the <o>bpatcher</o> object's box.
			</description>
		</entry>
	</misc>
</c74object>
