<?xml version="1.0" encoding="Windows-1255" ?><Aspect name="Diagram" role="GmlDrawing" inherit="core.svg:GmlDrawing" hierarchy="GMLDOM" id="core.svg:Diagram" sort="22" urn="core.svg:drawing.Diagram.gs" toc="\Planar Drawing"><Summary>Base aspect for all planar diagram types.</Summary><Inherit>&lt;q ref=&quot;core.svg:GmlDrawing&quot;&gt;GmlDrawing&lt;/q&gt;</Inherit><Copyright>(c) SAP AG 2003-2006. All rights reserved.</Copyright>
<Topics>
<Event name="canPasteElement" sortGroup="true" scope="public" id="core.svg:Diagram!canPasteElement" sort="36" group="Events" seq="0000"><Summary>Fires when the user triggers a paste action.</Summary><Parameters signature="event:: &lt;b&gt;canPasteElement&lt;/b&gt; &amp;rarr; {&lt;i&gt;object&lt;/i&gt;, &lt;i&gt;unit&lt;/i&gt;, &lt;i&gt;elements&lt;/i&gt;, &lt;i&gt;cancel&lt;/i&gt;}"><Param name="object" type="gml:Element" typeRef="&lt;q ref=&quot;core.gml:Element&quot;&gt;Element&lt;/q&gt;">The element to be pasted.</Param><Param name="unit" type="gml:Unit" typeRef="&lt;q ref=&quot;core.gml:Unit&quot;&gt;Unit&lt;/q&gt;">The containing Unit.</Param><Param name="elements" type="gml:Element[id]" typeRef="&lt;q ref=&quot;core.gml:Element&quot;&gt;Element&lt;/q&gt;[id]">The full list of currently selected objects.</Param><Param name="cancel" type="Boolean" default="false">Set this flag to &lt;code&gt;true&lt;/code&gt; to cancel the event.</Param></Parameters></Event>
<Event name="onConnectMenu" sortGroup="true" scope="public" id="core.svg:Diagram!onConnectMenu" sort="36" group="Events" seq="0001"><Summary>Fires when the user right-connects two shapes. Use this event to customize the connection's context menu.</Summary><Parameters signature="event:: &lt;b&gt;onConnectMenu&lt;/b&gt; &amp;rarr; {&lt;i&gt;object&lt;/i&gt;, &lt;i&gt;source&lt;/i&gt;, &lt;i&gt;target&lt;/i&gt;, &lt;i&gt;pos&lt;/i&gt;, &lt;i&gt;menu&lt;/i&gt;, &lt;i&gt;callback&lt;/i&gt;, &lt;i&gt;cancel&lt;/i&gt;}"><Param name="object" type="gml:Element" typeRef="&lt;q ref=&quot;core.gml:Element&quot;&gt;Element&lt;/q&gt;">The element that owns the target plug.</Param><Param name="source" type="gml:Plug" typeRef="&lt;q ref=&quot;core.gml:Plug&quot;&gt;Plug&lt;/q&gt;">The source plug.</Param><Param name="target" type="gml:Plug" typeRef="&lt;q ref=&quot;core.gml:Plug&quot;&gt;Plug&lt;/q&gt;">The target plug.</Param><Param name="pos" type="Point">The pointer position, in logical units relative to the diagram origin.</Param><Param name="menu" type="env:KitMenubars!MENU_BAR" typeRef="&lt;q ref=&quot;core.env:KitMenubars!MENU_BAR&quot;&gt;MENU_BAR&lt;/q&gt;">The context menu definition object. Use the MENU_BAR methods to customize the menu items.</Param><Param name="callback" default="" type="Function">DEPRECATED: Use this parameter to set a callback function that will be invoked when a menu item is selected. If omitted, then the SIGNAL macro will be invoked.</Param><Param name="cancel" type="Boolean" default="false">Set this flag to &lt;code&gt;true&lt;/code&gt; to cancel the event.</Param></Parameters></Event>
<Event name="onDiagramMenu" sortGroup="true" scope="public" id="core.svg:Diagram!onDiagramMenu" sort="36" group="Events" seq="0002"><Summary>Fires when the user right-clicks the diagram background. Use this event to customize the diagram's context menu.</Summary><Parameters signature="event:: &lt;b&gt;onDiagramMenu&lt;/b&gt; &amp;rarr; {&lt;i&gt;object&lt;/i&gt;, &lt;i&gt;pos&lt;/i&gt;, &lt;i&gt;menu&lt;/i&gt;, &lt;i&gt;callback&lt;/i&gt;, &lt;i&gt;cancel&lt;/i&gt;}"><Param name="object" type="gml:Unit" typeRef="&lt;q ref=&quot;core.gml:Unit&quot;&gt;Unit&lt;/q&gt;">The unit base object of the diagram.</Param><Param name="pos" type="Point">The pointer position, in logical units relative to the diagram origin.</Param><Param name="menu" type="env:KitMenubars!MENU_BAR" typeRef="&lt;q ref=&quot;core.env:KitMenubars!MENU_BAR&quot;&gt;MENU_BAR&lt;/q&gt;">The context menu definition object. Use the MENU_BAR methods to customize the menu items.</Param><Param name="callback" default="" type="Function">DEPRECATED: Use this parameter to set a callback function that will be invoked when a menu item is selected. If omitted, then the SIGNAL macro will be invoked.</Param><Param name="cancel" type="Boolean" default="false">Set this flag to &lt;code&gt;true&lt;/code&gt; to cancel the event.</Param></Parameters></Event>
<Event name="onDragEnter" sortGroup="true" scope="public" id="core.svg:Diagram!onDragEnter" sort="36" group="Events" seq="0003"><Summary>Fires when the user enters the drawing board.</Summary><Parameters signature="event:: &lt;b&gt;onDragEnter&lt;/b&gt; &amp;rarr; {&lt;i&gt;object&lt;/i&gt;, &lt;i&gt;dnd&lt;/i&gt;, &lt;i&gt;cancel&lt;/i&gt;}"><Param name="object" type="gml:Unit" typeRef="&lt;q ref=&quot;core.gml:Unit&quot;&gt;Unit&lt;/q&gt;">The containing Unit.</Param><Param name="dnd" type="dev:Controller!DND_OBJECT" typeRef="&lt;q ref=&quot;core.dev:Controller!DND_OBJECT&quot;&gt;DND_OBJECT&lt;/q&gt;">The drag and drop data object.</Param><Param name="cancel" type="Boolean" default="false">Set this flag to &lt;code&gt;true&lt;/code&gt; to cancel the event.</Param></Parameters></Event>
<Event name="onDrawingAction" sortGroup="true" scope="public" id="core.svg:Diagram!onDrawingAction" sort="36" group="Events" seq="0004"><Summary>Fires when the user triggers a drawing-related action.</Summary><Parameters signature="event:: &lt;b&gt;onDrawingAction&lt;/b&gt; &amp;rarr; {&lt;i&gt;object&lt;/i&gt;, &lt;i&gt;detail&lt;/i&gt;}"><Param name="object" type="gml:Element" typeRef="&lt;q ref=&quot;core.gml:Element&quot;&gt;Element&lt;/q&gt;">The base object of the drawing element that was activated.</Param><Param name="detail" type="Number">The action code (SVG_ACTIVATE, SVG_CONNECT, or SVG_ATTACH).</Param></Parameters></Event>
<Event name="onDropMenu" sortGroup="true" scope="public" id="core.svg:Diagram!onDropMenu" sort="36" group="Events" seq="0005"><Summary>Fires when the user drops a shape sprite on the diagram. Use this event to customize the drag and drop context menu.</Summary><Parameters signature="event:: &lt;b&gt;onDropMenu&lt;/b&gt; &amp;rarr; {&lt;i&gt;object&lt;/i&gt;, &lt;i&gt;dnd&lt;/i&gt;, &lt;i&gt;pos&lt;/i&gt;, &lt;i&gt;menu&lt;/i&gt;, &lt;i&gt;callback&lt;/i&gt;, &lt;i&gt;cancel&lt;/i&gt;}"><Param name="object" type="gml:GmlObject" typeRef="&lt;q ref=&quot;core.gml:GmlObject&quot;&gt;GmlObject&lt;/q&gt;">The base object of the graphic element on which the sprite has been dropped.</Param><Param name="dnd" type="dev:Controller!DND_OBJECT" typeRef="&lt;q ref=&quot;core.dev:Controller!DND_OBJECT&quot;&gt;DND_OBJECT&lt;/q&gt;">The drag and drop data object.</Param><Param name="pos" type="Point">The pointer position, in logical units relative to the diagram origin.</Param><Param name="menu" type="env:KitMenubars!MENU_BAR" typeRef="&lt;q ref=&quot;core.env:KitMenubars!MENU_BAR&quot;&gt;MENU_BAR&lt;/q&gt;">The context menu definition object. Use the MENU_BAR methods to customize the menu items.</Param><Param name="callback" default="" type="Function">DEPRECATED: Use this parameter to set a callback function that will be invoked when a menu item is selected. If omitted, then the SIGNAL macro will be invoked.</Param><Param name="cancel" type="Boolean" default="false">Set this flag to &lt;code&gt;true&lt;/code&gt; to cancel the event.</Param></Parameters><Remarks>&lt;p&gt;
         The default drop behavior will be cancelled if either the &lt;code&gt;cancel&lt;/code&gt; parameter is set to &lt;code&gt;true,&lt;/code&gt; or 
         the &lt;code&gt;menu&lt;/code&gt; parameter is populated with menu items. In the latter case, the menu will be opened
         instead of the default drop behavior.
      &lt;/p&gt;&lt;p&gt;
         The following is a sample listener for the &lt;code&gt;onDropMenu&lt;/code&gt; event:
      &lt;/p&gt;

