<?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="jsui" module="max" category="U/I, Languages">
	<digest>
		Javascript user interfaces and graphics
	</digest>
	<description>
		Provides an environment to make user interface elements using Javascript. This provides all of the programming tools available in the <o>js</o> object, but also exposes the mgraphics and sketch drawing routines for visual output.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			Max
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="INLET_TYPE">
			<digest>
				none: Inlet 0
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="OUTLET_TYPE">
			<digest>
				none: Outlet 0
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<palette category="Images, Interface" action="jsui" pic="jsui.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>
				Call the bang function
			</digest>
			<description>
				Invokes the function named bang if defined.
			</description>
		</method>
		<method name="int">
			<arglist>
				<arg name="user-defined" optional="0" type="int" />
			</arglist>
			<digest>
				Call the msg_int function
			</digest>
			<description>
				Invokes the function named msg_int if defined.
			</description>
		</method>
		<method name="float">
			<arglist>
				<arg name="user-defined" optional="0" type="float" />
			</arglist>
			<digest>
				Call the msg_float function
			</digest>
			<description>
				Invokes the function named msg_float if defined.
			</description>
		</method>
		<method name="list">
			<arglist>
				<arg name="user-defined" optional="0" type="list" />
			</arglist>
			<digest>
				Evaluate and execute a function
			</digest>
			<description>
				Performs the same as <m>anything</m>.
			</description>
		</method>
		<method name="anything">
			<arglist>
				<arg name="user-defined" optional="0" type="list" />
			</arglist>
			<digest>
				Evaluate and execute a function
			</digest>
			<description>
				Invokes the function with the message name, assigning the message arguments to the arguments to the function. For example, if the object has a function named xyz defined, the message <m>xyz 1 2 3</m> would invoke the xyz function with arguments 1 2 and 3.
			</description>
		</method>
		<method name="(drag)">
			<digest>
				Load a Javascript source file
			</digest>
			<description>
				When a file is dragged from the File Browser to a <o>jsui</o> object, the file is loaded and executed.
			</description>
		</method>
		<method name="autowatch">
			<arglist>
				<arg name="flag" optional="0" type="int" />
			</arglist>
			<digest>
				Watch for source file changes
			</digest>
			<description>
				The word <m>autowatch</m>, followed by a 1, turns on file watching for the Javascript source file. When file watching is on, the file is recompiled automatically when it is modified. This allows you to use an external editor for your Javascript file. When you save the file, the <o>jsui</o> object will notice. autowatch 0 turns off file watching.
			</description>
		</method>
		<method name="compile">
			<arglist>
				<arg name="filename" optional="0" type="symbol" />
			</arglist>
			<digest>
				Recompiles the current file
			</digest>
			<description>
				Recompiles the current file. If followed by a symbol, will load, compile, and set the currently loaded Javascript file to be the Javascript file specified by the symbol argument
			</description>
		</method>
		<method name="delprop">
			<arglist>
				<arg name="property" optional="0" type="symbol" />
			</arglist>
			<digest>
				Delete a named property
			</digest>
			<description>
				The word <m>delprop</m>, followed by a name, deletes the named property.
			</description>
		</method>
		<method name="editfontsize">
			<arglist>
				<arg name="size" optional="0" type="int" />
			</arglist>
			<digest>
				Change the editing window's font size
			</digest>
			<description>
				Changes the font-size of the text used in the editing window which contains the object's Javascript source file.
			</description>
		</method>
		<method name="getprop">
			<arglist>
				<arg name="property" optional="0" type="symbol" />
			</arglist>
			<digest>
				Get the value of a named property
			</digest>
			<description>
				The word <m>getprop</m>, followed by a name, outputs the value of the property name stored in the object out the left outlet.
			</description>
		</method>
		<method name="jsargs">
			<arglist>
				<arg name="arguments" optional="0" type="list" />
			</arglist>
			<digest>
				Set the Javascript arguments
			</digest>
			<description>
				Sets the current Javascript arguments to any following message arguments.
			</description>
		</method>
		<method name="jsfile">
			<arglist>
				<arg name="filename" optional="0" type="symbol" />
			</arglist>
			<digest>
				Load and compile a Javascript file
			</digest>
			<description>
				The word <m>jsfile</m>, followed by a symbol , loads, compiles, and sets the currently loaded Javascript file to be the Javascript file specified by the symbol argument.
			</description>
		</method>
		<method name="loadbang">
			<arglist />
			<digest>
				Invokes the function named loadbang if defined.
			</digest>
			<description>
				Call the loadbang function
			</description>
		</method>
		<method name="(mouse)">
			<digest>
				Open the editing window
			</digest>
			<description>
				Double-clicking on a <o>js</o> object opens a text window where the object's Javascript source file can be edited. When the text window is saved, the text is compiled as the object's script.
			</description>
		</method>
		<method name="open">
			<arglist />
			<digest>
				Open the editing window
			</digest>
			<description>
				Opens the text window where the object's Javascript source file can be edited.
			</description>
		</method>
		<method name="setprop">
			<arglist>
				<arg name="property and settings" optional="0" type="list" />
			</arglist>
			<digest>
				Set a named property
			</digest>
			<description>
				The word <m>setprop</m>, followed by name and one or more names or numbers, sets the named property to what follows the name. For example, after sending setprop <m>xyz 1 2 3</m> to a js object. the xyz property would have a value of the list 1 2 3.
			</description>
		</method>
		<method name="size">
			<arglist>
				<arg name="width" optional="0" type="int" />
				<arg name="height" optional="0" type="int" />
			</arglist>
			<digest>
				Set the object size
			</digest>
			<description>
				The word <m>size</m>, followed by two int arguments, sets the width and height of the <o>jsui</o> object.
			</description>
		</method>
		<method name="statemessage">
			<arglist>
				<arg name="messages" optional="0" type="list" />
			</arglist>
			<digest>
				Test Javascript functions
			</digest>
			<description>
				Allows for the testing of messages passed to functions within the Javascript source file.
			</description>
		</method>
		<method name="wclose">
			<arglist />
			<digest>
				Close the editing window
			</digest>
			<description>
				Closes the text window where the object's Javascript source file is edited.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<attributelist>
		<attribute name="border" get="1" set="1" type="int" size="1">
			<digest>
				Border draw flag
			</digest>
			<description>
				Toggles the drawing of a border around the <o>jsui</o> object. The default is 1 (draw border).
			</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="1" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Border" />
				<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="filename" get="1" set="1" type="symbol" size="1">
			<digest>
				Javascript source file
			</digest>
			<description>
				The word <m>filename</m>, followed by a symbol that specifies a pathname, designates the Javascript file to be loaded.
			</description>
			<attributelist>
				<attribute name="basic" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="default" get="1" set="1" type="symbol" size="1" value="none" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="JavaScript File" />
				<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="file" />
			</attributelist>
		</attribute>
		<attribute name="jsarguments" get="1" set="1" type="atom" size="256">
			<digest>
				Arguments for the script
			</digest>
			<description>
				Specifies any arguments to be passed to the Javascript code contained in the <o>jsui</o> object.
			</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" size="0" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="JavaScript Arguments" />
				<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="" />
			</attributelist>
		</attribute>
		<attribute name="nofsaa" get="1" set="1" type="int" size="1">
			<digest>
				Toggles the drawing of the object without full-screen antialiasing.
			</digest>
			<description>
				Toggle full screen anti-aliasing
			</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="0" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="No fsaa" />
				<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="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>.
			</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>
	</attributelist>
	<!--EXAMPLE-->
	<examplelist>
		<example img="jsui.png" caption="A simple dial with logic and drawing defined in Javascript" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="js" />
		<seealso name="jstrigger" />
		<seealso name="mxj" />
		<seealso name="javascriptinmax" module="js" type="vignette" />
		<seealso name="javascriptchapter03" module="max" type="tutorial" />
		<seealso name="jspainter" module="js" type="vignette" />
	</seealsolist>
	<discussion>
		The <o>jsui</o> object is a general purpose user interface object driven by javascript. There are a number of templates already built to use (some of which are shown below). While the patcher is in edit mode, you can ctrl-click (mac) or right-click (pc) to bring up the contextual menu which will let you view and edit the currently loaded javascript file, or select one of the template files from jsui-library. If the javascript file also has a help file associated with it (as do all of the template objects contained in this patch), the associated help file will be loaded instead of jsui.maxhelp. The inspector lets you set the javascript file, javascript arguments, size, border flag, and disable full scene anti-aliasing (fsaa).
		<br />
		<br />
		At the present time, mouse position and object redrawing will only be reported correctly in the <o>jsui</o> object if the patching and Presentation mode sizes of the object are the same.
	</discussion>
	<misc name="Output">
		<entry name="anything">
			<description>
				Numbers, lists, or symbols are sent out the jsui object's outlets when the Javascript code executing within the <o>jsui</o> object invokes the outlet function.
			</description>
		</entry>
	</misc>
</c74object>
