<docbook><section><title>OATDOCcombobutton</title><para> </para>
<title> combobutton.js</title> combobutton.js
<para>Creates a combobutton, which is a multi-functional button.
 It enables user to specify a callback action to be performed when it is clicked.</para>
<bridgehead class="http://www.w3.org/1999/xhtml:h2"> Objects</bridgehead>
<bridgehead class="http://www.w3.org/1999/xhtml:h3"> OAT.Combobutton()</bridgehead>
<para>Creates a combobutton.
 Its main div is accessible as <computeroutput>OAT.Combobutton::div</computeroutput>.</para>
<bridgehead class="http://www.w3.org/1999/xhtml:h2"> Methods</bridgehead>
<bridgehead class="http://www.w3.org/1999/xhtml:h3"> OAT.Combobutton::addOption(imagePath, textValue, callback)</bridgehead>
<para>Adds a new option, described as <computeroutput>textValue</computeroutput> with image located at <computeroutput>imagePath</computeroutput>.
 When this option is clicked, <computeroutput>callback</computeroutput> is called.</para>
<bridgehead class="http://www.w3.org/1999/xhtml:h3"> OAT.Combobutton::removeOption(index)</bridgehead>
<para>Removes <computeroutput>index-th</computeroutput> option.</para>
<bridgehead class="http://www.w3.org/1999/xhtml:h2"> CSS classes</bridgehead>
<bridgehead class="http://www.w3.org/1999/xhtml:h3"> .combo_button</bridgehead>
<para>CSS class of the button options list.</para>
<bridgehead class="http://www.w3.org/1999/xhtml:h3"> .combo_image</bridgehead>
<para>CSS class of the dropdown clicker image.</para>
<bridgehead class="http://www.w3.org/1999/xhtml:h3"> .combo_button_option</bridgehead>
<para>CSS class of the button option div.</para>
<bridgehead class="http://www.w3.org/1999/xhtml:h3"> .combo_button_text</bridgehead>
<para>CSS class of the div with textual description of the option.</para>
<bridgehead class="http://www.w3.org/1999/xhtml:h3"> .combo_button_down</bridgehead>
<para>CSS class that is added/removed to option whenever the button is clicked/released.</para>
<bridgehead class="http://www.w3.org/1999/xhtml:h2"> Example</bridgehead>
<programlisting>var cb = new OAT.Combobutton();
document.body.appendChild( cb.div );
cb.addOption(&quot;img1.gif&quot;, &quot;option 1&quot;, function(){});
cb.addOption(&quot;img2.gif&quot;, &quot;option 2&quot;, function(){});
cb.removeOption(0);
</programlisting><para> <ulink url="CategoryDocumentation">CategoryDocumentation</ulink> <ulink url="CategoryOAT">CategoryOAT</ulink> <ulink url="CategoryOpenSource">CategoryOpenSource</ulink></para>
</section></docbook>