&lt;pre&gt;
listen onDropMenu
   var diag=object, cp=(pos.x)+' '+(pos.y);
   menu.append({signal:'FormView',callback:quickCreate , text:'Add Form', icon:'HEX23URL[ur&lt;code&gt;skin:symbols.formview16.gif]'});&lt;/code&gt;
   menu.append({signal:'GridView',callback:quickCreate , text:'Add Grid', icon:'HEX23URL[ur&lt;code&gt;skin:symbols.gridview16.gif]'});&lt;/code&gt;
   menu.append({signal:'ListView',callback:quickCreate , text:'Add List', icon:'HEX23URL[ur&lt;code&gt;skin:symbols.listview16.gif]'});&lt;/code&gt;
   menu.append();
   menu.append({signal:'cancel', text:'Cancel'});
  

   function quickCreate(signal) {
      if (signal == 'cancel')  return;
      diag.createElement('com.sap.vcsample:'+signal, 'elements', {'HEX40g:pos':cp});
   }
end
&lt;/pre&gt;</Remarks></Event>
<Event name="onQuickConnectMenu" sortGroup="true" scope="public" id="core.svg:Diagram!onQuickConnectMenu" sort="36" group="Events" seq="0006"><Summary>Fires when the user creates a dangling connection (i.e., connects a shape to nothing). Use this event to customize the quick-connect context menu.</Summary><Parameters signature="event:: &lt;b&gt;onQuickConnectMenu&lt;/b&gt; &amp;rarr; {&lt;i&gt;object&lt;/i&gt;, &lt;i&gt;source&lt;/i&gt;, &lt;i&gt;pos&lt;/i&gt;, &lt;i&gt;menu&lt;/i&gt;, &lt;i&gt;callback&lt;/i&gt;, &lt;i&gt;cancel&lt;/i&gt;}"><Param name="object" type="gml:Element" typeRef="&lt;q ref=&quot;core.gml:Element&quot;&gt;Element&lt;/q&gt;">The element that owns the source plug.</Param><Param name="source" type="gml:Plug" typeRef="&lt;q ref=&quot;core.gml:Plug&quot;&gt;Plug&lt;/q&gt;">The source plug.</Param><Param name="pos" type="Point">The pointer position, in logical units relative to the diagram origin.</Param><Param name="menu" type="env:KitMenubars!MENU_BAR" typeRef="&lt;q ref=&quot;core.env:KitMenubars!MENU_BAR&quot;&gt;MENU_BAR&lt;/q&gt;">The context menu definition object. Use the MENU_BAR methods to customize the menu items.</Param><Param name="callback" default="" type="Function">DEPRECATED: Use this parameter to set a callback function that will be invoked when a menu item is selected. If omitted, then the SIGNAL macro will be invoked.</Param><Param name="cancel" type="Boolean" default="false">Set this flag to &lt;code&gt;true&lt;/code&gt; to cancel the event.</Param></Parameters><Remarks>&lt;p&gt;
         The following is a sample listener for the &lt;code&gt;onQuickConnectMenu&lt;/code&gt; event:
      &lt;/p&gt;
      
