1 <?xml version="1.0" encoding="UTF-8"?>
3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
5 * Copyright (C) 2012 - 2016 - Scilab Enterprises
6 * Copyright (C) 2019 - Samuel GOUGEON
8 * This file is hereby licensed under the terms of the GNU GPL v2.0,
9 * pursuant to article 5.3.4 of the CeCILL v.2.1.
10 * This file was originally licensed under the terms of the CeCILL v2.1,
11 * and continues to be available under such terms.
12 * For more information, see the COPYING file which you should have received
13 * along with this program.
16 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"
17 xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns3="http://www.w3.org/1999/xhtml"
18 xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook"
19 xmlns:scilab="http://www.scilab.org" xml:id="uimenu_properties" xml:lang="en">
21 <refname>uimenu properties</refname>
22 <refpurpose>Description of uimenu properties.</refpurpose>
25 <title>Description</title>
26 <para>This page lists all available properties for menus in Scilab GUI.</para>
28 These properties can be set at creation through the <link linkend="uimenu">uimenu</link>
29 function, or at any time later with the <literal>handle.property = value</literal>
33 Several properties can also be changed in the same time using the
34 <link linkend="set">set</link>(handle, "propName1",propValue1, "propName2",propValue2, ..)
39 <title>Properties</title>
46 Instruction evaluated by the Scilab interpreter when the menu is activated.
47 Under MacOSX, the callback will not be executed for a "button menu"
48 (a menu without children), you must specify at least a child.
51 If any, every occurence of the "[SCILAB_FIGURE_ID]" substring is replaced
52 in the callback string with the figure_id value of the parent figure,
58 <term>Callback_Type</term>
61 Scalar. Integer code setting the way the callback string must be interpreted
62 to perform the action:
67 <td>callback disabled.</td>
72 (default) non prioritary (or interruptible) Scilab instructions.
73 Example: .callback = "help(""uimenu"")"
78 <td>Fortran function</td>
82 <td>non prioritary (or interruptible) Scilab function.</td>
87 Java reference. Example:
88 .callback = "org.scilab.modules.gui.editor.EditorManager.start([SCILAB_FIGURE_ID])"
93 <td>prioritary (or non-interruptible) Scilab instructions.</td>
97 <td>prioritary (or non-interruptible) Scilab function</td>
106 <para>on | {off}</para>
108 Item check indicator. Setting this property to "on" the first time displays
109 a checkbox in head of the item's label, and then checks it. Setting "off"
110 keeps the checkbox and unchecks it. This property can be used to display
111 items indicating the state of particular options.
116 There is no way to remove the checkbox after its creation, but
117 deleting the item.</listitem><listitem>By default, no interactive
118 checking or unchecking is possible. Such interactions can be
119 implemented through the Callback property.
122 This property is ignored for parent menus.
129 <term>Children</term>
131 <para>vector of handles</para>
133 If the current uimenu item is a menu listing subitems, their handles are
134 gathered in this Children property. All of them should be of type "uimenu".
135 Otherwise, .Children is the empty matrix [].
142 <para>{on} | off</para>
143 <para>Enable or disable the menu. If this property is set to
144 <literal>"on"</literal> (default), the menu is operational, but if
145 this property is set to <literal>"off"</literal>, the menu will not
146 respond to the mouse actions and will be grayed out.
151 <term>ForegroundColor</term>
153 <para>[1,3] real vector or string</para>
155 Foreground color of the uimenu (font color). A color is specified as Red,
156 Green and Blue values. Those values are real in [0,1]. The color can be
157 given as a real vector, ie [R,G,B] or a string where each value is
158 separated by a "|", ie "R|G|B".
163 <term>Handle_visible</term>
165 <para>on | {off}</para>
167 Setting it to "on" forces the uimenu handle to be visible in the list of
168 its parent children, even if get(0).showhiddenhandles == "off".
171 Setting it to "off" does NOT force it to be hidden:
172 get(0).showhiddenhandles == "on" is stronger.
181 This property represents the relative
182 (to <link linkend="pwd">Scilab working directory</link>) or absolute path
183 of the image file to be used as icon for the menu.
192 This property represents the text appearing in the menu.
193 If the text is enclosed between two $ (dollar sign), then it will be
194 considered as a LaTeX expression. If it is enclosed between < and >,
195 it will be considered as a MathML one.
198 If the text value starts with <literal><html></literal>, then
199 all HTML-4 tags used in the label afterward are interpreted.
200 This allows for instance to use HTML styling tags like <b>..</>
201 for bold, <span color="red">..</span> to use a red font, etc.
210 This property is generally used to identify the menu. It allows to give
211 it a "name". Mainly used in conjunction with <literal>findobj()</literal>.
216 <term>User_data</term>
218 <para>Any type of data</para>
220 This property can be used to store any scilab user or application data.
221 In order to be easily extensible and portable, using a structure with
222 fields is advised. [] is set by default.
229 <para>{on} | off</para>
231 Set the visibility of the uimenu. If this property is set to
232 <literal>"on"</literal> (default), the uimenu is visible, but if this
233 property is set to <literal>"off"</literal>, the uimenu will not appear
234 in its parent figure.
240 <refsection role="see also">
241 <title>See also</title>
242 <simplelist type="inline">
244 <link linkend="uimenu">uimenu</link>
247 <link linkend="uicontextmenu">uicontextmenu</link>
250 <link linkend="uicontrol">uicontrol</link>
253 <link linkend="console_properties">showHiddenHandles</link>
256 <link linkend="set">set</link>
259 <link linkend="math_rendering_features_in_graphic">LaTeX and MathML</link>
264 <title>History</title>
267 <revnumber>5.4.0</revnumber>
269 <literal>Handle_visible</literal> property added.
273 <revnumber>5.5.0</revnumber>
275 <literal>Icon</literal> property added.