<docbook><section><title>OATDOCtab</title><para> </para>
<title> tab.js</title> tab.js
<para>Provides tab functionality.</para>
<bridgehead class="http://www.w3.org/1999/xhtml:h2"> Objects</bridgehead>
<bridgehead class="http://www.w3.org/1999/xhtml:h3"> OAT.Tab(element,options)</bridgehead>
<para>Creates Tab object.
 The <computeroutput>element</computeroutput> specifies a container where the tab contents will be placed.<computeroutput>options</computeroutput> may contain:</para>
<itemizedlist mark="bullet" spacing="compact"><listitem><computeroutput> <emphasis>goCallback</emphasis></computeroutput> - function to be called when tab switching occurs.
 Two parameters will be supplied: old index an new index.
</listitem>
<listitem><computeroutput> <emphasis>onUnDock</emphasis></computeroutput> - function to be called when tab undocks.
 One parameters will be supplied: tab&#39;s index.
</listitem>
<listitem><computeroutput> <emphasis>onDock</emphasis></computeroutput> - function to be called when tab docks.
 One parameters will be supplied: tab&#39;s index.
</listitem>
<listitem><computeroutput> <emphasis>dockMode</emphasis></computeroutput> - bool; can tabs can be undocked into standalone windows? default <computeroutput>true</computeroutput>.
 You need to include the &#39;windows&#39; library.
</listitem>
<listitem><computeroutput> <emphasis>dockElement</emphasis></computeroutput> - DOM node (or ID) specifying parent node for tabs; only needed when <computeroutput>dockMode</computeroutput> true </listitem>
<listitem><computeroutput> <emphasis>dockWindowWidth</emphasis></computeroutput> - Sets width of dock window </listitem>
<listitem><computeroutput> <emphasis>dockWindowHeight</emphasis></computeroutput> - Sets height of dock window</listitem>
</itemizedlist><bridgehead class="http://www.w3.org/1999/xhtml:h2"> Methods</bridgehead>
<bridgehead class="http://www.w3.org/1999/xhtml:h3"> OAT.Tab.add(clicker, window)</bridgehead>
<para>Adds a new <computeroutput>clicker-window</computeroutput> pair, i.e., when the user clicks <computeroutput>clicker</computeroutput>, <computeroutput>window</computeroutput> will be shown.</para>
<bridgehead class="http://www.w3.org/1999/xhtml:h3"> OAT.Tab.remove(clicker)</bridgehead>
<para>Removes a <computeroutput>clicker-window</computeroutput> pair.</para>
<bridgehead class="http://www.w3.org/1999/xhtml:h3"> OAT.Tab.go(index)</bridgehead>
<para>Switches to tab, according to <computeroutput>index</computeroutput>.</para>
<bridgehead class="http://www.w3.org/1999/xhtml:h2"> CSS classes</bridgehead>
<bridgehead class="http://www.w3.org/1999/xhtml:h3"> .tab</bridgehead>
<para><ulink url="ToBeDone">ToBeDone</ulink></para>
<bridgehead class="http://www.w3.org/1999/xhtml:h3"> .tab_selected</bridgehead>
<para><ulink url="ToBeDone">ToBeDone</ulink></para>
<bridgehead class="http://www.w3.org/1999/xhtml:h2"> Example</bridgehead>
<programlisting>var t = new OAT.Tab(&quot;content&quot;);
t.add(&quot;header_1&quot;,&quot;window_1&quot;);
t.add(&quot;header_2&quot;,&quot;window_2&quot;);
t.go(0);
</programlisting><para> <ulink url="CategoryOAT">CategoryOAT</ulink> <ulink url="CategoryOpenSource">CategoryOpenSource</ulink> <ulink url="CategoryDocumentation">CategoryDocumentation</ulink> <ulink url="CategoryToBeDone">CategoryToBeDone</ulink></para>
</section></docbook>