&lt;pre&gt;

listen onQuickConnectMenu for 
   var unit=object.unit, cp= pos.x + ' ' + pos.y, srcplug=source;
   menu.append({signal:'FormView', callback: quickConnect  , text:'Add Form', icon:'HEX23URL[ur&lt;code&gt;skin:symbols.formview16.gif]'});&lt;/code&gt;
   menu.append({signal:'GridView', callback: quickConnect  , text:'Add Grid', icon:'HEX23URL[ur&lt;code&gt;skin:symbols.gridview16.gif]'});&lt;/code&gt;
   menu.append({signal:'GridView', callback: quickConnect  , text:'Add List', icon:'HEX23URL[ur&lt;code&gt;skin:symbols.listview16.gif]'});&lt;/code&gt;
   menu.append();
   menu.append({signal:'cancel',callback: quickConnect, text:'Cancel'});
   
   function quickConnect(signal) {
      if (signal == 'cancel')  return;
      BEGIN();
      var trgelem, trgplug;
      if (srcplug.dir == ) {
         trgelem = unit.createElement('com.sap.vcsample:'+signal,'elements',  {'':(cp.x-40)+' '+(cp.y+10)});
         trgplug = srcplug;
         srcplug = trgelem.getSinglePlug();
         trgelem = trgplug.parent;
      } else {
         trgelem = unit.createElement('com.sap.vcsample:'+signal ,'elements' ,  {'':(cp.x+40)+' '+(cp.y+10)});
         trgplug = trgelem.getSinglePlug();
      }
      var linktype = trgelem.canConnect(srcplug, trgplug);
      var A = SPLIT(TRIM(linktype));
      if (!A[0]) { ROLLBACK(); return; }
      unit.createElement(A[0], 'elements', {source:srcplug, target:trgplug});
      COMMIT();
   }
