uimenu help + save update: 40/13940/4
Vincent COUVERT [Thu, 6 Mar 2014 15:02:48 +0000 (16:02 +0100)]
 - Icon property added in help & save/load
 - Help page dedicated to properties created

Change-Id: Ie56bf0e8ed81b0d1db476551eeae974c1e3a837b

scilab/modules/graphics/macros/%h_p.sci
scilab/modules/gui/help/en_US/uimenu.xml
scilab/modules/gui/help/en_US/uimenu_properties.xml [new file with mode: 0644]
scilab/modules/io/macros/%_save.sci

index 5b5bca8..068b491 100755 (executable)
@@ -924,11 +924,11 @@ function %h_p(h)
             "Foregroundcolor = "+sci2exp(h.foregroundcolor,0)
             "Label = "+h.label
             "Handle_Visible = "+sci2exp(h.handle_visible)
-            //"Position = "+sci2exp(h.position,0)
             "Visible = "+sci2exp(h.visible)
             "Callback = "+h.callback
             "Callback_Type = "+sci2exp(h.callback_type,0)
             "Checked =  "+sci2exp(h.checked)
+            "Icon =  "+sci2exp(h.icon)
             "Userdata = "+fmtuser_data(u)
             "Tag = "+h.tag
             ]
index 5463131..49478c9 100644 (file)
             <varlistentry>
                 <term>parent</term>
                 <listitem>
-                    <para>integer Handle of menu's parent</para>
+                    <para>Handle</para>
+                    <para>Handle of the parent of the menu.</para>
                 </listitem>
             </varlistentry>
             <varlistentry>
                 <term>prop{1, 2 ...}</term>
                 <listitem>
-                    <para>string character name of a property to set up</para>
+                    <para>String</para>
+                    <para>Name of a property to set up.</para>
+                    <para>
+                        All available properties are listed on the <link linkend="uimenu_properties">uimenu properties</link> help page.
+                    </para>
                 </listitem>
             </varlistentry>
             <varlistentry>
                 <term>val{1, 2 ...}</term>
                 <listitem>
-                    <para>scilab object value to affect to the corresponding
-                        property
-                    </para>
+                    <para>Scilab object</para>
+                    <para>Value to affect to the corresponding property.</para>
                 </listitem>
             </varlistentry>
             <varlistentry>
                 <term>h</term>
                 <listitem>
-                    <para>integer handle of the corresponding menu</para>
+                    <para>Handle</para>
+                    <para>Handle of the created menu.</para>
                 </listitem>
             </varlistentry>
         </variablelist>
     </refsection>
     <refsection>
         <title>Description</title>
-        <para>This allows to create menus in a figure. If
+        <para>This function allows to create menus in a figure. If
             <literal>parent</literal> is a figure, then the menu item will be added to
             the menu bar of the figure. If <literal>parent</literal> 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:
+            cascaded menus.
         </para>
     </refsection>
     <refsection>
