96aaf1ef69fd90984d76183dbbd62f52b3716181
[scilab.git] / scilab / modules / gui / help / en_US / menus / uimenu_properties.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns3="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="uimenu_properties" xml:lang="en">
3     <refnamediv>
4         <refname>uimenu properties</refname>
5         <refpurpose>Description of uimenu properties.</refpurpose>
6     </refnamediv>
7     <refsection>
8         <title>Description</title>
9         <para>This page lists all available properties for menus in Scilab GUI.</para>
10         <para>
11             These properties can be set at creation through <link linkend="uimenu">uimenu</link> function.
12         </para>
13         <para>
14             Their value can also be changed using the <link linkend="set">set</link> function and read using the <link linkend="get">get</link> function.
15         </para>
16     </refsection>
17     <refsection>
18         <title>Properties</title>
19         <variablelist>
20             <varlistentry>
21                 <term>Callback</term>
22                 <listitem>
23                     <para>String</para>
24                     <para>Instruction evaluated by the Scilab interpreter when the menu
25                         is activated. Under MacOSX, the callback will not be executed for a "button menu" (a menu without children), you must specify at least a child.
26                     </para>
27                 </listitem>
28             </varlistentry>
29             <varlistentry>
30                 <term>Enable</term>
31                 <listitem>
32                     <para>{on} | off</para>
33                     <para>Enable or disable the menu. If this property is set to
34                         <literal>"on"</literal> (default), the menu is operational, but if
35                         this property is set to <literal>"off"</literal>, the menu will not
36                         respond to the mouse actions and will be grayed out.
37                     </para>
38                 </listitem>
39             </varlistentry>
40             <varlistentry>
41                 <term>Checked</term>
42                 <listitem>
43                     <para>on | {off}</para>
44                     <para>Item check indicator. Setting this property to "on" the first time displays a checkbox in head of the item's label, and then checks it. Setting "off" keeps the checkbox and unchecks it. This property can be used to display items indicating the state of particular options.</para>
45                     <para>Remarks:
46                         <itemizedlist>
47                             <listitem>There is no way to remove the checkbox after its creation, but deleting the item.</listitem><listitem>By default, no interactive checking or unchecking is possible. Such interactions can be implemented through the Callback property.</listitem><listitem>This property is ignored for parent menus.</listitem>
48                         </itemizedlist>
49                     </para>
50                 </listitem>
51             </varlistentry>
52             <varlistentry>
53                 <term>ForegroundColor</term>
54                 <listitem>
55                     <para>[1,3] real vector or string</para>
56                     <para>Foreground color of the uimenu (font color). A color is specified as
57                         Red, Green and Blue values. Those values are real in [0,1]. The
58                         color can be given as a real vector, ie [R,G,B] or a string where
59                         each value is separated by a "|", ie "R|G|B".
60                     </para>
61                 </listitem>
62             </varlistentry>
63             <varlistentry>
64                 <term>Icon</term>
65                 <listitem>
66                     <para>String.</para>
67                     <para>
68                         This property represents the relative (to <link linkend="pwd">Scilab working directory</link>) or absolute path of the image file to be used as icon for the menu.
69                     </para>
70                 </listitem>
71             </varlistentry>
72             <varlistentry>
73                 <term>Label</term>
74                 <listitem>
75                     <para>String.</para>
76                     <para>This property represents the text appearing in the
77                         menu. If the text is enclosed between two $ (dollar sign), then it will be
78                         considered as a LaTeX expression, and if it is enclosed between &lt; and &gt;, it will be considered
79                         as a MathML one.
80                     </para>
81                 </listitem>
82             </varlistentry>
83             <varlistentry>
84                 <term>Tag</term>
85                 <listitem>
86                     <para>String</para>
87                     <para>This property is generally used to identify the menu. It
88                         allows to give it a "name". Mainly used in conjunction with
89                         <literal>findobj()</literal>.
90                     </para>
91                 </listitem>
92             </varlistentry>
93             <varlistentry>
94                 <term>Visible</term>
95                 <listitem>
96                     <para>{on} | off</para>
97                     <para>
98                         Set the visibility of the uimenu. If this property is set to <literal>"on"</literal> (default), the uimenu is visible,
99                         but if this property is set to <literal>"off"</literal>, the uimenu will not appear in its parent figure.
100                     </para>
101                 </listitem>
102             </varlistentry>
103         </variablelist>
104     </refsection>
105     <refsection role="see also">
106         <title>See also</title>
107         <simplelist type="inline">
108             <member>
109                 <link linkend="uimenu">uicontextmenu</link>
110             </member>
111             <member>
112                 <link linkend="set">set</link>
113             </member>
114             <member>
115                 <link linkend="get">get</link>
116             </member>
117             <member>
118                 <link linkend="math_rendering_features_in_graphic">LaTeX and MathML</link>
119             </member>
120         </simplelist>
121     </refsection>
122     <refsection>
123         <title>History</title>
124         <revhistory>
125             <revision>
126                 <revnumber>5.5.0</revnumber>
127                 <revremark>
128                     <literal>Icon</literal> property added.
129                 </revremark>
130             </revision>
131         </revhistory>
132     </refsection>
133 </refentry>