<?xml version="1.0" encoding="UTF-8"?>
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="setmenu">
    <refnamediv>
        <refname>setmenu</refname>
        <refpurpose>interactive button or menu activation</refpurpose>
    </refnamediv>
    <refsynopsisdiv>
        <title>Syntax</title>
        <synopsis>setmenu(button [,nsub])
            setmenu(gwin,button [,nsub])
        </synopsis>
    </refsynopsisdiv>
    <refsection>
        <title>Arguments</title>
        <variablelist>
            <varlistentry>
                <term>button</term>
                <listitem>
                    <para>a character string. The button name</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>gwin</term>
                <listitem>
                    <para>integer. The number of graphic window where the button is  installed</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>nsub</term>
                <listitem>
                    <para>
                        integer. The number of submenu to activate (if any). If button has no sub-menu, <literal>nsub</literal> is ignored
                    </para>
                </listitem>
            </varlistentry>
        </variablelist>
    </refsection>
    <refsection>
        <title>Description</title>
        <para>
            The function allows the user to make active  buttons or menus created by
            <literal>addmenu</literal> in the main or graphics windows command panels.
        </para>
    </refsection>
    <refsection>
        <title>Examples</title>
        <programlisting role="example"><![CDATA[
addmenu('foo')   // New button made in main scilab window
unsetmenu('foo') // button foo cannot be activated (grey string)
setmenu('foo')   // button foo can be activated (black string)
 ]]></programlisting>
    </refsection>
    <refsection role="see also">
        <title>See also</title>
        <simplelist type="inline">
            <member>
                <link linkend="delmenu">delmenu</link>
            </member>
            <member>
                <link linkend="unsetmenu">unsetmenu</link>
            </member>
            <member>
                <link linkend="addmenu">addmenu</link>
            </member>
        </simplelist>
    </refsection>
</refentry>
