<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<!DOCTYPE MAN SYSTEM "../../manrev.dtd">
<MAN>
  <LANGUAGE>eng</LANGUAGE>
  <TITLE>uimenu</TITLE>
  <TYPE>Scilab Function</TYPE>
  <DATE> 05 June 1998</DATE>
  <SHORT_DESCRIPTION name="uimenu"> Create a menu or a submenu in a figure</SHORT_DESCRIPTION>
  <CALLING_SEQUENCE>
    <CALLING_SEQUENCE_ITEM>h=uimenu([prop1,val1] [,prop2, val2] ...)  </CALLING_SEQUENCE_ITEM>
    <CALLING_SEQUENCE_ITEM>h=uimenu(parent,[prop1, val1] [,prop2, val2] ...)  </CALLING_SEQUENCE_ITEM>
  </CALLING_SEQUENCE>
  <PARAM>
    <PARAM_INDENT>
      <PARAM_ITEM>
        <PARAM_NAME>parent </PARAM_NAME>
        <PARAM_DESCRIPTION>
          <SP>: integer Handle of menu's parent</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
      <PARAM_ITEM>
        <PARAM_NAME>prop{1, 2 ...}</PARAM_NAME>
        <PARAM_DESCRIPTION>
          <SP>: string character name of a property to set up</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
      <PARAM_ITEM>
        <PARAM_NAME>val{1, 2 ...}</PARAM_NAME>
        <PARAM_DESCRIPTION>
          <SP>: scilab object value to affect to the corresponding property</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
      <PARAM_ITEM>
        <PARAM_NAME>h</PARAM_NAME>
        <PARAM_DESCRIPTION>
          <SP>: integer handle of the corresponding menu</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
    </PARAM_INDENT>
  </PARAM>
  <DESCRIPTION>
    <P>
    This allows to create menus in a figure.
    If <VERB>parent</VERB> is a figure, then
    the menu item will be added to the menu bar of the figure.
    If <VERB>parent</VERB> is a menu item , then the new item will be added to the parent
    item, allowing to create cascaded submenu.
    To create a customized menu, you can use the properties listed below:
    </P>
  </DESCRIPTION>
  <SECTION label="Properties">
    <ITEMIZE>
      <ITEM label="callback">
        <SP>string: allows to set up the scilab instruction to call when the item is selected by the user.</SP>
      </ITEM>
      <ITEM label="label">
        <SP>string: allows to set up the text appearing for the item.</SP>
      </ITEM>
      <ITEM label="tag">
        <SP>string: this property is generally used to identify the menu. It allows to give it a &quot;name&quot;. Mainly used in conjontion with <LINK>findobj</LINK>.</SP>
      </ITEM>
    </ITEMIZE>
  </SECTION>
  <EXAMPLE>
<![CDATA[
f=figure('position', [10 10 300 200]);
// create a figure
m=uimenu(f,'label', 'windows');
// create an item on the menu bar
m1=uimenu(m,'label', 'operations');
m2=uimenu(m,'label', 'quit scilab', 'callback', "exit");
//create two items in the menu "windows"
m11=uimenu(m1,'label', 'new window', 'callback',"xselect()");
m12=uimenu(m1,'label', 'clear  window', 'callback',"xbasc()");
// create a submenu to the item "operations"
close(f);
// close the figure
 ]]>
  </EXAMPLE>
  <SEE_ALSO>
    <SEE_ALSO_ITEM>
      <LINK>figure</LINK>
    </SEE_ALSO_ITEM>
    <SEE_ALSO_ITEM>
      <LINK>uicontrol</LINK>
    </SEE_ALSO_ITEM>
    <SEE_ALSO_ITEM>
      <LINK>set</LINK>
    </SEE_ALSO_ITEM>
    <SEE_ALSO_ITEM>
      <LINK>get</LINK>
    </SEE_ALSO_ITEM>
  </SEE_ALSO>
  <AUTHOR>Bertrand Guiheneuf</AUTHOR>
</MAN>