-        <title>Properties</title>
-        <variablelist>
-            <varlistentry>
-                <term>Callback</term>
-                <listitem>
-                    <para>String</para>
-                    <para>Instruction evaluated by the Scilab interpreter when the menu
-                        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.
-                    </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>Enable</term>
-                <listitem>
-                    <para>{on} | off</para>
-                    <para>Enable or disable the menu. If this property is set to
-                        <literal>"on"</literal> (default), the menu is operational, but if
-                        this property is set to <literal>"off"</literal>, the menu will not
-                        respond to the mouse actions and will be grayed out.
-                    </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>Checked</term>
-                <listitem>
-                    <para>on | {off}</para>
-                    <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>
-                    <para>Remarks:
-                        <itemizedlist>
-                            <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>
-                        </itemizedlist>
-                    </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>ForegroundColor</term>
-                <listitem>
-                    <para>[1,3] real vector or string</para>
-                    <para>Foreground color of the uimenu (font color). A color is specified as
-                        Red, Green and Blue values. Those values are real in [0,1]. The
-                        color can be given as a real vector, ie [R,G,B] or a string where
-                        each value is separated by a "|", ie "R|G|B".
-                    </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>Label</term>
-                <listitem>
-                    <para>String.</para>
-                    <para>This property represents the text appearing in the
-                        menu. If the text is enclosed between two $ (dollar sign), then it will be 
-                        considered as a LaTeX expression, and if it is enclosed between &lt; and &gt;, it will be considered
-                        as a MathML one.
-                    </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>Tag</term>
-                <listitem>
-                    <para>String</para>
-                    <para>This property is generally used to identify the menu. It
-                        allows to give it a "name". Mainly used in conjunction with
-                        <literal>findobj()</literal>.
-                    </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>Visible</term>
-                <listitem>
-                    <para>{on} | off</para>
-                    <para>
-                        Set the visibility of the uimenu. If this property is set to <literal>"on"</literal> (default), the uimenu is visible, 
-                        but if this property is set to <literal>"off"</literal>, the uimenu will not appear in its parent figure.
-                    </para>
-                </listitem>
-            </varlistentry>
-        </variablelist>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 f=figure('position', [10 10 300 200]);
@@ -163,6 +88,9 @@ mm2=uimenu(mmathml,'label', '<mrow><msup><mn>a</mn><mi>2</mi></msup><mo>+</mo><m
         <title>See Also</title>
         <simplelist type="inline">
             <member>
+                <link linkend="uimenu_properties">uimenu properties</link>
+            </member>
+            <member>
                 <link linkend="figure">figure</link>
             </member>
             <member>
diff --git a/scilab/modules/gui/help/en_US/uimenu_properties.xml b/scilab/modules/gui/help/en_US/uimenu_properties.xml
new file mode 100644 (file)
index 0000000..75fe64c
--- /dev/null
@@ -0,0 +1,133 @@
+<?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: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">
+    <refnamediv>
+        <refname>uimenu properties</refname>
+        <refpurpose>Description of uimenu properties.</refpurpose>
+    </refnamediv>
+    <refsection>
+        <title>Description</title>
+        <para>This page lists all available propeties for menus in Scilab GUI.</para>
+        <para>
+            These properties can be set at creation through <link linkend="uimenu">uimenu</link> function.
+        </para>
+        <para>
+            Their value can also be changed using the <link linkend="set">set</link> function and read using the <link linkend="get">get</link> function.
+        </para>
+    </refsection>
+    <refsection>
+        <title>Properties</title>
+        <variablelist>
+            <varlistentry>
+                <term>Callback</term>
+                <listitem>
+                    <para>String</para>
+                    <para>Instruction evaluated by the Scilab interpreter when the menu
+                        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.
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>Enable</term>
+                <listitem>
+                    <para>{on} | off</para>
+                    <para>Enable or disable the menu. If this property is set to
+                        <literal>"on"</literal> (default), the menu is operational, but if
+                        this property is set to <literal>"off"</literal>, the menu will not
+                        respond to the mouse actions and will be grayed out.
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>Checked</term>
+                <listitem>
+                    <para>on | {off}</para>
+                    <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>
+                    <para>Remarks:
+                        <itemizedlist>
+                            <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>
+                        </itemizedlist>
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>ForegroundColor</term>
+                <listitem>
+                    <para>[1,3] real vector or string</para>
+                    <para>Foreground color of the uimenu (font color). A color is specified as
+                        Red, Green and Blue values. Those values are real in [0,1]. The
+                        color can be given as a real vector, ie [R,G,B] or a string where
+                        each value is separated by a "|", ie "R|G|B".
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>Icon</term>
+                <listitem>
+                    <para>String.</para>
+                    <para>
+                        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.
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>Label</term>
+                <listitem>
+                    <para>String.</para>
+                    <para>This property represents the text appearing in the
+                        menu. If the text is enclosed between two $ (dollar sign), then it will be 
+                        considered as a LaTeX expression, and if it is enclosed between &lt; and &gt;, it will be considered
+                        as a MathML one.
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>Tag</term>
+                <listitem>
+                    <para>String</para>
+                    <para>This property is generally used to identify the menu. It
+                        allows to give it a "name". Mainly used in conjunction with
+                        <literal>findobj()</literal>.
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>Visible</term>
+                <listitem>
+                    <para>{on} | off</para>
+                    <para>
+                        Set the visibility of the uimenu. If this property is set to <literal>"on"</literal> (default), the uimenu is visible, 
+                        but if this property is set to <literal>"off"</literal>, the uimenu will not appear in its parent figure.
+                    </para>
+                </listitem>
+            </varlistentry>
+        </variablelist>
+    </refsection>
+    <refsection role="see also">
+        <title>See Also</title>
+        <simplelist type="inline">
+            <member>
+                <link linkend="uimenu">uicontextmenu</link>
+            </member>
+            <member>
+                <link linkend="set">set</link>
+            </member>
+            <member>
+                <link linkend="get">get</link>
+            </member>
+            <member>
+                <link linkend="math_rendering_features_in_graphic">LaTeX and MathML</link>
+            </member>
+        </simplelist>
+    </refsection>
+    <refsection>
+        <title>History</title>
+        <revhistory>
+            <revision>
+                <revnumber>5.5.0</revnumber>
+                <revremark>
+                    <literal>Icon</literal> property added.
+                </revremark>
+            </revision>
+        </revhistory>
+    </refsection>
+</refentry>
index 5c72e2e..76acc22 100644 (file)
@@ -806,7 +806,8 @@ function [] = %_save(%__filename__, varargin)
         "callback_type", ...
         "tag", ...
         "checked", ...
-        "children", ..
+        "children", ...
+        "icon", ...
         "user_data"]);
 
         fields = fieldnames(returneduimenu);