<!-- saved from url=(0026)http://www.naturaldocs.org -->
<divid=Content><divclass="CClass"><divclass=CTopicid=MainTopic><h1class=CTitle><aname="mxDefaultToolbar"></a>mxDefaultToolbar</h1><divclass=CBody><p>Toolbar for the editor. This modifies the state of the graph or inserts new cells upon mouse clicks.</p><h4class=CHeading>Example</h4><p>Create a toolbar with a button to copy the selection into the clipboard, and a combo box with one action to paste the selection from the clipboard into the graph.</p><blockquote><preclass="prettyprint">var toolbar = new mxDefaultToolbar(container, editor);
toolbar.addItem('Copy', null, 'copy');
var combo = toolbar.addActionCombo('More actions...');
toolbar.addActionOption(combo, 'Paste', 'paste');</pre></blockquote><h4class=CHeading>Codec</h4><p>This class uses the <ahref="../io/mxDefaultToolbarCodec-js.html#mxDefaultToolbarCodec"class=LClassid=link36onMouseOver="ShowTip(event, 'tt26', 'link36')"onMouseOut="HideTip('tt26')">mxDefaultToolbarCodec</a> to read configuration data into an existing instance. See <ahref="../io/mxDefaultToolbarCodec-js.html#mxDefaultToolbarCodec"class=LClassid=link37onMouseOver="ShowTip(event, 'tt26', 'link37')"onMouseOut="HideTip('tt26')">mxDefaultToolbarCodec</a> for a description of the configuration format.</p><!--START_ND_SUMMARY--><divclass=Summary><divclass=STitle>Summary</div><divclass=SBorder><tableborder=0cellspacing=0cellpadding=0class=STable><trclass="SMain"><tdclass=SEntry><ahref="#mxDefaultToolbar">mxDefaultToolbar</a></td><tdclass=SDescription>Toolbar for the editor. </td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#mxDefaultToolbar.Functions">Functions</a></td><tdclass=SDescription></td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#mxDefaultToolbar.mxDefaultToolbar"id=link1onMouseOver="ShowTip(event, 'tt1', 'link1')"onMouseOut="HideTip('tt1')">mxDefaultToolbar</a></td><tdclass=SDescription>Constructs a new toolbar for the given container and editor. </td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#mxDefaultToolbar.Variables">Variables</a></td><tdclass=SDescription></td></tr><trclass="SVariable SIndent2 SMarked"><tdclass=SEntry><ahref="#mxDefaultToolbar.editor"id=link2onMouseOver="ShowTip(event, 'tt2', 'link2')"onMouseOut="HideTip('tt2')">editor</a></td><tdclass=SDescription>Reference to the enclosing <ahref="mxEditor-js.html#mxEditor"class=LClassid=link3onMouseOver="ShowTip(event, 'tt3', 'link3')"onMouseOut="HideTip('tt3')">mxEditor</a>.</td></tr><trclass="SVariable SIndent2"><tdclass=SEntry><ahref="#mxDefaultToolbar.toolbar"id=link4onMouseOver="ShowTip(event, 'tt4', 'link4')"onMouseOut="HideTip('tt4')">toolbar</a></td><tdclass=SDescription>Holds the internal <ahref="../util/mxToolbar-js.html#mxToolbar"class=LClassid=link5onMouseOver="ShowTip(event, 'tt5', 'link5')"onMouseOut="HideTip('tt5')">mxToolbar</a>.</td></tr><trclass="SVariable SIndent2 SMarked"><tdclass=SEntry><ahref="#mxDefaultToolbar.resetHandler"id=link6onMouseOver="ShowTip(event, 'tt6', 'link6')"onMouseOut="HideTip('tt6')">resetHandler</a></td><tdclass=SDescription>Reference to the function used to reset the <ahref="#mxDefaultToolbar.toolbar"class=LVariableid=link7onMouseOver="ShowTip(event, 'tt4', 'link7')"onMouseOut="HideTip('tt4')">toolbar</a>.</td></tr><trclass="SVariable SIndent2"><tdclass=SEntry><ahref="#mxDefaultToolbar.spacing"id=link8onMouseOver="ShowTip(event, 'tt7', 'link8')"onMouseOut="HideTip('tt7')">spacing</a></td><tdclass=SDescription>Defines the spacing between existing and new vertices in gridSize units when a new vertex is dropped on an existing cell. </td></tr><trclass="SVariable SIndent2 SMarked"><tdclass=SEntry><ahref="#mxDefaultToolbar.connectOnDrop"id=link9onMouseOver="ShowTip(event, 'tt8', 'link9')"onMouseOut="HideTip('tt8')">connectOnDrop</a></td><tdclass=SDescription>Specifies if elements should be connected if new cells are dropped onto connectable elements. </td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#mxDefaultToolbar.Functions">Functions</a></td><tdclass=SDescription></td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#mxDefaultToolbar.init"id=link10onMouseOver="ShowTip(event, 'tt9', 'link10')"onMouseOut="HideTip('tt9')">init</a></td><tdclass=SDescription>Constructs the <ahref="#mxDefaultToolbar.toolbar"class=LVariableid=link11onMouseOver="ShowTip(event, 'tt4', 'link11')"onMouseOut="HideTip('tt4')">toolbar</a> for the given container and installs a listener that updates the <ahref="mxEditor-js.html#mxEditor.insertFunction"class=LVariableid=link12onMouseOver="ShowTip(event, 'tt10', 'link12')"onMouseOut="HideTip('tt10')">mxEditor.inse
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxDefaultToolbar.mxDefaultToolbar"></a>mxDefaultToolbar</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>function mxDefaultToolbar(</td><tdclass="PParameter prettyprint "nowrap>container,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>editor</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Constructs a new toolbar for the given container and editor. The container and editor may be null if a prototypical instance for a <ahref="../io/mxDefaultKeyHandlerCodec-js.html#mxDefaultKeyHandlerCodec"class=LClassid=link38onMouseOver="ShowTip(event, 'tt27', 'link38')"onMouseOut="HideTip('tt27')">mxDefaultKeyHandlerCodec</a> is created.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>container</td><tdclass=CDLDescription>DOM node that contains the toolbar.</td></tr><tr><tdclass=CDLEntry>editor</td><tdclass=CDLDescription>Reference to the enclosing <ahref="mxEditor-js.html#mxEditor"class=LClassid=link39onMouseOver="ShowTip(event, 'tt3', 'link39')"onMouseOut="HideTip('tt3')">mxEditor</a>.</td></tr></table></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxDefaultToolbar.editor"></a>editor</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxDefaultToolbar.prototype.editor</td></tr></table></blockquote><p>Reference to the enclosing <ahref="mxEditor-js.html#mxEditor"class=LClassid=link40onMouseOver="ShowTip(event, 'tt3', 'link40')"onMouseOut="HideTip('tt3')">mxEditor</a>.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxDefaultToolbar.resetHandler"></a>resetHandler</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxDefaultToolbar.prototype.resetHandler</td></tr></table></blockquote><p>Reference to the function used to reset the <ahref="#mxDefaultToolbar.toolbar"class=LVariableid=link42onMouseOver="ShowTip(event, 'tt4', 'link42')"onMouseOut="HideTip('tt4')">toolbar</a>.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxDefaultToolbar.spacing"></a>spacing</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxDefaultToolbar.prototype.spacing</td></tr></table></blockquote><p>Defines the spacing between existing and new vertices in gridSize units when a new vertex is dropped on an existing cell. Default is 4 (40 pixels).</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxDefaultToolbar.connectOnDrop"></a>connectOnDrop</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxDefaultToolbar.prototype.connectOnDrop</td></tr></table></blockquote><p>Specifies if elements should be connected if new cells are dropped onto connectable elements. Default is false.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxDefaultToolbar.init"></a>init</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxDefaultToolbar.prototype.init = function(</td><tdclass="PParameter prettyprint "nowrap>container</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Constructs the <ahref="#mxDefaultToolbar.toolbar"class=LVariableid=link43onMouseOver="ShowTip(event, 'tt4', 'link43')"onMouseOut="HideTip('tt4')">toolbar</a> for the given container and installs a listener that updates the <ahref="mxEditor-js.html#mxEditor.insertFunction"class=LVariableid=link44onMouseOver="ShowTip(event, 'tt10', 'link44')"onMouseOut="HideTip('tt10')">mxEditor.insertFunction</a> on <ahref="#mxDefaultToolbar.editor"class=LVariableid=link45onMouseOver="ShowTip(event, 'tt2', 'link45')"onMouseOut="HideTip('tt2')">editor</a> if an item is selected in the toolbar. This assumes that <ahref="#mxDefaultToolbar.editor"class=LVariableid=link46onMouseOver="ShowTip(event, 'tt2', 'link46')"onMouseOut="HideTip('tt2')">editor</a> is not null.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>container</td><tdclass=CDLDescription>DOM node that contains the toolbar.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxDefaultToolbar.addItem"></a>addItem</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxDefaultToolbar.prototype.addItem = function(</td><tdclass="PParameter prettyprint "nowrap>title,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>icon,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>action,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>pressed</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Adds a new item that executes the given action in <ahref="#mxDefaultToolbar.editor"class=LVariableid=link47onMouseOver="ShowTip(event, 'tt2', 'link47')"onMouseOut="HideTip('tt2')">editor</a>. The title, icon and pressedIcon are used to display the toolbar item.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>title</td><tdclass=CDLDescription>String that represents the title (tooltip) for the item.</td></tr><tr><tdclass=CDLEntry>icon</td><tdclass=CDLDescription>URL of the icon to be used for displaying the item.</td></tr><tr><tdclass=CDLEntry>action</td><tdclass=CDLDescription>Name of the action to execute when the item is clicked.</td></tr><tr><tdclass=CDLEntry>pressed</td><tdclass=CDLDescription>Optional URL of the icon for the pressed state.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxDefaultToolbar.addSeparator"></a>addSeparator</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxDefaultToolbar.prototype.addSeparator = function(</td><tdclass="PParameter prettyprint "nowrap>icon</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Adds a vertical separator using the optional icon.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>icon</td><tdclass=CDLDescription>Optional URL of the icon that represents the vertical separator. Default is <ahref="../mxClient-js.html#mxClient.imageBasePath"class=LVariableid=link48onMouseOver="ShowTip(event, 'tt28', 'link48')"onMouseOut="HideTip('tt28')">mxClient.imageBasePath</a> + ‘/separator.gif’.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxDefaultToolbar.addCombo"></a>addCombo</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxDefaultToolbar.prototype.addCombo = function()</td></tr></table></blockquote><p>Helper method to invoke <ahref="../util/mxToolbar-js.html#mxToolbar.addCombo"class=LFunctionid=link49onMouseOver="ShowTip(event, 'tt14', 'link49')"onMouseOut="HideTip('tt14')">mxToolbar.addCombo</a> on <ahref="#mxDefaultToolbar.toolbar"class=LVariableid=link50onMouseOver="ShowTip(event, 'tt4', 'link50')"onMouseOut="HideTip('tt4')">toolbar</a> and return the resulting DOM node.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxDefaultToolbar.addActionCombo"></a>addActionCombo</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxDefaultToolbar.prototype.addActionCombo = function(</td><tdclass="PParameter prettyprint "nowrap>title</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Helper method to invoke <mxToolbar.addActionCombo> on <ahref="#mxDefaultToolbar.toolbar"class=LVariableid=link51onMouseOver="ShowTip(event, 'tt4', 'link51')"onMouseOut="HideTip('tt4')">toolbar</a> using the given title and return the resulting DOM node.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>title</td><tdclass=CDLDescription>String that represents the title of the combo.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxDefaultToolbar.addActionOption"></a>addActionOption</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxDefaultToolbar.prototype.addActionOption = function(</td><tdclass="PParameter prettyprint "nowrap>combo,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>title,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>action</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Binds the given action to a option with the specified label in the given combo. Combo is an object returned from an earlier call to <ahref="#mxDefaultToolbar.addCombo"class=LFunctionid=link52onMouseOver="ShowTip(event, 'tt13', 'link52')"onMouseOut="HideTip('tt13')">addCombo</a> or <ahref="#mxDefaultToolbar.addActionCombo"class=LFunctionid=link53onMouseOver="ShowTip(event, 'tt15', 'link53')"onMouseOut="HideTip('tt15')">addActionCombo</a>.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>combo</td><tdclass=CDLDescription>DOM node that represents the combo box.</td></tr><tr><tdclass=CDLEntry>title</td><tdclass=CDLDescription>String that represents the title of the combo.</td></tr><tr><tdclass=CDLEntry>action</td><tdclass=CDLDescription>Name of the action to execute in <ahref="#mxDefaultToolbar.editor"class=LVariableid=link54onMouseOver="ShowTip(event, 'tt2', 'link54')"onMouseOut="HideTip('tt2')">editor</a>.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxDefaultToolbar.addOption"></a>addOption</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxDefaultToolbar.prototype.addOption = function(</td><tdclass="PParameter prettyprint "nowrap>combo,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>title,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>value</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Helper method to invoke <ahref="../util/mxToolbar-js.html#mxToolbar.addOption"class=LFunctionid=link55onMouseOver="ShowTip(event, 'tt18', 'link55')"onMouseOut="HideTip('tt18')">mxToolbar.addOption</a> on <ahref="#mxDefaultToolbar.toolbar"class=LVariableid=link56onMouseOver="ShowTip(event, 'tt4', 'link56')"onMouseOut="HideTip('tt4')">toolbar</a> and return the resulting DOM node that represents the option.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>combo</td><tdclass=CDLDescription>DOM node that represents the combo box.</td></tr><tr><tdclass=CDLEntry>title</td><tdclass=CDLDescription>String that represents the title of the combo.</td></tr><tr><tdclass=CDLEntry>value</td><tdclass=CDLDescription>Object that represents the value of the option.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxDefaultToolbar.addMode"></a>addMode</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxDefaultToolbar.prototype.addMode = function(</td><tdclass="PParameter prettyprint "nowrap>title,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>icon,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>mode,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>pressed,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>funct</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Creates an item for selecting the given mode in the <ahref="#mxDefaultToolbar.editor"class=LVariableid=link57onMouseOver="ShowTip(event, 'tt2', 'link57')"onMouseOut="HideTip('tt2')">editor</a>’s graph. Supported modenames are select, connect and pan.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>title</td><tdclass=CDLDescription>String that represents the title of the item.</td></tr><tr><tdclass=CDLEntry>icon</td><tdclass=CDLDescription>URL of the icon that represents the item.</td></tr><tr><tdclass=CDLEntry>mode</td><tdclass=CDLDescription>String that represents the mode name to be used in <ahref="mxEditor-js.html#mxEditor.setMode"class=LFunctionid=link58onMouseOver="ShowTip(event, 'tt29', 'link58')"onMouseOut="HideTip('tt29')">mxEditor.setMode</a>.</td></tr><tr><tdclass=CDLEntry>pressed</td><tdclass=CDLDescription>Optional URL of the icon that represents the pressed state.</td></tr><tr><tdclass=CDLEntry>funct</td><tdclass=CDLDescription>Optional JavaScript function that takes the <ahref="mxEditor-js.html#mxEditor"class=LClassid=link59onMouseOver="ShowTip(event, 'tt3', 'link59')"onMouseOut="HideTip('tt3')">mxEditor</a> as the first and only argument that is executed after the mode has been selected.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxDefaultToolbar.addPrototype"></a>addPrototype</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxDefaultToolbar.prototype.addPrototype = function(</td><tdclass="PParameter prettyprint "nowrap>title,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>icon,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>ptype,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>pressed,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>insert,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>toggle</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Creates an item for inserting a clone of the specified prototype cell into the <ahref="#mxDefaultToolbar.editor"class=LVariableid=link60onMouseOver="ShowTip(event, 'tt2', 'link60')"onMouseOut="HideTip('tt2')">editor</a>’s graph. The ptype may either be a cell or a function that returns a cell.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>title</td><tdclass=CDLDescription>String that represents the title of the item.</td></tr><tr><tdclass=CDLEntry>icon</td><tdclass=CDLDescription>URL of the icon that represents the item.</td></tr><tr><tdclass=CDLEntry>ptype</td><tdclass=CDLDescription>Function or object that represents the prototype cell. If ptype is a function then it is invoked with no arguments to create new instances.</td></tr><tr><tdclass=CDLEntry>pressed</td><tdclass=CDLDescription>Optional URL of the icon that represents the pressed state.</td></tr><tr><tdclass=CDLEntry>insert</td><tdclass=CDLDescription>Optional JavaScript function that handles an insert of the new cell. This function takes the <ahref="mxEditor-js.html#mxEditor"class=LClassid=link61onMouseOver="ShowTip(event, 'tt3', 'link61')"onMouseOut="HideTip('tt3')">mxEditor</a>, new cell to be inserted, mouse event and optional <ahref="../model/mxCell-js.html#mxCell"class=LClassid=link62onMouseOver="ShowTip(event, 'tt30', 'link62')"onMouseOut="HideTip('tt30')">mxCell</a> under the mouse pointer as arguments.</td></tr><tr><tdclass=CDLEntry>toggle</td><tdclass=CDLDescription>Optional boolean that specifies if the item can be toggled. Default is true.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxDefaultToolbar.drop"></a>drop</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxDefaultToolbar.prototype.drop = function(</td><tdclass="PParameter prettyprint "nowrap>vertex,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>evt,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>target</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Handles a drop from a toolbar item to the graph. The given vertex represents the new cell to be inserted. This invokes <ahref="#mxDefaultToolbar.insert"class=LFunctionid=link63onMouseOver="ShowTip(event, 'tt22', 'link63')"onMouseOut="HideTip('tt22')">insert</a> or <ahref="#mxDefaultToolbar.connect"class=LFunctionid=link64onMouseOver="ShowTip(event, 'tt23', 'link64')"onMouseOut="HideTip('tt23')">connect</a> depending on the given target cell.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>vertex</td><tdclass=CDLDescription><ahref="../model/mxCell-js.html#mxCell"class=LClassid=link65onMouseOver="ShowTip(event, 'tt30', 'link65')"onMouseOut="HideTip('tt30')">mxCell</a> to be inserted.</td></tr><tr><tdclass=CDLEntry>evt</td><tdclass=CDLDescription>Mouse event that represents the drop.</td></tr><tr><tdclass=CDLEntry>target</td><tdclass=CDLDescription>Optional <ahref="../model/mxCell-js.html#mxCell"class=LClassid=link66onMouseOver="ShowTip(event, 'tt30', 'link66')"onMouseOut="HideTip('tt30')">mxCell</a> that represents the drop target.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxDefaultToolbar.insert"></a>insert</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxDefaultToolbar.prototype.insert = function(</td><tdclass="PParameter prettyprint "nowrap>vertex,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>evt,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>target</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Handles a drop by inserting the given vertex into the given parent cell or the default parent if no parent is specified.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>vertex</td><tdclass=CDLDescription><ahref="../model/mxCell-js.html#mxCell"class=LClassid=link67onMouseOver="ShowTip(event, 'tt30', 'link67')"onMouseOut="HideTip('tt30')">mxCell</a> to be inserted.</td></tr><tr><tdclass=CDLEntry>evt</td><tdclass=CDLDescription>Mouse event that represents the drop.</td></tr><tr><tdclass=CDLEntry>parent</td><tdclass=CDLDescription>Optional <ahref="../model/mxCell-js.html#mxCell"class=LClassid=link68onMouseOver="ShowTip(event, 'tt30', 'link68')"onMouseOut="HideTip('tt30')">mxCell</a> that represents the parent.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxDefaultToolbar.connect"></a>connect</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxDefaultToolbar.prototype.connect = function(</td><tdclass="PParameter prettyprint "nowrap>vertex,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>evt,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>source</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Handles a drop by connecting the given vertex to the given source cell.</p><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>vertex</td><tdclass=CDLDescription><ahref="../model/mxCell-js.html#mxCell"class=LClassid=link69onMouseOver="ShowTip(event, 'tt30', 'link69')"onMouseOut="HideTip('tt30')">mxCell</a> to be inserted.</td></tr><tr><tdclass=CDLEntry>evt</td><tdclass=CDLDescription>Mouse event that represents the drop.</td></tr><tr><tdclass=CDLEntry>source</td><tdclass=CDLDescription>Optional <ahref="../model/mxCell-js.html#mxCell"class=LClassid=link70onMouseOver="ShowTip(event, 'tt30', 'link70')"onMouseOut="HideTip('tt30')">mxCell</a> that represents the source terminal.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxDefaultToolbar.installDropHandler"></a>installDropHandler</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxDefaultToolbar.prototype.installDropHandler = function (</td><tdclass="PParameter prettyprint "nowrap>img,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>dropHandler</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Makes the given img draggable using the given function for handling a drop event.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>img</td><tdclass=CDLDescription>DOM node that represents the image.</td></tr><tr><tdclass=CDLEntry>dropHandler</td><tdclass=CDLDescription>Function that handles a drop of the image.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxDefaultToolbar.destroy"></a>destroy</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxDefaultToolbar.prototype.destroy = function ()</td></tr></table></blockquote><p>Destroys the <ahref="#mxDefaultToolbar.toolbar"class=LVariableid=link71onMouseOver="ShowTip(event, 'tt4', 'link71')"onMouseOut="HideTip('tt4')">toolbar</a> associated with this object and removes all installed listeners. This does normally not need to be called, the <ahref="#mxDefaultToolbar.toolbar"class=LVariableid=link72onMouseOver="ShowTip(event, 'tt4', 'link72')"onMouseOut="HideTip('tt4')">toolbar</a> is destroyed automatically when the window unloads (in IE) by <ahref="mxEditor-js.html#mxEditor"class=LClassid=link73onMouseOver="ShowTip(event, 'tt3', 'link73')"onMouseOut="HideTip('tt3')">mxEditor</a>.</p></div></div></div>
<divclass=CToolTipid="tt1"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>function mxDefaultToolbar(</td><tdclass="PParameter prettyprint "nowrap>container,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>editor</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Constructs a new toolbar for the given container and editor. </div></div><divclass=CToolTipid="tt2"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxDefaultToolbar.prototype.editor</td></tr></table></blockquote>Reference to the enclosing mxEditor.</div></div><divclass=CToolTipid="tt3"><divclass=CClass>Extends mxEventSource to implement a application wrapper for a graph that adds actions, I/O using mxCodec, auto-layout using mxLayoutManager, command history using undoManager, and standard dialogs and widgets, eg. </div></div><divclass=CToolTipid="tt4"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxDefaultToolbar.prototype.toolbar</td></tr></table></blockquote>Holds the internal mxToolbar.</div></div><divclass=CToolTipid="tt5"><divclass=CClass>Creates a toolbar inside a given DOM node. </div></div><divclass=CToolTipid="tt6"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxDefaultToolbar.prototype.resetHandler</td></tr></table></blockquote>Reference to the function used to reset the toolbar.</div></div><divclass=CToolTipid="tt7"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxDefaultToolbar.prototype.spacing</td></tr></table></blockquote>Defines the spacing between existing and new vertices in gridSize units when a new vertex is dropped on an existing cell. </div></div><divclass=CToolTipid="tt8"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxDefaultToolbar.prototype.connectOnDrop</td></tr></table></blockquote>Specifies if elements should be connected if new cells are dropped onto connectable elements. </div></div><divclass=CToolTipid="tt9"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxDefaultToolbar.prototype.init = function(</td><tdclass="PParameter prettyprint "nowrap>container</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Constructs the toolbar for the given container and installs a listener that updates the mxEditor.insertFunction on editor if an item is selected in the toolbar. </div></div><divclass=CToolTipid="tt10"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxEditor.prototype.insertFunction</td></tr></table></blockquote>Specifies the function to be used for inserting new cells into the graph. </div></div><divclass=CToolTipid="tt11"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxDefaultToolbar.prototype.addItem = function(</td><tdclass="PParameter prettyprint "nowrap>title,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>icon,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>action,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>pressed</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Adds a new item that executes the given action in editor. </div></div><divclass=CToolTipid="tt12"