<?xml version="1.0" encoding="Windows-1255" ?><Interface name="KitEvents" alias="$ENV" id="core.env:KitEvents" sort="23" urn="core.env:extensions.KitEvents.js" toc="\Extension Points"><Summary>Extension point for defining kit event listeners.</Summary><Copyright>(c) SAP AG 2003-2006. All rights reserved.</Copyright>
<Topics>
<Method name="defineListener" sortGroup="true" scope="public" id="core.env:KitEvents!defineListener" sort="35" group="Methods" seq="0000"><Summary>Defines a new event listener.</Summary><Parameters signature="method:: &lt;i&gt;$ENV&lt;/i&gt;.&lt;b&gt;defineListener&lt;/b&gt;(&lt;i&gt;def&lt;/i&gt;) &amp;rarr; &lt;q ref=&quot;core.env:KitEvents!EVENT_LISTENER&quot;&gt;EVENT_LISTENER&lt;/q&gt;"><Param name="def" type="EVENT_LISTENER" typeRef="&lt;q ref=&quot;core.env:KitEvents!EVENT_LISTENER&quot;&gt;EVENT_LISTENER&lt;/q&gt;">The new event listener definition.</Param></Parameters><Return type="EVENT_LISTENER" typeRef="&lt;q ref=&quot;core.env:KitEvents!EVENT_LISTENER&quot;&gt;EVENT_LISTENER&lt;/q&gt;">The newly defined event listener.</Return><Remarks>The order in which event listeners are defined in the kits configuration (their loading sequence)
      determines the order in which they will be invoked when their respective event is raised.

      &lt;h2&gt;Xml definition of a listener in a configuration file&lt;/h2&gt;
      &lt;pre&gt;
      &amp;lt;CONFIGURE type=&amp;quot;LISTENERS&amp;quot;&amp;gt;
      ?  &amp;lt;HEADER&amp;gt;
      ?     &amp;lt;PRAGMA&amp;gt;# Pragmas section&amp;lt;/PRAGMA&amp;gt;
      ?     &amp;lt;SCRIPT&amp;gt;# Code section. Place here functions\variables
                      which you want to address from within the listener tags
            &amp;lt;/SCRIPT&amp;gt;
         &amp;lt;/HEADER&amp;gt;
         &amp;lt;LISTENERS&amp;gt;
      +     &amp;lt;LISTENER&amp;gt;
               # For complete description of listener
               definition see &lt;q ref=&quot;core.env:KitEvents!EVENT_LISTENER&quot;&gt;EVENT_LISTENER&lt;/q&gt;
      ?        &amp;lt;PROPERTIES&amp;gt;
      *             &amp;lt;propertyName type=&amp;quot;[function | ]&amp;quot;/&amp;gt;
                        # Represents a property of the listener
                        You can assign the 'type' attribute for
                        evaluating the value of the property
                        as a function
               &amp;lt;/PROPERTIES&amp;gt;
            &amp;lt;/LISTENER&amp;gt;
         &amp;lt;/LISTENERS&amp;gt;
      &amp;lt;/CONFIGURE&amp;gt;
      &lt;/pre&gt;
      &lt;h2&gt;Example&lt;/h2&gt;
      &lt;pre&gt;
      &amp;lt;CONFIGURE type=&amp;quot;LISTENERS&amp;quot;&amp;gt;
         &amp;lt;LISTENERS&amp;gt;
            &amp;lt;LISTENER&amp;gt;
               &amp;lt;PROPERTIES&amp;gt;
                  &amp;lt;type&amp;gt;onshapemenu&amp;lt;/type&amp;gt;
                  &amp;lt;func type=&amp;quot;function&amp;quot;&amp;gt;&amp;lt;![CDATA[
                           function () { return &amp;quot;onshapemenu&amp;quot;}]]&amp;gt;&amp;lt;/func&amp;gt;
               &amp;lt;/PROPERTIES&amp;gt;
            &amp;lt;/LISTENER&amp;gt;
         &amp;lt;/LISTENERS&amp;gt;
      &amp;lt;/CONFIGURE&amp;gt;
      &lt;/pre&gt;</Remarks></Method>