end

&lt;/pre&gt;</Remarks></Event>
<Event name="onQuickCreateMenu" sortGroup="true" scope="public" id="core.svg:Diagram!onQuickCreateMenu" sort="36" group="Events" seq="0007"><Summary>Fires when the user right-drags an empty region on the diagram. Use this event to customize the quick-create context menu.</Summary><Parameters signature="event:: &lt;b&gt;onQuickCreateMenu&lt;/b&gt; &amp;rarr; {&lt;i&gt;object&lt;/i&gt;, &lt;i&gt;rect&lt;/i&gt;, &lt;i&gt;menu&lt;/i&gt;, &lt;i&gt;callback&lt;/i&gt;, &lt;i&gt;cancel&lt;/i&gt;}"><Param name="object" type="gml:Unit" typeRef="&lt;q ref=&quot;core.gml:Unit&quot;&gt;Unit&lt;/q&gt;">The containing diagram.</Param><Param name="rect" type="Rectangle">The region bounding box, in logical units relative to the diagram origin.</Param><Param name="menu" type="env:KitMenubars!MENU_BAR" typeRef="&lt;q ref=&quot;core.env:KitMenubars!MENU_BAR&quot;&gt;MENU_BAR&lt;/q&gt;">The context menu definition object. Use the MENU_BAR methods to customize the menu items.</Param><Param name="callback" default="" type="Function">DEPRECATED: Use this parameter to set a callback function that will be invoked when a menu item is selected. If omitted, then the SIGNAL macro will be invoked.</Param><Param name="cancel" type="Boolean" default="false">Set this flag to &lt;code&gt;true&lt;/code&gt; to cancel the event.</Param></Parameters><Remarks>&lt;p&gt;
         The following is a sample listener for the &lt;code&gt;onQuickCreateMenu&lt;/code&gt; event:
      &lt;/p&gt;
      
&lt;pre&gt;
listen onQuickCreateMenu
   var diag=object, cp=(rect.x+rect.w/2)+' '+(rect.y+rect.h/2);
   menu.append({signal:'FormView', callback:quickCreate , text:'Add Form', icon:'HEX23URL[ur&lt;code&gt;skin:symbols.formview16.gif]'});&lt;/code&gt;
   menu.append({signal:'GridView', callback:quickCreate ,text:'Add Grid', icon:'HEX23URL[ur&lt;code&gt;skin:symbols.gridview16.gif]'});&lt;/code&gt;
   menu.append({signal:'ListView', callback:quickCreate ,text:'Add List', icon:'HEX23URL[ur&lt;code&gt;skin:symbols.listview16.gif]'});&lt;/code&gt;
   menu.append();
   menu.append({signal:'cancel', callback:quickCreate ,text:'Cancel'});
   
   function quickCreate(signal) {
      if (signal == 'cancel')  return;
      diag.createElement('com.sap.vcsample:'+signal, 'elements', {'HEX40g:pos':cp});
   }
