<!-- saved from url=(0026)http://www.naturaldocs.org -->
<divid=Content><divclass="CClass"><divclass=CTopicid=MainTopic><h1class=CTitle><aname="mxDefaultPopupMenu"></a>mxDefaultPopupMenu</h1><divclass=CBody><p>Creates popupmenus for mouse events. This object holds an XML node which is a description of the popup menu to be created. In <ahref="#mxDefaultPopupMenu.createMenu"class=LFunctionid=link10onMouseOver="ShowTip(event, 'tt4', 'link10')"onMouseOut="HideTip('tt4')">createMenu</a>, the configuration is applied to the context and the resulting menu items are added to the menu dynamically. See <ahref="#mxDefaultPopupMenu.createMenu"class=LFunctionid=link11onMouseOver="ShowTip(event, 'tt4', 'link11')"onMouseOut="HideTip('tt4')">createMenu</a> for a description of the configuration format.</p><p>This class does not create the DOM nodes required for the popup menu, it only parses an XML description to invoke the respective methods on an <ahref="../util/mxPopupMenu-js.html#mxPopupMenu"class=LClassid=link12onMouseOver="ShowTip(event, 'tt9', 'link12')"onMouseOut="HideTip('tt9')">mxPopupMenu</a> each time the menu is displayed.</p><h4class=CHeading>Codec</h4><p>This class uses the <ahref="../io/mxDefaultPopupMenuCodec-js.html#mxDefaultPopupMenuCodec"class=LClassid=link13onMouseOver="ShowTip(event, 'tt10', 'link13')"onMouseOut="HideTip('tt10')">mxDefaultPopupMenuCodec</a> to read configuration data into an existing instance, however, the actual parsing is done by this class during program execution, so the format is described below.</p><!--START_ND_SUMMARY--><divclass=Summary><divclass=STitle>Summary</div><divclass=SBorder><tableborder=0cellspacing=0cellpadding=0class=STable><trclass="SMain"><tdclass=SEntry><ahref="#mxDefaultPopupMenu">mxDefaultPopupMenu</a></td><tdclass=SDescription>Creates popupmenus for mouse events. </td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#mxDefaultPopupMenu.Functions">Functions</a></td><tdclass=SDescription></td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#mxDefaultPopupMenu.mxDefaultPopupMenu"id=link1onMouseOver="ShowTip(event, 'tt1', 'link1')"onMouseOut="HideTip('tt1')">mxDefaultPopupMenu</a></td><tdclass=SDescription>Constructs a new popupmenu-factory based on given configuration.</td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#mxDefaultPopupMenu.Variables">Variables</a></td><tdclass=SDescription></td></tr><trclass="SVariable SIndent2 SMarked"><tdclass=SEntry><ahref="#mxDefaultPopupMenu.imageBasePath"id=link2onMouseOver="ShowTip(event, 'tt2', 'link2')"onMouseOut="HideTip('tt2')">imageBasePath</a></td><tdclass=SDescription>Base path for all icon attributes in the config. </td></tr><trclass="SVariable SIndent2"><tdclass=SEntry><ahref="#mxDefaultPopupMenu.config"id=link3onMouseOver="ShowTip(event, 'tt3', 'link3')"onMouseOut="HideTip('tt3')">config</a></td><tdclass=SDescription>XML node used as the description of new menu items. </td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#mxDefaultPopupMenu.Functions">Functions</a></td><tdclass=SDescription></td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#mxDefaultPopupMenu.createMenu"id=link4onMouseOver="ShowTip(event, 'tt4', 'link4')"onMouseOut="HideTip('tt4')">createMenu</a></td><tdclass=SDescription>This function is called from <ahref="mxEditor-js.html#mxEditor"class=LClassid=link5onMouseOver="ShowTip(event, 'tt5', 'link5')"onMouseOut="HideTip('tt5')">mxEditor</a> to add items to the given menu based on <ahref="#mxDefaultPopupMenu.config"class=LVariableid=link6onMouseOver="ShowTip(event, 'tt3', 'link6')"onMouseOut="HideTip('tt3')">config</a>. </td></tr><trclass="SFunction SIndent2"><tdclass=SEntry><ahref="#mxDefaultPopupMenu.addItems"id=link7onMouseOver="ShowTip(event, 'tt6', 'link7')"onMouseOut="HideTip('tt6')">addItems</a></td><tdclass=SDescription>Recursively adds the given items and all of its children into the given menu.</td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#mxDefaultPopu
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxDefaultPopupMenu.mxDefaultPopupMenu"></a>mxDefaultPopupMenu</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>function mxDefaultPopupMenu(</td><tdclass="PParameter prettyprint "nowrap>config</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Constructs a new popupmenu-factory based on given configuration.</p><h4class=CHeading>Paramaters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>config</td><tdclass=CDLDescription>XML node that contains the configuration data.</td></tr></table></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxDefaultPopupMenu.imageBasePath"></a>imageBasePath</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxDefaultPopupMenu.prototype.imageBasePath</td></tr></table></blockquote><p>Base path for all icon attributes in the config. Default is null.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxDefaultPopupMenu.config"></a>config</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxDefaultPopupMenu.prototype.config</td></tr></table></blockquote><p>XML node used as the description of new menu items. This node is used in <ahref="#mxDefaultPopupMenu.createMenu"class=LFunctionid=link14onMouseOver="ShowTip(event, 'tt4', 'link14')"onMouseOut="HideTip('tt4')">createMenu</a> to dynamically create the menu items if their respective conditions evaluate to true for the given arguments.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxDefaultPopupMenu.createMenu"></a>createMenu</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxDefaultPopupMenu.prototype.createMenu = function(</td><tdclass="PParameter prettyprint "nowrap>editor,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>menu,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>cell,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>evt</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>This function is called from <ahref="mxEditor-js.html#mxEditor"class=LClassid=link15onMouseOver="ShowTip(event, 'tt5', 'link15')"onMouseOut="HideTip('tt5')">mxEditor</a> to add items to the given menu based on <ahref="#mxDefaultPopupMenu.config"class=LVariableid=link16onMouseOver="ShowTip(event, 'tt3', 'link16')"onMouseOut="HideTip('tt3')">config</a>. The config is a sequence of the following nodes and attributes.</p><h4class=CHeading>Child Nodes</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>add</td><tdclass=CDLDescription>Adds a new menu item. See below for attributes.</td></tr><tr><tdclass=CDLEntry>separator</td><tdclass=CDLDescription>Adds a separator. No attributes.</td></tr><tr><tdclass=CDLEntry>condition</td><tdclass=CDLDescription>Adds a custom condition. Name attribute.</td></tr></table><p>The add-node may have a child node that defines a function to be invoked before the action is executed (or instead of an action to be executed).</p><h4class=CHeading>Attributes</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>as</td><tdclass=CDLDescription>Resource key for the label (needs entry in property file).</td></tr><tr><tdclass=CDLEntry>action</td><tdclass=CDLDescription>Name of the action to execute in enclosing editor.</td></tr><tr><tdclass=CDLEntry>icon</td><tdclass=CDLDescription>Optional icon (relative/absolute URL).</td></tr><tr><tdclass=CDLEntry>iconCls</td><tdclass=CDLDescription>Optional CSS class for the icon.</td></tr><tr><tdclass=CDLEntry>if</td><tdclass=CDLDescription>Optional name of condition that must be true (see below).</td></tr><tr><tdclass=CDLEntry>enabled-if</td><tdclass=CDLDescription>Optional name of condition that specifies if the menu item should be enabled.</td></tr><tr><tdclass=CDLEntry>name</td><tdclass=CDLDescription>Name of custom condition. Only for condition nodes.</td></tr></table><h4class=CHeading>Conditions</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>nocell</td><tdclass=CDLDescription>No cell under the mouse.</td></tr><tr><tdclass=CDLEntry>ncells</td><tdclass=CDLDescription>More than one cell selected.</td></tr><tr><tdclass=CDLEntry>notRoot</td><tdclass=CDLDescription>Drilling position is other than home.</td></tr><tr><tdclass=CDLEntry>cell</td><tdclass=CDLDescription>Cell under the mouse.</td></tr><tr><tdclass=CDLEntry>notEmpty</td><tdclass=CDLDescription>Exactly one cell with children under mouse.</td></tr><tr><tdclass=CDLEntry>expandable</td><tdclass=CDLDescription>Exactly one expandable cell under mouse.</td></tr><tr><tdclass=CDLEntry>collapsable</td><tdclass=CDLDescription>Exactly one collapsable cell under mouse.</td></tr><tr><tdclass=CDLEntry>validRoot</td><tdclass=CDLDescription>Exactly one cell which is a possible root under mouse.</td></tr><tr><tdclass=CDLEntry>swimlane</td><tdclass=CDLDescription>Exactly one cell which is a swimlane under mouse.</td></tr></table><h4class=CHeading>Example</h4><h4class=CHeading>To add a new item for a given action to the popupmenu</h4><blockquote><preclass="prettyprint"><mxDefaultPopupMenu as="popupHandler">
</mxDefaultPopupMenu></pre></blockquote><h4class=CHeading>To add a new item for a custom function</h4><blockquote><preclass="prettyprint"><mxDefaultPopupMenu as="popupHandler">
</mxDefaultPopupMenu></pre></blockquote><p>The above example invokes action1 with an additional third argument via the editor instance. The third argument is passed to the function that defines action1. If the add-node has no action-attribute, then only the function defined in the text content is executed, otherwise first the function and then the action defined in the action-attribute is executed. The function in the text content has 3 arguments, namely the <ahref="mxEditor-js.html#mxEditor"class=LClassid=link17onMouseOver="ShowTip(event, 'tt5', 'link17')"onMouseOut="HideTip('tt5')">mxEditor</a> instance, the <ahref="../model/mxCell-js.html#mxCell"class=LClassid=link18onMouseOver="ShowTip(event, 'tt11', 'link18')"onMouseOut="HideTip('tt11')">mxCell</a> instance under the mouse, and the native mouse event.</p><h4class=CHeading>Custom Conditions</h4><h4class=CHeading>To add a new condition for popupmenu items</h4><blockquote><preclass="prettyprint"><condition name="condition1"><![CDATA[
]]></condition></pre></blockquote><h4class=CHeading>The new condition can then be used in any item as follows</h4><blockquote><preclass="prettyprint"><add as="action1" action="action1" icon="action1.gif" if="condition1"/></pre></blockquote><p>The order in which the items and conditions appear is not significant as all connditions are evaluated before any items are created.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>editor</td><tdclass=CDLDescription>Enclosing <ahref="mxEditor-js.html#mxEditor"class=LClassid=link19onMouseOver="ShowTip(event, 'tt5', 'link19')"onMouseOut="HideTip('tt5')">mxEditor</a> instance.</td></tr><tr><tdclass=CDLEntry>menu</td><tdclass=CDLDescription><ahref="../util/mxPopupMenu-js.html#mxPopupMenu"class=LClassid=link20onMouseOver="ShowTip(event, 'tt9', 'link20')"onMouseOut="HideTip('tt9')">mxPopupMenu</a> that is used for adding items and separators.</td></tr><tr><tdclass=CDLEntry>cell</td><tdclass=CDLDescription>Optional <ahref="../model/mxCell-js.html#mxCell"class=LClassid=link21onMouseOver="ShowTip(event, 'tt11', 'link21')"onMouseOut="HideTip('tt11')">mxCell</a> which is under the mousepointer.</td></tr><tr><tdclass=CDLEntry>evt</td><tdclass=CDLDescription>Optional mouse event which triggered the menu.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxDefaultPopupMenu.addItems"></a>addItems</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxDefaultPopupMenu.prototype.addItems = function(</td><tdclass="PParameter prettyprint "nowrap>editor,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>menu,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>cell,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>evt,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>conditions,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>item,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>parent</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Recursively adds the given items and all of its children into the given menu.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>editor</td><tdclass=CDLDescription>Enclosing <ahref="mxEditor-js.html#mxEditor"class=LClassid=link22onMouseOver="ShowTip(event, 'tt5', 'link22')"onMouseOut="HideTip('tt5')">mxEditor</a> instance.</td></tr><tr><tdclass=CDLEntry>menu</td><tdclass=CDLDescription><ahref="../util/mxPopupMenu-js.html#mxPopupMenu"class=LClassid=link23onMouseOver="ShowTip(event, 'tt9', 'link23')"onMouseOut="HideTip('tt9')">mxPopupMenu</a> that is used for adding items and separators.</td></tr><tr><tdclass=CDLEntry>cell</td><tdclass=CDLDescription>Optional <ahref="../model/mxCell-js.html#mxCell"class=LClassid=link24onMouseOver="ShowTip(event, 'tt11', 'link24')"onMouseOut="HideTip('tt11')">mxCell</a> which is under the mousepointer.</td></tr><tr><tdclass=CDLEntry>evt</td><tdclass=CDLDescription>Optional mouse event which triggered the menu.</td></tr><tr><tdclass=CDLEntry>conditions</td><tdclass=CDLDescription>Array of names boolean conditions.</td></tr><tr><tdclass=CDLEntry>item</td><tdclass=CDLDescription>XML node that represents the current menu item.</td></tr><tr><tdclass=CDLEntry>parent</td><tdclass=CDLDescription>DOM node that represents the parent menu item.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxDefaultPopupMenu.addAction"></a>addAction</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxDefaultPopupMenu.prototype.addAction = function(</td><tdclass="PParameter prettyprint "nowrap>menu,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>editor,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>lab,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>icon,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>funct,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>action,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>cell,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>parent,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>iconCls,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>enabled</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Helper method to bind an action to a new menu item.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>menu</td><tdclass=CDLDescription><ahref="../util/mxPopupMenu-js.html#mxPopupMenu"class=LClassid=link25onMouseOver="ShowTip(event, 'tt9', 'link25')"onMouseOut="HideTip('tt9')">mxPopupMenu</a> that is used for adding items and separators.</td></tr><tr><tdclass=CDLEntry>editor</td><tdclass=CDLDescription>Enclosing <ahref="mxEditor-js.html#mxEditor"class=LClassid=link26onMouseOver="ShowTip(event, 'tt5', 'link26')"onMouseOut="HideTip('tt5')">mxEditor</a> instance.</td></tr><tr><tdclass=CDLEntry>lab</td><tdclass=CDLDescription>String that represents the label of the menu item.</td></tr><tr><tdclass=CDLEntry>icon</td><tdclass=CDLDescription>Optional URL that represents the icon of the menu item.</td></tr><tr><tdclass=CDLEntry>action</td><tdclass=CDLDescription>Optional name of the action to execute in the given editor.</td></tr><tr><tdclass=CDLEntry>funct</td><tdclass=CDLDescription>Optional function to execute before the optional action. The function takes an <ahref="mxEditor-js.html#mxEditor"class=LClassid=link27onMouseOver="ShowTip(event, 'tt5', 'link27')"onMouseOut="HideTip('tt5')">mxEditor</a>, the <ahref="../model/mxCell-js.html#mxCell"class=LClassid=link28onMouseOver="ShowTip(event, 'tt11', 'link28')"onMouseOut="HideTip('tt11')">mxCell</a> under the mouse and the mouse event that triggered the call.</td></tr><tr><tdclass=CDLEntry>cell</td><tdclass=CDLDescription>Optional <ahref="../model/mxCell-js.html#mxCell"class=LClassid=link29onMouseOver="ShowTip(event, 'tt11', 'link29')"onMouseOut="HideTip('tt11')">mxCell</a> to use as an argument for the action.</td></tr><tr><tdclass=CDLEntry>parent</td><tdclass=CDLDescription>DOM node that represents the parent menu item.</td></tr><tr><tdclass=CDLEntry>iconCls</td><tdclass=CDLDescription>Optional CSS class for the menu icon.</td></tr><tr><tdclass=CDLEntry>enabled</td><tdclass=CDLDescription>Optional boolean that specifies if the menu item is enabled. Default is true.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxDefaultPopupMenu.createConditions"></a>createConditions</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxDefaultPopupMenu.prototype.createConditions = function(</td><tdclass="PParameter prettyprint "nowrap>editor,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>cell,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>evt</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Evaluates the default conditions for the given context.</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 mxDefaultPopupMenu(</td><tdclass="PParameter prettyprint "nowrap>config</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Constructs a new popupmenu-factory based on given configuration.</div></div><divclass=CToolTipid="tt2"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxDefaultPopupMenu.prototype.imageBasePath</td></tr></table></blockquote>Base path for all icon attributes in the config. </div></div><divclass=CToolTipid="tt3"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxDefaultPopupMenu.prototype.config</td></tr></table></blockquote>XML node used as the description of new menu items. </div></div><divclass=CToolTipid="tt4"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxDefaultPopupMenu.prototype.createMenu = function(</td><tdclass="PParameter prettyprint "nowrap>editor,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>menu,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>cell,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>evt</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>This function is called from mxEditor to add items to the given menu based on config. </div></div><divclass=CToolTipid="tt5"><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="tt6"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxDefaultPopupMenu.prototype.addItems = function(</td><tdclass="PParameter prettyprint "nowrap>editor,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>menu,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>cell,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>evt,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>conditions,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>item,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>parent</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Recursively adds the given items and all of its children into the given menu.</div></div><divclass=CToolTipid="tt7"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxDefaultPopupMenu.prototype.addAction = function(</td><tdclass="PParameter prettyprint "nowrap>menu,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>editor,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>lab,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>icon,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>funct,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>action,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>cell,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>parent,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>iconCls,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>enabled</td><tdclass="PAfterParameters prettyprint "n