<Method name="getEventType" sortGroup="true" scope="public" id="core.env:KitEvents!getEventType" sort="35" group="Methods" seq="0001"><Summary>Gets a specified kit event type.</Summary><Parameters signature="method:: &lt;i&gt;$ENV&lt;/i&gt;.&lt;b&gt;getEventType&lt;/b&gt;(&lt;i&gt;type&lt;/i&gt;) &amp;rarr; &lt;q ref=&quot;core.env:KitEvents!EVENT_TYPE&quot;&gt;EVENT_TYPE&lt;/q&gt;"><Param name="type" type="String">The requested event type name.</Param></Parameters><Return type="EVENT_TYPE" typeRef="&lt;q ref=&quot;core.env:KitEvents!EVENT_TYPE&quot;&gt;EVENT_TYPE&lt;/q&gt;">The requested event type definition.</Return></Method>
<Method name="getEventTypesTable" sortGroup="true" scope="public" id="core.env:KitEvents!getEventTypesTable" sort="35" group="Methods" seq="0002"><Summary>Gets the complete kit events types table.</Summary><Parameters signature="method:: &lt;i&gt;$ENV&lt;/i&gt;.&lt;b&gt;getEventTypesTable&lt;/b&gt;() &amp;rarr; &lt;q ref=&quot;core.env:KitEvents!EVENT_TYPE&quot;&gt;EVENT_TYPE&lt;/q&gt;[type]"></Parameters><Return type="EVENT_TYPE[type]" typeRef="&lt;q ref=&quot;core.env:KitEvents!EVENT_TYPE&quot;&gt;EVENT_TYPE&lt;/q&gt;[type]">Returns the table of all kit event types, indexed by type name.</Return><Remarks>Event id's are stored in lowercase. Use &lt;q ref=&quot;core.lib:Basic!LOWER&quot;&gt;LOWER&lt;/q&gt; macro to convert the event's id to lowercase
before using it as the index in this table.</Remarks></Method>
<Method name="getListener" sortGroup="true" scope="public" id="core.env:KitEvents!getListener" sort="35" group="Methods" seq="0003"><Summary>Gets a specified kit event listener definition.</Summary><Parameters signature="method:: &lt;i&gt;$ENV&lt;/i&gt;.&lt;b&gt;getListener&lt;/b&gt;(&lt;i&gt;id&lt;/i&gt;) &amp;rarr; &lt;q ref=&quot;core.env:KitEvents!EVENT_LISTENER&quot;&gt;EVENT_LISTENER&lt;/q&gt;"><Param name="id" type="Number">event listener Id.</Param></Parameters><Return type="EVENT_LISTENER" typeRef="&lt;q ref=&quot;core.env:KitEvents!EVENT_LISTENER&quot;&gt;EVENT_LISTENER&lt;/q&gt;">The requested event listener definition.</Return></Method>
<Method name="getListenersTable" sortGroup="true" scope="public" id="core.env:KitEvents!getListenersTable" sort="35" group="Methods" seq="0004"><Summary>Gets the complete kit event listeners table.</Summary><Parameters signature="method:: &lt;i&gt;$ENV&lt;/i&gt;.&lt;b&gt;getListenersTable&lt;/b&gt;() &amp;rarr; &lt;q ref=&quot;core.env:KitEvents!EVENT_LISTENER&quot;&gt;EVENT_LISTENER&lt;/q&gt;[id]"></Parameters><Return type="EVENT_LISTENER[id]" typeRef="&lt;q ref=&quot;core.env:KitEvents!EVENT_LISTENER&quot;&gt;EVENT_LISTENER&lt;/q&gt;[id]">Table of event listeners definitions, indexed by id.</Return></Method>
<Method name="removeListener" sortGroup="true" scope="public" id="core.env:KitEvents!removeListener" sort="35" group="Methods" seq="0005"><Summary>Removes a specified event listener definition.</Summary><Parameters signature="method:: &lt;i&gt;$ENV&lt;/i&gt;.&lt;b&gt;removeListener&lt;/b&gt;(&lt;i&gt;id&lt;/i&gt;) &amp;rarr; void"><Param name="id" type="Number">The id of the event listener to remove.</Param></Parameters><Return></Return></Method>
<Structure name="EVENT_LISTENER" sortGroup="true" id="core.env:KitEvents!EVENT_LISTENER" sort="41" group="Structures" seq="0006"><Summary>Represents a kit event listener definition.</Summary><Remarks>The EVENT_LISTENER structure is made of:
      &lt;table class=&quot;BOTH&quot;&gt;&lt;tr&gt;&lt;td class=&quot;H V&quot;&gt;Name &lt;/td&gt;&lt;td class=H&gt;Type &lt;/td&gt;&lt;td class=H&gt;Description &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=V&gt;id &lt;/td&gt;&lt;td&gt;Number &lt;/td&gt;&lt;td&gt;Unique listener Id (created automatically by the system) &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=V&gt;type &lt;/td&gt;&lt;td&gt;String &lt;/td&gt;&lt;td&gt;Event type to listen to &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=V&gt;func &lt;/td&gt;&lt;td&gt;Function &lt;/td&gt;&lt;td&gt;Function to be invoked by the event listener &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=V&gt;object &lt;/td&gt;&lt;td&gt;String &lt;/td&gt;&lt;td&gt;Restrict listener to events triggered on specified class of objects &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=V&gt;property &lt;/td&gt;&lt;td&gt;String &lt;/td&gt;&lt;td&gt;Restrict listener to events on specified property name &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</Remarks></Structure>
<Structure name="EVENT_TYPE" sortGroup="true" id="core.env:KitEvents!EVENT_TYPE" sort="41" group="Structures" seq="0007"><Summary>Represents a kit event type.</Summary><Remarks>The EVENT_TYPE structure is made of:
      &lt;table class=&quot;BOTH&quot;&gt;&lt;tr&gt;&lt;td class=&quot;H V&quot;&gt;Name &lt;/td&gt;&lt;td class=H&gt;Type &lt;/td&gt;&lt;td class=H&gt;Description &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=V&gt;type &lt;/td&gt;&lt;td&gt;String &lt;/td&gt;&lt;td&gt;Event type name &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=V&gt;0..n &lt;/td&gt;&lt;td&gt;String &lt;/td&gt;&lt;td&gt;Event parameter names &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</Remarks></Structure>
</Topics>
</Interface>