end

&lt;/pre&gt;</Remarks></Event>
<Event name="onRegionMenu" sortGroup="true" scope="public" id="core.svg:Diagram!onRegionMenu" sort="36" group="Events" seq="0008"><Summary>Fires when the user right-drags a non-empty region on the diagram. Use this event to customize the region's context menu.</Summary><Parameters signature="event:: &lt;b&gt;onRegionMenu&lt;/b&gt; &amp;rarr; {&lt;i&gt;object&lt;/i&gt;, &lt;i&gt;selection&lt;/i&gt;, &lt;i&gt;rect&lt;/i&gt;, &lt;i&gt;menu&lt;/i&gt;, &lt;i&gt;callback&lt;/i&gt;, &lt;i&gt;cancel&lt;/i&gt;}"><Param name="object" type="gml:Unit" typeRef="&lt;q ref=&quot;core.gml:Unit&quot;&gt;Unit&lt;/q&gt;">The containing diagram.</Param><Param name="selection" type="gml:GmlObject[]" typeRef="&lt;q ref=&quot;core.gml:GmlObject&quot;&gt;GmlObject&lt;/q&gt;[]">The full list of objects encompassed by the region.</Param><Param name="rect" type="Rectangle">The region bounding box, in logical units relative to the diagram origin.</Param><Param name="menu" type="env:KitMenubars!MENU_BAR" typeRef="&lt;q ref=&quot;core.env:KitMenubars!MENU_BAR&quot;&gt;MENU_BAR&lt;/q&gt;">The context menu definition object. Use the MENU_BAR methods to customize the menu items.</Param><Param name="callback" default="" type="Function">DEPRECATED: Use this parameter to set a callback function that will be invoked when a menu item is selected. If omitted, then the SIGNAL macro will be invoked.</Param><Param name="cancel" type="Boolean" default="false">Set this flag to &lt;code&gt;true&lt;/code&gt; to cancel the event.</Param></Parameters></Event>
<Event name="onShapeMenu" sortGroup="true" scope="public" id="core.svg:Diagram!onShapeMenu" sort="36" group="Events" seq="0009"><Summary>Fires when the user right-clicks a shape. Use this event to customize the shape's context menu.</Summary><Parameters signature="event:: &lt;b&gt;onShapeMenu&lt;/b&gt; &amp;rarr; {&lt;i&gt;object&lt;/i&gt;, &lt;i&gt;selection&lt;/i&gt;, &lt;i&gt;pos&lt;/i&gt;, &lt;i&gt;menu&lt;/i&gt;, &lt;i&gt;callback&lt;/i&gt;, &lt;i&gt;cancel&lt;/i&gt;}"><Param name="object" type="gml:Element" typeRef="&lt;q ref=&quot;core.gml:Element&quot;&gt;Element&lt;/q&gt;">The base object of the shape in focus.</Param><Param name="selection" type="gml:Element[]" typeRef="&lt;q ref=&quot;core.gml:Element&quot;&gt;Element&lt;/q&gt;[]">The full list of currently selected objects.</Param><Param name="pos" type="Point">The pointer position, in logical units relative to the diagram origin.</Param><Param name="menu" type="env:KitMenubars!MENU_BAR" typeRef="&lt;q ref=&quot;core.env:KitMenubars!MENU_BAR&quot;&gt;MENU_BAR&lt;/q&gt;">The context menu definition object. Use the MENU_BAR methods to customize the menu items.</Param><Param name="callback" default="" type="Function">DEPRECATED: Use this parameter to set a callback function that will be invoked when a menu item is selected. If omitted, then the SIGNAL macro will be invoked.</Param><Param name="cancel" type="Boolean" default="false">Set this flag to &lt;code&gt;true&lt;/code&gt; to cancel the event.</Param></Parameters></Event>
</Topics>
</Aspect>