* Bugs 10353.1 16210 fixed [doc]: uicontrol.position .units 73/21173/3
Samuel GOUGEON [Sun, 15 Dec 2019 20:44:41 +0000 (21:44 +0100)]
  http://bugzilla.scilab.org/10353
  http://bugzilla.scilab.org/16210

  + .string, .value: Description improved for spinner

Change-Id: Ib344d326248237a24de7da8f8a337a822bb2445e

scilab/CHANGES.md
scilab/modules/gui/help/en_US/uicontrol_properties.xml
scilab/modules/gui/help/ja_JP/uicontrol_properties.xml

index 63bb1b4..749f5e4 100644 (file)
@@ -156,6 +156,7 @@ Bug Fixes
 * [#8784](http://bugzilla.scilab.org/show_bug.cgi?id=8784): Automatic self-adjusting blocks `SCALE_CSCOPE` & `SCALE_CMSCOPE` in Xcos.
 * [#5512](http://bugzilla.scilab.org/show_bug.cgi?id=5512): `disp()` puzzlingly displayed arguments in reverse order.
 * [#9673](http://bugzilla.scilab.org/show_bug.cgi?id=9673): Priority of colon `:` operator was too low
+* [#10353](http://bugzilla.scilab.org/show_bug.cgi?id=10353): The referential for the uicontrol.position property was not provided.
 * [#14498](http://bugzilla.scilab.org/show_bug.cgi?id=14498): `size([],3)` returned 1 instead of 0.
 * [#14557](http://bugzilla.scilab.org/show_bug.cgi?id=14557): `csim` failed when the system has no state.
 * [#14604](http://bugzilla.scilab.org/show_bug.cgi?id=14604): `emptystr()` is 40x slower with 6.0.0 wrt 5.5.2
index f68f07e..c5fe12c 100644 (file)
@@ -1,5 +1,8 @@
 <?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:ns4="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="uicontrol_properties" xml:lang="en">
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"
+          xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns4="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="uicontrol_properties" xml:lang="en">
     <refnamediv>
         <refname>uicontrol properties</refname>
         <refpurpose>Description of the uicontrol properties.</refpurpose>
@@ -33,7 +36,8 @@
                 <listitem>
                     <para>A Border object.</para>
                     <para>
-                        Only used for <literal>frame</literal> style uicontrols, this object is created using <link linkend="createBorder">createBorder</link>.
+                        Only used for <literal>frame</literal> style uicontrols, this object is
+                        created using <link linkend="createBorder">createBorder</link>.
                     </para>
                     <para>
                         Setting this value to <literal>[]</literal> removes the border of the frame.
                 <term>Callback</term>
                 <listitem>
                     <para>String</para>
-                    <para>Instruction evaluated by the Scilab interpreter when an uicontrol is activated (for example when you click on a button).</para>
                     <para>
-                        This property is not used for <literal>layer</literal>, <literal>frame</literal> and <literal>text</literal> style uicontrols.
+                        Instruction evaluated by the Scilab interpreter when an uicontrol
+                        is activated (for example when you click on a button).
+                    </para>
+                    <para>
+                        This property is not used for <literal>layer</literal>,
+                        <literal>frame</literal> and <literal>text</literal> style uicontrols.
                     </para>
                 </listitem>
             </varlistentry>
                     <para>A Constraints object.</para>
                     <para>
                         This object is created using <link linkend="createConstraints">createConstraints</link>
-                        and describes the constraints on the position and size of the uicontrol regarding to its parent.
+                        and describes the constraints on the position and size of the uicontrol
+                        regarding to its parent.
                     </para>
                     <para>
                         Setting this value to <literal>[]</literal> clears the constraints.
                 <listitem>
                     <para>{on} | off</para>
                     <para>
-                        Enable or disable the uicontrol. If this property is set to <literal>"on"</literal> (default), the uicontrol is operational,
-                        but if this property is set to <literal>"off"</literal>, the uicontrol will not respond to the mouse actions and will be grayed out.
+                        Enable or disable the uicontrol. If this property is set to
+                        <literal>"on"</literal> (default), the uicontrol is operational,
+                        but if this property is set to <literal>"off"</literal>, the uicontrol
+                        will not respond to the mouse actions and will be grayed out.
                     </para>
                 </listitem>
             </varlistentry>
                 <term>FontSize</term>
                 <listitem>
                     <para>Scalar</para>
-                    <para>For a control containing some text, this property sets the size of the font in FontUnits.
+                    <para>
+                        For a control containing some text, this property sets the size of the
+                        font in FontUnits.
                     </para>
                 </listitem>
             </varlistentry>
             <varlistentry>
                 <term>Position</term>
                 <listitem>
-                    <para>[1,4] real vector or string.</para>
-                    <para>This property is used to set or get the geometrical
-                        configuration of a control. It is a vector [x y w h] where the
-                        letters stand for the x location of the left bottom corner, the y
-                        location of the left bottom corner, the width and the height of the
-                        uicontrol or a character string where each value is separated by a
-                        "|", ie "x|y|w|h". The units are determined by the "Units"
-                        property.
+                    <para>
+                        [x y w h] numerical vector (as stored) or a "x|y|w|h" string.
+                    </para>
+                    <para>
+                        Sets or gets the position and size of the component, the referential being
+                        <itemizedlist>
+                          <listitem>
+                            .parent.axes_size, if .parent is a Figure
+                          </listitem>
+                          <listitem>
+                            .parent.position, if .parent is a uicontrol Frame.
+                          </listitem>
+                       </itemizedlist>
+                    </para>
+                    <para>
+                       The value is a vector [x y w h] where
+                       <itemizedlist>
+                          <listitem>
+                            x is the horizontal position of the left side of the component with
+                            respect to the left edge of the referential.
+                          </listitem>
+                          <listitem>
+                            y is the vertical position of the bottom side of the component with
+                            respect to the bottom edge of the referential.
+                          </listitem>
+                          <listitem>
+                            w and h are the width and height of the uicontrol component.
+                          </listitem>
+                       </itemizedlist>
+                       x, y, w, h can as well be set through a "x|y|w|h" single string with "|"
+                       used as separator.
+                    </para>
+                    <para>
+                        The unit is set by the .Units property.
+                    </para>
+                    <para>
+                        For sliders: w > h sets the slider horizontally, and vertically otherwise.
                     </para>
-                    <para>The width and height values determine the orientation of sliders. If width is greater than height, then the slider is oriented horizontally, otherwise the slider is oriented vertically.</para>
                 </listitem>
             </varlistentry>
             <varlistentry>
                 <listitem>
                     <para>{default} | flat | groove | raised | ridge | solid | sunken</para>
                     <para>
-                        Appearance of the border of the uicontrol. <literal>"default"</literal> means that the application look and feel will be used to set the relief.
+                        Appearance of the border of the uicontrol. <literal>"default"</literal>
+                        means that the application look and feel will be used to set the relief.
                     </para>
-                    <para>When using the deprecated skin for uicontrols, default values are related to uicontrol style:</para>
+                    <para>
+                      When using the deprecated skin for uicontrols, default values are related
+                      to uicontrol style:</para>
                     <itemizedlist>
                         <listitem>
                             <para>
                     <para>String.</para>
                     <para>
                         This property represents the text appearing in a uicontrol
-                        (Except for Frame and Slider styles). For tables, the value is a string matrix. For ListBoxes and PopupMenus,
+                        (Except for Frame, Slider, and Spinner styles).
+                        For tables, the value is a string matrix. For ListBoxes and PopupMenus,
                         the value can be a vector of string or a string where the items are
                         separated by a "|". For Text uicontrols, this string can contain HTML code to format the text.
                     </para>
                         </listitem>
                         <listitem>
                             <para>
-                                For <literal>table</literal> uicontrols, the value specifies the whole table data: <literal>[IGNORED COL1-HEADER...COLN-HEADER;ROW1-HEADER, ROW1COL1-DATA, ROW1COLN-DATA;...;ROWM-HEADER, ROWMCOL1-DATA, ROWMCOLN-DATA]</literal>.
+                                For <literal>table</literal> uicontrols, the value specifies the
+                                ole table data: <literal>[IGNORED COL1-HEADER...COLN-HEADER;ROW1-HEADER, ROW1COL1-DATA, ROW1COLN-DATA;...;ROWM-HEADER, ROWMCOL1-DATA, ROWMCOLN-DATA]</literal>.
                             </para>
                         </listitem>
                         <listitem>
                             </para>
                         </listitem>
                     </itemizedlist>
-                    
+
                 </listitem>
             </varlistentry>
             <varlistentry>
                     <para>Boolean</para>
                     <para>
                         Indicates whether the tabs of a <literal>tab</literal> style uicontrol
-                        must be wrapped (<literal>title_scroll=%F</literal>) or scrolled (<literal>title_scroll=%T</literal>).
+                        must be wrapped (<literal>title_scroll=%F</literal>) or scrolled
+                        (<literal>title_scroll=%T</literal>).
                     </para>
                 </listitem>
             </varlistentry>
                 <listitem>
                     <para>String or String vector</para>
                     <para>
-                        This property represents the text of the uicontrol tooltip appearing when the mouse is over the uicontrol.
+                        This property represents the text of the uicontrol tooltip appearing
+                        when the mouse is over the uicontrol.
                     </para>
                 </listitem>
             </varlistentry>
                 <term>Units</term>
                 <listitem>
                     <para>{points} | pixels | normalized</para>
-                    <para>Set the units used to specify the "Position" property.</para>
+                    <para>Set the units used to specify the "Position" property. Normalized
+                         positions and sizes are in [0, 1]:
+                         <itemizedlist>
+                             <listitem>
+                               If .parent is a "figure", they are within and refer to the
+                               .parent.axes_size area.
+                             </listitem>
+                             <listitem>
+                               If .parent is an uicontrol of style "frame", they are within and
+                               refer to the .parent.position area.
+                             </listitem>
+                         </itemizedlist>
+                    </para>
                 </listitem>
             </varlistentry>
             <varlistentry>
                     <itemizedlist>
                         <listitem>
                             <para>
-                                <literal>checkbox</literal> and <literal>radiobutton</literal> uicontrols: value is set to Max (see above)
-                                when on and Min when off.
+                                <literal>checkbox</literal> and <literal>radiobutton</literal>
+                                uicontrols: value is set to Max (see above) when on and Min when off.
                             </para>
                         </listitem>
                         <listitem>
                             <para>
-                                <literal>listbox</literal> and <literal>popupmenu</literal> uicontrols: value is a vector of indexes
-                                corresponding to the indexes of the selected entries in the list. 1 is the first item of the list.
+                                <literal>listbox</literal> and <literal>popupmenu</literal>
+                                uicontrols: value is a vector of indexes corresponding to the indexes
+                                of the selected entries in the list. 1 is the first item of the list.
                             </para>
                         </listitem>
                         <listitem>
                             <para>
-                                <literal>slider</literal> and <literal>spinner</literal> uicontrols: value indicated by the component.
+                                <literal>slider</literal> and <literal>spinner</literal> uicontrols:
+                                numerical value indicated by the component.
                             </para>
                         </listitem>
                         <listitem>
                             <para>
-                                <literal>layer</literal> and <literal>tab</literal> uicontrols: index of displayed component.
+                                <literal>layer</literal> and <literal>tab</literal> uicontrols:
+                                index of displayed component.
                             </para>
                         </listitem>
                         <listitem>
                             <para>
-                                <literal>image</literal> uicontrols: value is used to set some image properties <literal>[X-Scale Y-Scale X-Shear Y-Shear RotationAngle]</literal>
+                                <literal>image</literal> uicontrols: value is used to set some
+                                image properties <literal>[X-Scale Y-Scale X-Shear Y-Shear RotationAngle]</literal>
                             </para>
                         </listitem>
                     </itemizedlist>
@@ -664,13 +728,16 @@ counter_main_fig.visible = "on";
         <title>See also</title>
         <simplelist type="inline">
             <member>
-                <link linkend="set">set</link>
+                <link linkend="uicontrol">uicontrol</link>
             </member>
             <member>
-                <link linkend="get">get</link>
+                <link linkend="console_properties">hidden handles / properties</link>
             </member>
             <member>
-                <link linkend="uicontrol">uicontrol</link>
+                <link linkend="set">set</link>
+            </member>
+            <member>
+                <link linkend="get">get</link>
             </member>
         </simplelist>
     </refsection>
@@ -678,14 +745,6 @@ counter_main_fig.visible = "on";
         <title>History</title>
         <revhistory>
             <revision>
-                <revnumber>6.0.0</revnumber>
-                <revremark>
-                    <para>
-                        By default, callback_type property is now interruptible but non prioritary.
-                    </para>
-                </revremark>
-            </revision>
-            <revision>
                 <revnumber>5.5.0</revnumber>
                 <revremark>
                     <para>
@@ -706,6 +765,12 @@ counter_main_fig.visible = "on";
                     </itemizedlist>
                 </revremark>
             </revision>
+            <revision>
+                <revnumber>6.0.0</revnumber>
+                <revremark>
+                    By default, callback_type property is now interruptible but non prioritary.
+                </revremark>
+            </revision>
         </revhistory>
     </refsection>
 </refentry>
index 2781d64..77332d5 100644 (file)
@@ -1,5 +1,8 @@
 <?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:ns4="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="uicontrol_properties" xml:lang="ja">
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"
+          xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns4="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="uicontrol_properties" xml:lang="ja">
     <refnamediv>
         <refname>uicontrolプロパティ</refname>
         <refpurpose>uicontrolプロパティの説明.</refpurpose>
             <varlistentry>
                 <term>Position</term>
                 <listitem>
-                    <para>[1,4] 実数ベクトルまたは文字列.</para>
                     <para>
-                        このプロパティは,
-                        コントロールの形状を設定または取得する際に使用されます.
-                        このプロパティはベクトル [x y w h]です.
-                        ただし,各文字は左上隅のx位置,左上隅のy位置,
-                        uicontrolの幅および高さを表します.
-                        "x|y|w|h"のように
-                        各文字を"|"で区切った文字列で表すこともできます.
-                        単位は,"Units"プロパティで定義されます.
+                        [x y w h] numerical vector (as stored) or a "x|y|w|h" string.
+                    </para>
+                    <para>
+                        Sets or gets the position and size of the component, the referential being
+                        <itemizedlist>
+                          <listitem>
+                            .parent.axes_size, if .parent is a Figure
+                          </listitem>
+                          <listitem>
+                            .parent.position, if .parent is a uicontrol Frame.
+                          </listitem>
+                       </itemizedlist>
+                    </para>
+                    <para>
+                       The value is a vector [x y w h] where
+                       <itemizedlist>
+                          <listitem>
+                            x is the horizontal position of the left side of the component with
+                            respect to the left edge of the referential.
+                          </listitem>
+                          <listitem>
+                            y is the vertical position of the bottom side of the component with
+                            respect to the bottom edge of the referential.
+                          </listitem>
+                          <listitem>
+                            w and h are the width and height of the uicontrol component.
+                          </listitem>
+                       </itemizedlist>
+                       x, y, w, h can also be set through a "x|y|w|h" single string, with "|"
+                       used as separator.
+                    </para>
+                    <para>
+                        The unit is set by the .Units property.
                     </para>
                     <para>
-                        幅と高さはスライダの向きを定義します.
-                        幅が高さよりも大きい場合,スライダは水平の向きとなり,
-                        それ以外の場合は垂直に配置されます.
+                        For sliders: w > h sets the slider horizontally, and vertically otherwise.
                     </para>
                 </listitem>
             </varlistentry>
                 <listitem>
                     <para>文字列.</para>
                     <para>
-                        このプロパティは(FrameおよびSliderスタイルを除く)
+                        このプロパティは(Except for Frame, Slider, and Spinner styles)
                         uicontrolに表示されるテキストを表します.
                         表の場合,この値は文字列の行列です.
                         ListBoxesおよびPopupMenusの場合,
                 <term>Units</term>
                 <listitem>
                     <para>{points} | pixels | normalized</para>
-                    <para>"Position"プロパティを指定するために使用される単位を設定します.</para>
+                    <para>"Position"プロパティを指定するために使用される単位を設定します.
+                         Normalized positions and sizes are in [0, 1]:
+                         <itemizedlist>
+                             <listitem>
+                               If .parent is a "figure", they are within and refer to the
+                               .parent.axes_size area.
+                             </listitem>
+                             <listitem>
+                               If .parent is an uicontrol of style "frame", they are within and
+                               refer to the .parent.position area.
+                             </listitem>
+                         </itemizedlist>
+                    </para>
                 </listitem>
             </varlistentry>
             <varlistentry>
                         <listitem>
                             <para>
                                 <literal>slider</literal> および
-                                <literal>spinner</literal> uicontrols:
-                                要素により指定された値.
+                                <literal>spinner</literal> uicontrols: コンポーネントによって表示される数値。
                             </para>
                         </listitem>
                         <listitem>
@@ -748,13 +784,16 @@ counter_main_fig.visible = "on";
         <title>参照</title>
         <simplelist type="inline">
             <member>
-                <link linkend="set">set</link>
+                <link linkend="uicontrol">uicontrol</link>
             </member>
             <member>
-                <link linkend="get">get</link>
+                <link linkend="console_properties">hidden handles / properties</link>
             </member>
             <member>
-                <link linkend="uicontrol">uicontrol</link>
+                <link linkend="set">set</link>
+            </member>
+            <member>
+                <link linkend="get">get</link>
             </member>
         </simplelist>
     </refsection>
@@ -762,14 +801,6 @@ counter_main_fig.visible = "on";
         <title>履歴</title>
         <revhistory>
             <revision>
-                <revnumber>6.0.0</revnumber>
-                <revremark>
-                    <para>
-                        By default, callback_type property is now interruptible but non prioritary.
-                    </para>
-                </revremark>
-            </revision>
-            <revision>
                 <revnumber>5.5.0</revnumber>
                 <revremark>
                     <para>
@@ -796,6 +827,12 @@ counter_main_fig.visible = "on";
                     </itemizedlist>
                 </revremark>
             </revision>
+            <revision>
+                <revnumber>6.0.0</revnumber>
+                <revremark>
+                    By default, callback_type property is now interruptible but non prioritary.
+                </revremark>
+            </revision>
         </revhistory>
     </refsection>
 </refentry>