xget/xset: deprecated, help updated 07/19107/6
Samuel GOUGEON [Mon, 13 Feb 2017 23:59:35 +0000 (00:59 +0100)]
 * fix http://bugzilla.scilab.org/show_bug.cgi?id=5278
 * Beside "fpf", this is the last step for removing xget() and xset()
   from Scilab.

Change-Id: I4e8d27c3241966d2362403ec0466d943d3866882

scilab/CHANGES.md
scilab/modules/graphics/help/en_US/xget.xml
scilab/modules/graphics/help/ja_JP/xget.xml
scilab/modules/graphics/help/pt_BR/xget.xml
scilab/modules/graphics/sci_gateway/cpp/sci_xget.cpp
scilab/modules/graphics/sci_gateway/cpp/sci_xset.cpp
scilab/modules/graphics/tests/unit_tests/xset_xget.tst

index b7c1ad6..f7089c6 100644 (file)
@@ -216,7 +216,7 @@ Help pages:
 
 * fixed / improved:  `members`, `part`, `ode`, `ode_optional_output`, `ode_roots`, `plot2d`, `roots`,
   `printf`, `sprintf`, `iconvert`, `stdev`, `xlabel`, `and_op`, `or_op`, `permute`, `tree2code`, `%helps`,
-  `scilab|scilex`, `flipdim`, `Matplot_properties`, `meshgrid`, `ismatrix`
+  `scilab|scilex`, `flipdim`, `Matplot_properties`, `meshgrid`, `ismatrix`, `xget`, `xset`
 * rewritten: `consolebox`, `double`, `isoview`, `pixel_drawing_mode`, `householder`, `or`, `|,||`,
 `and`, `&,&&`, `format`, `typeof`, `brackets`, `setlanguage`, `sleep`, `isinf`,
 `bitor`, `bitxor`, `bitand`, `macr2tree`, `geomean`, `clf`, `getPreferencesValue`
@@ -343,6 +343,7 @@ the [development mailing list](dev@lists.scilab.org) for a particular toolbox.
 
 
 ### Bugs fixed in 6.0.1:
+* [#5278](http://bugzilla.scilab.org/show_bug.cgi?id=5278): obsolete `xset()` was still used in scripts, macros, tests and help pages.
 * [#14636](http://bugzilla.scilab.org/show_bug.cgi?id=14636): Xcos model with modelica electrical blocks (created in 5.5.2) crashed Scilab 6.
 * [#14637](http://bugzilla.scilab.org/show_bug.cgi?id=14367): Some Scilab 5.5.2 diagrams didn't simulate properly in Xcos.
 * [#14978](http://bugzilla.scilab.org/show_bug.cgi?id=15006): ode help page still contained 'root' which has been replaced by 'roots'.
index 1589b86..720694d 100644 (file)
@@ -2,6 +2,7 @@
 <!--
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) ENPC - Jean-Philippe Chancelier
+ * Copyright (C) 2017 - Samuel GOUGEON
  *
  * Copyright (C) 2012 - 2016 - Scilab Enterprises
  *
  * along with this program.
  *
  -->
-<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="xget" 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: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="xget" xml:lang="en">
     <refnamediv>
         <refname>xget</refname>
         <refpurpose>
-            get current values of the graphics context. <emphasis role="bold">This function is obsolete.</emphasis>
+            gets current values of the graphics context. <emphasis role="bold">This function is obsolete.</emphasis>
         </refpurpose>
     </refnamediv>
     <refsynopsisdiv>
         <title>Syntax</title>
         <synopsis>
-            [x1] = xget(str,[flag])
-            xget()
+            value = xget(query)
         </synopsis>
     </refsynopsisdiv>
     <refsection>
-        <title>Arguments</title>
-        <variablelist>
-            <varlistentry>
-                <term>str</term>
-                <listitem>
-                    <para>string.</para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>flag</term>
-                <listitem>
-                    <para>optional. Set to 1 gives a verbose mode.</para>
-                </listitem>
-            </varlistentry>
-        </variablelist>
-    </refsection>
-    <refsection>
         <title>Description</title>
+        <warning>
+            <emphasis role="bold">This function is obsolete</emphasis>. Use the
+            <link linkend="graphics_entities">graphics properties</link> of objects instead.
+        </warning>
         <para>
-            <warning>
-                This function is obsolete.
-            </warning>
-            Use the Scilab graphic objects representation instead (see the <link
-            linkend="set">set</link> and <link linkend="get">get</link>
-            functions as well as the <link linkend="graphics_entities">graphics
-                entities
-            </link>
-            help page).
-        </para>
-        <para>
-            This function is used to get values from the graphics context on the
-            topic specified by the string <varname>str</varname>. When called
-            with no argument, a choice menu is created showing the current
-            values and changes can be performed through toggle buttons.
+            This function is used to get values from the graphics context on the topic specified
+            by the string <varname>query</varname>.
         </para>
         <variablelist>
             <varlistentry>
-                <term>str = xget("auto clear")</term>
-                <listitem>
-                    <para>
-                        Get the auto clear status (<literal>"on"</literal> or
-                        <literal>"off"</literal>).
-                    </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>color = xget("background")</term>
-                <listitem>
-                    <para>
-                        Get the background color of the current
-                        <literal>Axes</literal> object. The result is a colormap
-                        index corresponding to the color.
-                    </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>rect = xget("clipping")</term>
-                <listitem>
-                    <para>
-                        Get the clipping zone as a rectangle <literal>rect =
-                            [x,y,w,h]
-                        </literal>
-                        (Upper-Left point, Width, Height).
-                    </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>c = xget("color")</term>
-                <listitem>
-                    <para>
-                        Get the default color for filling, line or text drawing
-                        functions. <literal>c</literal> is an integer projected
-                        in the interval <literal>[0,whiteid]</literal>. 0 stands
-                        for black filling and <literal>whiteid</literal> for
-                        white. The value of <literal>whiteid</literal> can be
-                        obtained with <code>xget("white")</code>.
-                    </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>cmap = xget("colormap")</term>
-                <listitem>
-                    <para>
-                        Get the colormap used for the current graphics window as
-                        a <literal>m x 3</literal> RGB matrix.
-                    </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>dash = xget("dashes")</term>
-                <listitem>
-                    <para>
-                        Get the dash style <literal>dash = [dash_number]</literal>
-                        where <literal>dash_number</literal> is the id of the
-                        dash.
-                        <warning>
-                            This keyword is obsolete, please use
-                            <literal>xget("color")</literal> or
-                            <literal>xget("line style")</literal> instead.
-                        </warning>
-                    </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>font = xget("font")</term>
-                <listitem>
-                    <para>
-                        Get <literal>font = [fontid, fontsize]</literal>, the
-                        default font and the default value of font size.
-                    </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>fontsize = xget("font size")</term>
-                <listitem>
-                    <para>Get the default value of font size.</para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>color = xget("foreground")</term>
-                <listitem>
-                    <para>
-                        Get the foreground color of the current
-                        <literal>Axes</literal> object. The result is a colormap index corresponding to the color.
-                    </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>str = xget("fpf")</term>
-                <listitem>
-                    <para>
-                        Get the floating point format for number display in
-                        contour functions. Note that <literal>str</literal> is <literal>""</literal> when default format is used.
-                    </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>color = xget("hidden3d")</term>
-                <listitem>
-                    <para>
-                        Get the color number for hidden faces in <function>plot3d</function>.
-                    </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>pat = xget("lastpattern")</term>
-                <listitem>
-                    <para>
-                        Get the id of the last available pattern or color, with
-                        the current colormap of the current window. In fact
-                        <literal>pat+1</literal> and <literal>pat+2</literal>
-                        are also available and stand respectively for black and
-                        white pattern.
-                    </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>type = xget("line mode")</term>
-                <listitem>
-                    <para>
-                        Get the line drawing mode. <literal>type = 1</literal>
-                        is absolute mode and <literal>type = 0</literal> is
-                        relative mode.
-                        <warning>
-                            The mode <literal>type = 0</literal> has bugs.
-                        </warning>
-                    </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>xget("line style")</term>
-                <listitem>
-                    <para>
-                        Get the default line style (1 for solid line, &gt;1 for
-                        dashed lines).
-                    </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>mark = xget("mark")</term>
-                <listitem>
-                    <para>
-                        Get the default mark id and the default mark size.
-                        <literal>mark=[markid, marksize]</literal>.
-                    </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>marksize = xget("mark size")</term>
-                <listitem>
-                    <para>Get the default mark size.</para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>pat = xget("pattern")</term>
-                <listitem>
-                    <para>
-                        Get the current pattern or the current color.
-                        <literal>pat</literal> is an integer in the range
-                        <literal>[1, last]</literal>. When one uses black and
-                        white, 0 is used for black filling and
-                        <literal>last</literal> for white. The value of
-                        <literal>last</literal> can be obtained with
-                        <code>xget("lastpattern")</code>.
-                    </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>value = xget("thickness")</term>
-                <listitem>
-                    <para>
-                        Get the thickness of lines in pixel (0 and 1 have the same meaning: 1 pixel thick).
-                    </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>flag = xget("use color")</term>
-                <listitem>
-                    <para>
-                        Get the flag 0 (use black and white) or 1 (use colors).
-                        See <function>xset</function>.
-                    </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>[x, y] = xget("viewport")</term>
+                <term>value = xget("fpf")</term>
                 <listitem>
                     <para>
-                        Get the current position of the visible part of graphics
-                        in the panner.
-                    </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>dim = xget("wdim")</term>
-                <listitem>
-                    <para>
-                        Get the width and the height of the current graphics
-                        window <literal>dim = [width, height]</literal>.
-                    </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>win = xget("window")</term>
-                <listitem>
-                    <para>
-                        Get the current window number <literal>win</literal>.
-                    </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>pos = xget("wpos")</term>
-                <listitem>
-                    <para>
-                        Get the position of the upper left point of the graphics
-                        window <literal>pos = [x, y]</literal>.
+                        Gets as a string the floating point format for number display in contour
+                        functions. Note that <literal>value</literal> is <literal>""</literal>
+                        when the default format is used.
                     </para>
                 </listitem>
             </varlistentry>
         </variablelist>
+        <refsect2>
+            <title>Replacements</title>
+        <screen><![CDATA[
+// SCILAB 3 & 4           SCILAB N > 4
+// ------------           ------------
+xget("window")            gcf().figure_id
+xget("figure")            gcf().figure_id
+xget("wpos")              gcf().figure_position
+xget("wdim")              gcf().figure_size
+xget("wpdim")             gcf().figure_size
+xget("viewport")          gcf().viewport
+xget("wresize")           gcf().auto_resize
+xget("auto clear")        gcf().auto_clear
+
+xget("hidden3d")          gca().hiddencolor
+xget("clipgrf")           bool2s(gca().clip_state=="clipgrf")
+xget("clipoff")           bool2s(gca().clip_state=="off")
+xget("clipping")          gca().clip_box
+xget("background")        gca().background
+xget("foreground")        gca().foreground
+xget("pattern")           gca().foreground
+xget("lastpattern")       size(gcf().color_map,1)
+xget("color")             gca().foreground
+xget("white")             color("white")
+xget("font")              [gca().font_style gca().font_size]
+xget("font size")         gca().font_size
+xget("dashes")            gca().line_style
+xget("line mode")         gca().line_mode
+]]></screen>
+        </refsect2>
     </refsection>
     <refsection role="see also">
         <title>See also</title>
                 <link linkend="xset">xset</link>
             </member>
             <member>
-                <link linkend="getcolor">getcolor</link>
+                <link linkend="get">get</link>
             </member>
             <member>
-                <link linkend="ged">ged</link>
+                <link linkend="graphics_entities">graphics entities</link>
             </member>
             <member>
-                <link linkend="set">set</link>
+                <link linkend="gcf">gcf</link>
             </member>
             <member>
-                <link linkend="graphics_entities">graphics entities</link>
+                <link linkend="gdf">gdf</link>
+            </member>
+            <member>
+                <link linkend="gca">gca</link>
+            </member>
+            <member>
+                <link linkend="gda">gda</link>
+            </member>
+            <member>
+                <link linkend="ged">ged</link>
+            </member>
+            <member>
+                <link linkend="getcolor">getcolor</link>
             </member>
         </simplelist>
     </refsection>
         <title>History</title>
         <revhistory>
             <revision>
+                <revnumber>5.0.1</revnumber>
+                <revremark>
+                    The <literal>"alufunction"</literal> property is obsolete. It is no longer
+                    taken into account for graphical renderings. It is replaced with
+                    <literal>gcf().pixel_drawing_mode</literal>.
+                </revremark>
+            </revision>
+            <revision>
                 <revnumber>5.4.0</revnumber>
                 <revremark>
-                    The "alufunction" property is no more supported, this property was no more used for rendering since Scilab 5.0.1.
+                    The <literal>"alufunction"</literal> is no longer supported..
+                </revremark>
+            </revision>
+            <revision>
+                <revnumber>6.0.0</revnumber>
+                <revremark>
+                    Only the <literal>xget("fpf")</literal> syntax is now supported.
                 </revremark>
             </revision>
         </revhistory>
index bbfca78..16b80cb 100644 (file)
@@ -1,14 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-
 <!--
-
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-
  * Copyright (C) ENPC - Jean-Philippe Chancelier
-
- *
-
-
+* Copyright (C) 2017 - Samuel GOUGEON
+  *
  * Copyright (C) 2012 - 2016 - Scilab Enterprises
  *
  * This file is hereby licensed under the terms of the GNU GPL v2.0,
  * and continues to be available under such terms.
  * For more information, see the COPYING file which you should have received
  * along with this program.
-
  *
-
  -->
-
-<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="xget" 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: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="xget" xml:lang="ja">
     <refnamediv>
-
         <refname>xget</refname>
-
         <refpurpose>
-
-            グラフィックコンテキストのカレントの値を取得.
-
-            <emphasis role="bold">この関数は廃止されました.</emphasis>
-
+            グラフィックコンテキストのカレントの値を取得. <emphasis role="bold">この関数は廃止されました.</emphasis>
         </refpurpose>
-
     </refnamediv>
-
     <refsynopsisdiv>
-
         <title>呼び出し手順</title>
-
-        <synopsis>[x1]=xget(str,[flag])
-
-            xget()
-
+        <synopsis>
+            value = xget(query)
         </synopsis>
-
     </refsynopsisdiv>
-
-    <refsection>
-
-        <title>パラメータ</title>
-
-        <variablelist>
-
-            <varlistentry>
-
-                <term>str</term>
-
-                <listitem>
-
-                    <para>文字列.</para>
-
-                </listitem>
-
-            </varlistentry>
-
-            <varlistentry>
-
-                <term>flag</term>
-
-                <listitem>
-
-                    <para>オプション. 1を指定すると冗長モード.</para>
-
-                </listitem>
-
-            </varlistentry>
-
-        </variablelist>
-
-    </refsection>
-
     <refsection>
-
         <title>説明</title>
-
-        <para>
-
-            <warning>
-
-                この関数は廃止されました.
-
-            </warning>
-
+        <warning>
+            <emphasis role="bold">この関数は廃止されました</emphasis>.
             代わりにScilabグラフィックオブジェクト表現を使用してください
-
             (<link linkend="set">set</link>および <link linkend="get">get</link>関数
-
             および<link linkend="graphics_entities">graphicsエンティティ</link>を参照).
-
-        </para>
-
+        </warning>
         <para>
-
             This function is used to get values from the graphics context on the
-
-            topic specified by the string <literal>str</literal>. When called with no
-
-            argument, a choice menu is created showing the current values and changes
-
-            can be performed through toggle buttons.
-
+            topic specified by the input string <varname>query</varname>.
         </para>
-
         <variablelist>
-
-            <varlistentry>
-
-                <term>str = xget("auto clear")</term>
-
-                <listitem>
-
-                    <para>
-
-                        Get the auto clear status (<literal>"on"</literal> or
-
-                        <literal>"off"</literal>).
-
-                    </para>
-
-                </listitem>
-
-            </varlistentry>
-
-            <varlistentry>
-
-                <term>color = xget("background")</term>
-
-                <listitem>
-
-                    <para>
-
-                        Get the background color of the current
-
-                        <literal>Axes</literal> object. The result is a colormap
-
-                        index corresponding to the color.
-
-                    </para>
-
-                </listitem>
-
-            </varlistentry>
-
-            <varlistentry>
-
-                <term>rect = xget("clipping")</term>
-
-                <listitem>
-
-                    <para>
-
-                        Get the clipping zone as a rectangle <literal>rect =
-
-                            [x,y,w,h]
-
-                        </literal>
-
-                        (Upper-Left point, Width, Height).
-
-                    </para>
-
-                </listitem>
-
-            </varlistentry>
-
-            <varlistentry>
-
-                <term>c = xget("color")</term>
-
-                <listitem>
-
-                    <para>
-
-                        Get the default color for filling, line or text drawing
-
-                        functions. <literal>c</literal> is an integer projected
-
-                        in the interval <literal>[0,whiteid]</literal>. 0 stands
-
-                        for black filling and <literal>whiteid</literal> for
-
-                        white. The value of <literal>whiteid</literal> can be
-
-                        obtained with <code>xget("white")</code>.
-
-                    </para>
-
-                </listitem>
-
-            </varlistentry>
-
-            <varlistentry>
-
-                <term>cmap = xget("colormap")</term>
-
-                <listitem>
-
-                    <para>
-
-                        Get the colormap used for the current graphics window as
-
-                        a <literal>m x 3</literal> RGB matrix.
-
-                    </para>
-
-                </listitem>
-
-            </varlistentry>
-
-            <varlistentry>
-
-                <term>dash = xget("dashes")</term>
-
-                <listitem>
-
-                    <para>
-
-                        Get the dash style <literal>dash = [dash_number]</literal>
-
-                        where <literal>dash_number</literal> is the id of the
-
-                        dash.
-
-                        <warning>
-
-                            This keyword is obsolete, please use
-
-                            <literal>xget("color")</literal> or
-
-                            <literal>xget("line style")</literal> instead.
-
-                        </warning>
-
-                    </para>
-
-                </listitem>
-
-            </varlistentry>
-
-            <varlistentry>
-
-                <term>font = xget("font")</term>
-
-                <listitem>
-
-                    <para>
-
-                        Get <literal>font = [fontid, fontsize]</literal>, the
-
-                        default font and the default value of font size.
-
-                    </para>
-
-                </listitem>
-
-            </varlistentry>
-
-            <varlistentry>
-
-                <term>fontsize = xget("font size")</term>
-
-                <listitem>
-
-                    <para>Get the default value of font size.</para>
-
-                </listitem>
-
-            </varlistentry>
-
-            <varlistentry>
-
-                <term>color = xget("foreground")</term>
-
-                <listitem>
-
-                    <para>
-
-                        Get the foreground color of the current
-
-                        <literal>Axes</literal> object. The result is a colormap index corresponding to the color.
-
-                    </para>
-
-                </listitem>
-
-            </varlistentry>
-
-            <varlistentry>
-
-                <term>str = xget("fpf")</term>
-
-                <listitem>
-
-                    <para>
-
-                        Get the floating point format for number display in
-
-                        contour functions. Note that <literal>str</literal> is <literal>""</literal> when default format is used.
-
-                    </para>
-
-                </listitem>
-
-            </varlistentry>
-
-            <varlistentry>
-
-                <term>color = xget("hidden3d")</term>
-
-                <listitem>
-
-                    <para>
-
-                        Get the color number for hidden faces in <function>plot3d</function>.
-
-                    </para>
-
-                </listitem>
-
-            </varlistentry>
-
-            <varlistentry>
-
-                <term>pat = xget("lastpattern")</term>
-
-                <listitem>
-
-                    <para>
-
-                        Get the id of the last available pattern or color, with
-
-                        the current colormap of the current window. In fact
-
-                        <literal>pat+1</literal> and <literal>pat+2</literal>
-
-                        are also available and stand respectively for black and
-
-                        white pattern.
-
-                    </para>
-
-                </listitem>
-
-            </varlistentry>
-
-            <varlistentry>
-
-                <term>type = xget("line mode")</term>
-
-                <listitem>
-
-                    <para>
-
-                        Get the line drawing mode. <literal>type = 1</literal>
-
-                        is absolute mode and <literal>type = 0</literal> is
-
-                        relative mode.
-
-                        <warning>
-
-                            The mode <literal>type = 0</literal> has bugs.
-
-                        </warning>
-
-                    </para>
-
-                </listitem>
-
-            </varlistentry>
-
-            <varlistentry>
-
-                <term>xget("line style")</term>
-
-                <listitem>
-
-                    <para>
-
-                        Get the default line style (1 for solid line, &gt;1 for
-
-                        dashed lines).
-
-                    </para>
-
-                </listitem>
-
-            </varlistentry>
-
-            <varlistentry>
-
-                <term>mark = xget("mark")</term>
-
-                <listitem>
-
-                    <para>
-
-                        Get the default mark id and the default mark size.
-
-                        <literal>mark=[markid, marksize]</literal>.
-
-                    </para>
-
-                </listitem>
-
-            </varlistentry>
-
-            <varlistentry>
-
-                <term>marksize = xget("mark size")</term>
-
-                <listitem>
-
-                    <para>Get the default mark size.</para>
-
-                </listitem>
-
-            </varlistentry>
-
-            <varlistentry>
-
-                <term>pat = xget("pattern")</term>
-
-                <listitem>
-
-                    <para>
-
-                        Get the current pattern or the current color.
-
-                        <literal>pat</literal> is an integer in the range
-
-                        <literal>[1, last]</literal>. When one uses black and
-
-                        white, 0 is used for black filling and
-
-                        <literal>last</literal> for white. The value of
-
-                        <literal>last</literal> can be obtained with
-
-                        <code>xget("lastpattern")</code>.
-
-                    </para>
-
-                </listitem>
-
-            </varlistentry>
-
-            <varlistentry>
-
-                <term>value = xget("thickness")</term>
-
-                <listitem>
-
-                    <para>
-
-                        Get the thickness of lines in pixel (0 and 1 have the same meaning: 1 pixel thick).
-
-                    </para>
-
-                </listitem>
-
-            </varlistentry>
-
-            <varlistentry>
-
-                <term>flag = xget("use color")</term>
-
-                <listitem>
-
-                    <para>
-
-                        Get the flag 0 (use black and white) or 1 (use colors).
-
-                        See <function>xset</function>.
-
-                    </para>
-
-                </listitem>
-
-            </varlistentry>
-
-            <varlistentry>
-
-                <term>[x, y] = xget("viewport")</term>
-
-                <listitem>
-
-                    <para>
-
-                        Get the current position of the visible part of graphics
-
-                        in the panner.
-
-                    </para>
-
-                </listitem>
-
-            </varlistentry>
-
-            <varlistentry>
-
-                <term>dim = xget("wdim")</term>
-
-                <listitem>
-
-                    <para>
-
-                        Get the width and the height of the current graphics
-
-                        window <literal>dim = [width, height]</literal>.
-
-                    </para>
-
-                </listitem>
-
-            </varlistentry>
-
-            <varlistentry>
-
-                <term>win = xget("window")</term>
-
-                <listitem>
-
-                    <para>
-
-                        Get the current window number <literal>win</literal>.
-
-                    </para>
-
-                </listitem>
-
-            </varlistentry>
-
             <varlistentry>
-
-                <term>pos = xget("wpos")</term>
-
+                <term>value = xget("fpf")</term>
                 <listitem>
-
                     <para>
-
-                        Get the position of the upper left point of the graphics
-
-                        window <literal>pos = [x, y]</literal>.
-
+                        Get as a string the floating point format for number display in contour
+                        functions. Note that <literal>value</literal> is <literal>""</literal> when
+                        the default format is used.
                     </para>
-
                 </listitem>
-
             </varlistentry>
-
         </variablelist>
-
+        <refsect2>
+            <title>Replacements</title>
+        <screen><![CDATA[
+// SCILAB 3 & 4           SCILAB N > 4
+// ------------           ------------
+xget("window")            gcf().figure_id
+xget("figure")            gcf().figure_id
+xget("wpos")              gcf().figure_position
+xget("wdim")              gcf().figure_size
+xget("wpdim")             gcf().figure_size
+xget("viewport")          gcf().viewport
+xget("wresize")           gcf().auto_resize
+xget("auto clear")        gcf().auto_clear
+
+xget("hidden3d")          gca().hiddencolor
+xget("clipgrf")           bool2s(gca().clip_state=="clipgrf")
+xget("clipoff")           bool2s(gca().clip_state=="off")
+xget("clipping")          gca().clip_box
+xget("background")        gca().background
+xget("foreground")        gca().foreground
+xget("pattern")           gca().foreground
+xget("lastpattern")       size(gcf().color_map,1)
+xget("color")             gca().foreground
+xget("white")             color("white")
+xget("font")              [gca().font_style gca().font_size]
+xget("font size")         gca().font_size
+xget("dashes")            gca().line_style
+xget("line mode")         gca().line_mode
+]]></screen>
+        </refsect2>
     </refsection>
-
     <refsection role="see also">
-
         <title>参照</title>
-
         <simplelist type="inline">
-
             <member>
-
                 <link linkend="xset">xset</link>
-
             </member>
-
             <member>
-
-                <link linkend="getcolor">getcolor</link>
-
+                <link linkend="get">get</link>
             </member>
-
             <member>
-
-                <link linkend="ged">ged</link>
-
+                <link linkend="graphics_entities">graphics entities</link>
             </member>
-
             <member>
-
-                <link linkend="set">set</link>
-
+                <link linkend="gcf">gcf</link>
             </member>
-
             <member>
-
-                <link linkend="graphics_entities">graphics_entities</link>
-
+                <link linkend="gdf">gdf</link>
+            </member>
+            <member>
+                <link linkend="gca">gca</link>
+            </member>
+            <member>
+                <link linkend="gda">gda</link>
+            </member>
+            <member>
+                <link linkend="ged">ged</link>
+            </member>
+            <member>
+                <link linkend="getcolor">getcolor</link>
             </member>
-
         </simplelist>
-
     </refsection>
-
     <refsection>
-
         <title>履歴</title>
-
         <revhistory>
-
             <revision>
-
+                <revnumber>5.0.1</revnumber>
+                <revremark>
+                    The <literal>"alufunction"</literal> property is obsolete. It is no longer
+                    taken into account for graphical renderings. It is replaced with
+                    <literal>gcf().pixel_drawing_mode</literal>.
+                </revremark>
+            </revision>
+            <revision>
                 <revnumber>5.4.0</revnumber>
-
                 <revremark>
-
-                    "alufunction" プロパティはもはやサポートされておらず,
-
-                    このプロパティは Scilab 5.0.1の描画では使用されいません.
-
+                    The <literal>"alufunction"</literal> is no longer supported..
+                </revremark>
+            </revision>
+            <revision>
+                <revnumber>6.0.0</revnumber>
+                <revremark>
+                    Only the <literal>xget("fpf")</literal> syntax is now supported.
                 </revremark>
-
             </revision>
-
         </revhistory>
-
     </refsection>
-
-</refentry>
-
-
-
+</refentry>
\ No newline at end of file
index b566a4c..b8902fd 100644 (file)
@@ -2,7 +2,8 @@
 <!--
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) ENPC - Jean-Philippe Chancelier
- *
+* Copyright (C) 2017 - Samuel GOUGEON
+  *
  * Copyright (C) 2012 - 2016 - Scilab Enterprises
  *
  * This file is hereby licensed under the terms of the GNU GPL v2.0,
  * along with this program.
  *
  -->
-<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="xget" xml:lang="pt">
+<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="xget" xml:lang="pt">
     <refnamediv>
         <refname>xget</refname>
         <refpurpose>
     </refnamediv>
     <refsynopsisdiv>
         <title>Seqüência de Chamamento</title>
-        <synopsis>[x1]=xget(str,[flag])
-            xget()
+        <synopsis>
+             value = xget(query)
         </synopsis>
     </refsynopsisdiv>
     <refsection>
-        <title>Parâmetros</title>
-        <variablelist>
-            <varlistentry>
-                <term>str</term>
-                <listitem>
-                    <para>string.</para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>flag</term>
-                <listitem>
-                    <para>opcional. Ajustado para 1 fornece um modo verboso.</para>
-                </listitem>
-            </varlistentry>
-        </variablelist>
-    </refsection>
-    <refsection>
         <title>Descrição</title>
-        <para>
+        <warning>
             <emphasis role="bold">Aviso: esta função está obsoleta</emphasis>.
-            Use a representação de objetos gráficos do Scilab (ver as ajudas de <link linkend="set">set</link> e <link linkend="get">get</link> bem como a
-            página <link linkend="graphics_entities">graphics_entities</link>).
-        </para>
-        <para>Esta função é utilizada para se obter valores de um contexto de
-            gráficos no tópico especificado pelo string <literal>str</literal>. Quando
-            chamada sem argumento, um menu de escolha é criado exibindo os valores
-            correntes e mudanças podem ser realizadas através de botões de
-            alternância.
+            Use a representação de objetos gráficos do Scilab (ver as ajudas de
+            <link linkend="set">set</link> e <link linkend="get">get</link> bem como a página
+            <link linkend="graphics_entities">graphics_entities</link>).
+        </warning>
+        <para>
+            Esta função é utilizada para se obter valores de um contexto de gráficos no tópico
+            especificado pelo string de entrada <varname>query</varname>.
         </para>
         <variablelist>
             <varlistentry>
-                <term>number=xget("alufunction")</term>
-                <listitem>
-                    <para>recebe o número da função lógica usada para desenhar. Ver
-                        <literal>xset</literal>.
-                    </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>str=xget("auto clear")</term>
+                <term>value = xget("fpf")</term>
                 <listitem>
                     <para>
-                        recebe o status de auto-limpeza (<literal>"on"</literal> ou
-                        <literal>"off"</literal>).
-                    </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>color=xget("background")</term>
-                <listitem>
-                    <para>recebe a cor de fundo da janela de gráficos corrente.</para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>rect=xget("clipping")</term>
-                <listitem>
-                    <para>recebe a zona de recorte como o retângulo rect=[x,y,w,h]
-                        (ponto superior esquerdo, largura, altura).
-                    </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>c=xget("color")</term>
-                <listitem>
-                    <para>recebe a cor padrão para funções de preenchimento, desenho de
-                        linha ou texto. c é um inteiro projetado no intervalo [0,whiteid]. 0
-                        significa preenchimento com preto e whiteid preenchimento com
-                        branco. O valor de whitid <literal>xget("white")</literal>.
-                    </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>cmap=xget("colormap")</term>
-                <listitem>
-                    <para>recebe o mapa decores utilizado para a janela de gráficos
-                        corrente como uma matriz m x 3 RGB (vermelho, verde, azul).
-                    </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>dash=xget("dashes")</term>
-                <listitem>
-                    <para>recebe o estilo de traço dash= [dash_number] onde dash_number
-                        é o identifcador do traço. Esta palavra-chave está obsoleta, use
-                        <literal>xget("color")</literal> ou <literal>xget("line
-                            style")
-                        </literal>
-                        ao invés.
-                    </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>font=xget("font")</term>
-                <listitem>
-                    <para>recebe font=[fontid,fontsize], a fonte padrão e o tamanho
-                        padrão para fontes.
-                    </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>fontsize=xget("font size")</term>
-                <listitem>
-                    <para>recebe o tamanho padrão para fontes.</para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>color=xget("foreground")</term>
-                <listitem>
-                    <para>recebe a cor de primeiro plano do objeto Axes corrente. O
-                        resultado é um índice do mapa de cores correspondente à cor.
-                    </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>str=xget("fpf")</term>
-                <listitem>
-                    <para>recebe o formato em ponto flutuante do número do número de
-                        exibição em funções de contorno . Note que <literal>str</literal> é
-                        " " quando o formato padrão é utilizado.
-                    </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>color=xget("hidden3d")</term>
-                <listitem>
-                    <para>recebe o número de cor para faces escondidas em plot3d.</para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>pat=xget("lastpattern")</term>
-                <listitem>
-                    <para>recebe o identificador do último padrão ou cor disponível no
-                        mapa de cores da janela corrente. Na verdade
-                        <literal>pat+1</literal> e <literal>pat+2</literal> também estão
-                        disponíveis e correspondem a padrões preto e branco
-                        respectivamente.
-                    </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>type=xget("line mode")</term>
-                <listitem>
-                    <para>recebe o modo de desenho de linha. type=1 é o modo absoluto e
-                        type=0 é o modo relativo. (Aviso: type=0 tem defeitos)
-                    </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>xget("line style")</term>
-                <listitem>
-                    <para>recebe o estilo de linhas padrão(1: sólido, &gt;1 para linhas
-                        tracejadas).
-                    </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>mark=xget("mark")</term>
-                <listitem>
-                    <para>recebe o identificador do estilo de marcas padrão e o tamanho
-                        de marcas padrão. <literal>mark=[markid,marksize]</literal>.
-                    </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>marksize=xget("mark size")</term>
-                <listitem>
-                    <para>recebe o tamanho de marcas padrão.</para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>pat=xget("pattern")</term>
-                <listitem>
-                    <para>recebe o padrão corrente ou a cor corrente.
-                        <literal>pat</literal> é um inteiro no intervalo
-                        <literal>[1,last]</literal>. Quando se usa preto ou branco, 0 é
-                        usado para preenchimento com preto e <literal>last</literal> para
-                        preenchimento com branco. O valor de <literal>last</literal> pode
-                        ser obtido com <literal>xget("lastpattern")</literal>.
-                    </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>value=xget("thickness")</term>
-                <listitem>
-                    <para>recebe a espessura das linhas em pixel (0 e 1 têm o mesmo
-                        significado: 1 pixel de espessura).
-                    </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>flag=xget("use color")</term>
-                <listitem>
-                    <para>recebe o flag 0 (para uso apenas de preto e branco) ou 1 (uso
-                        de cores). Ver <literal>xset</literal>.
-                    </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>[x,y]=xget("viewport")</term>
-                <listitem>
-                    <para>recebe a posição corrente da parte visível de gráficos.</para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>dim=xget("wdim")</term>
-                <listitem>
-                    <para>recebe a largura e a altura da janela de gráficos corrente
-                        dim=[largura,altura].
-                    </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>win=xget("window")</term>
-                <listitem>
-                    <para>recebe o número de janela corrente
-                        <literal>win</literal>.
-                    </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>pos=xget("wpos");</term>
-                <listitem>
-                    <para>recebe a posição do ponto superior esquerdo da janela de
-                        gráficos pos=[x,y].
+                        recebe o formato em ponto flutuante do número do número de exibição em
+                        funções de contorno . Note que <literal>value</literal> é
+                        <literal>""</literal> quando o formato padrão é utilizado.
                     </para>
                 </listitem>
             </varlistentry>
         </variablelist>
+        <refsect2>
+            <title>Replacements</title>
+        <screen><![CDATA[
+// SCILAB 3 & 4           SCILAB N > 4
+// ------------           ------------
+xget("window")            gcf().figure_id
+xget("figure")            gcf().figure_id
+xget("wpos")              gcf().figure_position
+xget("wdim")              gcf().figure_size
+xget("wpdim")             gcf().figure_size
+xget("viewport")          gcf().viewport
+xget("wresize")           gcf().auto_resize
+xget("auto clear")        gcf().auto_clear
+
+xget("hidden3d")          gca().hiddencolor
+xget("clipgrf")           bool2s(gca().clip_state=="clipgrf")
+xget("clipoff")           bool2s(gca().clip_state=="off")
+xget("clipping")          gca().clip_box
+xget("background")        gca().background
+xget("foreground")        gca().foreground
+xget("pattern")           gca().foreground
+xget("lastpattern")       size(gcf().color_map,1)
+xget("color")             gca().foreground
+xget("white")             color("white")
+xget("font")              [gca().font_style gca().font_size]
+xget("font size")         gca().font_size
+xget("dashes")            gca().line_style
+xget("line mode")         gca().line_mode
+]]></screen>
+        </refsect2>
     </refsection>
-    <refsection>
+    <refsection role="see also">
         <title>Ver Também</title>
         <simplelist type="inline">
             <member>
                 <link linkend="xset">xset</link>
             </member>
             <member>
-                <link linkend="getcolor">getcolor</link>
+                <link linkend="get">get</link>
             </member>
             <member>
-                <link linkend="ged">ged</link>
+                <link linkend="graphics_entities">graphics entities</link>
+            </member>
+            <member>
+                <link linkend="gcf">gcf</link>
+            </member>
+            <member>
+                <link linkend="gdf">gdf</link>
             </member>
             <member>
-                <link linkend="set">set</link>
+                <link linkend="gca">gca</link>
             </member>
             <member>
-                <link linkend="graphics_entities">graphics_entities</link>
+                <link linkend="gda">gda</link>
+            </member>
+            <member>
+                <link linkend="ged">ged</link>
+            </member>
+            <member>
+                <link linkend="getcolor">getcolor</link>
             </member>
         </simplelist>
     </refsection>
+    <refsection>
+        <title>Histórico</title>
+        <revhistory>
+            <revision>
+                <revnumber>5.0.1</revnumber>
+                <revremark>
+                    The <literal>"alufunction"</literal> property is obsolete. It is no longer
+                    taken into account for graphical renderings. It is replaced with
+                    <literal>gcf().pixel_drawing_mode</literal>.
+                </revremark>
+            </revision>
+            <revision>
+                <revnumber>5.4.0</revnumber>
+                <revremark>
+                    The <literal>"alufunction"</literal> is no longer supported..
+                </revremark>
+            </revision>
+            <revision>
+                <revnumber>6.0.0</revnumber>
+                <revremark>
+                    Only the <literal>xget("fpf")</literal> syntax is now supported.
+                </revremark>
+            </revision>
+        </revhistory>
+    </refsection>
 </refentry>
index eaa582a..8ddb210 100644 (file)
@@ -33,6 +33,7 @@ extern "C"
 #include <string.h>
 #include "GetProperty.h"
 #include "Scierror.h"
+#include "Sciwarning.h"
 #include "localization.h"
 #include "returnProperty.h"
 #include "HandleManagement.h"
@@ -121,6 +122,8 @@ types::Function::ReturnValue sci_xget(types::typed_list &in, int _iRetCount, typ
         break;
         case 2 : // auto clear
         {
+            Sciwarning(_("%s: This feature will be permanently removed in Scilab %s\n\n"), _("Warning"), "6.1.0");
+
             int iAutoClear = 0;
             int* piAutoClear = &iAutoClear;
             getGraphicObjectProperty(getOrCreateDefaultSubwin(), __GO_AUTO_CLEAR__, jni_bool, (void **)&piAutoClear);
@@ -136,6 +139,8 @@ types::Function::ReturnValue sci_xget(types::typed_list &in, int _iRetCount, typ
         break;
         case 8 : // colormap
         {
+            Sciwarning(_("%s: This feature will be permanently removed in Scilab %s\n\n"), _("Warning"), "6.1.0");
+
             int iObjUID = 0;
             // Force figure creation if none exists.
             getOrCreateDefaultSubwin();
@@ -146,6 +151,8 @@ types::Function::ReturnValue sci_xget(types::typed_list &in, int _iRetCount, typ
         break;
         case 20 : // mark
         {
+            Sciwarning(_("%s: This feature will be permanently removed in Scilab %s\n\n"), _("Warning"), "6.1.0");
+
             int iObjUID = getOrCreateDefaultSubwin();
             int iMarkStyle = 0;
             int* piMarkStyle = &iMarkStyle;
@@ -163,17 +170,23 @@ types::Function::ReturnValue sci_xget(types::typed_list &in, int _iRetCount, typ
         break;
         case 21 : // mark size
         {
+            Sciwarning(_("%s: This feature will be permanently removed in Scilab %s\n\n"), _("Warning"), "6.1.0");
+
             int iObjUID = getOrCreateDefaultSubwin();
             out.push_back((types::InternalType*)get_mark_size_property(pvApiCtx, iObjUID));
         }
         break;
         case 19 : // line style
         {
+            Sciwarning(_("%s: This feature will be permanently removed in Scilab %s\n\n"), _("Warning"), "6.1.0");
+
             out.push_back((types::InternalType*)get_line_style_property(pvApiCtx, getOrCreateDefaultSubwin()));
         }
         break;
         case 5 : // clipping
         {
+            Sciwarning(_("%s: This feature will be permanently removed in Scilab %s\n\n"), _("Warning"), "6.1.0");
+
             types::Double* pDblClipBox = new types::Double(1, 4);
             double *clipBox = NULL;
             int iObjUID = getOrCreateDefaultSubwin();
@@ -184,6 +197,8 @@ types::Function::ReturnValue sci_xget(types::typed_list &in, int _iRetCount, typ
         break;
         case 12 : // font
         {
+            Sciwarning(_("%s: This feature will be permanently removed in Scilab %s\n\n"), _("Warning"), "6.1.0");
+
             int iObjUID = getOrCreateDefaultSubwin();
             double dblFontSize = 0;
             double* pdblFontSize = &dblFontSize;
@@ -201,6 +216,8 @@ types::Function::ReturnValue sci_xget(types::typed_list &in, int _iRetCount, typ
         break;
         case 13 : // font size
         {
+            Sciwarning(_("%s: This feature will be permanently removed in Scilab %s\n\n"), _("Warning"), "6.1.0");
+
             double dblFontSize = 0;
             double* pdblFontSize = &dblFontSize;
             getGraphicObjectProperty(getOrCreateDefaultSubwin(), __GO_FONT_SIZE__, jni_double, (void **)&pdblFontSize);
@@ -210,6 +227,8 @@ types::Function::ReturnValue sci_xget(types::typed_list &in, int _iRetCount, typ
         break;
         case 9 : // dashes
         {
+            Sciwarning(_("%s: This feature will be permanently removed in Scilab %s\n\n"), _("Warning"), "6.1.0");
+
             int iLineStyle = 0;
             int* piLineStyle = &iLineStyle;
 
@@ -220,12 +239,16 @@ types::Function::ReturnValue sci_xget(types::typed_list &in, int _iRetCount, typ
         break;
         case 16 : // hidden3d
         {
+            Sciwarning(_("%s: This feature will be permanently removed in Scilab %s\n\n"), _("Warning"), "6.1.0");
+
             out.push_back((types::InternalType*)get_hidden_color_property(pvApiCtx, getOrCreateDefaultSubwin()));
         }
         break;
         case 30 : // window
         case 11 : // figure
         {
+            Sciwarning(_("%s: This feature will be permanently removed in Scilab %s\n\n"), _("Warning"), "6.1.0");
+
             int iFigureId = 0;
             int* piFigureId = &iFigureId;
 
@@ -237,12 +260,16 @@ types::Function::ReturnValue sci_xget(types::typed_list &in, int _iRetCount, typ
         break;
         case 25 : // thickness
         {
+            Sciwarning(_("%s: This feature will be permanently removed in Scilab %s\n\n"), _("Warning"), "6.1.0");
+
             out.push_back((types::InternalType*)get_thickness_property(pvApiCtx, getOrCreateDefaultSubwin()));
         }
         break;
         case 28 : // wdim
         case 31 : // wpdim
         {
+            Sciwarning(_("%s: This feature will be permanently removed in Scilab %s\n\n"), _("Warning"), "6.1.0");
+
             int *piFigureSize = NULL;
             types::Double* pDblFigureSize = new types::Double(1, 2);
 
@@ -256,6 +283,8 @@ types::Function::ReturnValue sci_xget(types::typed_list &in, int _iRetCount, typ
         break;
         case 32 : // wpos
         {
+            Sciwarning(_("%s: This feature will be permanently removed in Scilab %s\n\n"), _("Warning"), "6.1.0");
+
             int *piFigurePosition = NULL;
             types::Double* pDblFigurePos = new types::Double(1, 2);
 
@@ -269,6 +298,8 @@ types::Function::ReturnValue sci_xget(types::typed_list &in, int _iRetCount, typ
         break;
         case 27 : // viewport
         {
+            Sciwarning(_("%s: This feature will be permanently removed in Scilab %s\n\n"), _("Warning"), "6.1.0");
+
             int *piViewport = NULL;
             types::Double* pDblViewport = new types::Double(1, 2);
 
@@ -282,6 +313,8 @@ types::Function::ReturnValue sci_xget(types::typed_list &in, int _iRetCount, typ
         break;
         case 3 : // background
         {
+            Sciwarning(_("%s: This feature will be permanently removed in Scilab %s\n\n"), _("Warning"), "6.1.0");
+
             out.push_back((types::InternalType*)get_background_property(pvApiCtx, getOrCreateDefaultSubwin()));
         }
         break;
@@ -289,11 +322,15 @@ types::Function::ReturnValue sci_xget(types::typed_list &in, int _iRetCount, typ
         case 14 : // foreground
         case 23 : // pattern
         {
+            Sciwarning(_("%s: This feature will be permanently removed in Scilab %s\n\n"), _("Warning"), "6.1.0");
+
             out.push_back((types::InternalType*)get_foreground_property(pvApiCtx, getOrCreateDefaultSubwin()));
         }
         break;
         case 17 : // lastpattern
         {
+            Sciwarning(_("%s: This feature will be permanently removed in Scilab %s\n\n"), _("Warning"), "6.1.0");
+
             int iNumColors = 0;
             int* piNumColors = &iNumColors;
 
@@ -305,6 +342,8 @@ types::Function::ReturnValue sci_xget(types::typed_list &in, int _iRetCount, typ
         break;
         case 18 : // line mode
         {
+            Sciwarning(_("%s: This feature will be permanently removed in Scilab %s\n\n"), _("Warning"), "6.1.0");
+
             int iLineMode = 0;
             int* lineMode = &iLineMode;
 
@@ -315,6 +354,8 @@ types::Function::ReturnValue sci_xget(types::typed_list &in, int _iRetCount, typ
         break;
         case 29 : // white
         {
+            Sciwarning(_("%s: This feature will be permanently removed in Scilab %s\n\n"), _("Warning"), "6.1.0");
+
             int iNumColors = 0;
             int* piNumColors = &iNumColors;
 
@@ -327,6 +368,8 @@ types::Function::ReturnValue sci_xget(types::typed_list &in, int _iRetCount, typ
         break;
         case 33 : // wresize
         {
+            Sciwarning(_("%s: This feature will be permanently removed in Scilab %s\n\n"), _("Warning"), "6.1.0");
+
             // autoresize property
             int iAutoResize = 0;
             int* piAutoResize =  &iAutoResize;
@@ -339,6 +382,8 @@ types::Function::ReturnValue sci_xget(types::typed_list &in, int _iRetCount, typ
         break;
         case 6 : // clipgrf
         {
+            Sciwarning(_("%s: This feature will be permanently removed in Scilab %s\n\n"), _("Warning"), "6.1.0");
+
             /* clip_state : 0 = off, 1 = on */
             int iClipState = 0;
             int* piClipState = &iClipState;
@@ -350,6 +395,8 @@ types::Function::ReturnValue sci_xget(types::typed_list &in, int _iRetCount, typ
         break;
         case 4 : // clipoff
         {
+            Sciwarning(_("%s: This feature will be permanently removed in Scilab %s\n\n"), _("Warning"), "6.1.0");
+
             int iClipState = 0;
             int* piClipState = &iClipState;
 
index f835a6b..d6a8b1e 100644 (file)
@@ -36,6 +36,7 @@ extern "C"
 #include "DrawObjects.h"
 #include "localization.h"
 #include "Scierror.h"
+#include "Sciwarning.h"
 #include "HandleManagement.h"
 
 #include "createGraphicObject.h"
@@ -142,6 +143,8 @@ types::Function::ReturnValue sci_xset(types::typed_list &in, int _iRetCount, typ
         break;
         case 2 : // auto clear
         {
+            Sciwarning(_("%s: This feature will be permanently removed in Scilab %s\n\n"), _("Warning"), "6.1.0");
+
             if (in.size() != 2)
             {
                 Scierror(77, _("%s: Wrong number of input arguments: %d expected.\n"), "xset", 2);
@@ -172,6 +175,8 @@ types::Function::ReturnValue sci_xset(types::typed_list &in, int _iRetCount, typ
         break;
         case 5 : // clipping
         {
+            Sciwarning(_("%s: This feature will be permanently removed in Scilab %s\n\n"), _("Warning"), "6.1.0");
+
             int clipState = 2;
             double dvalues[4];
             if (in.size() == 2)
@@ -205,6 +210,8 @@ types::Function::ReturnValue sci_xset(types::typed_list &in, int _iRetCount, typ
         break;
         case 8 : // colormap
         {
+            Sciwarning(_("%s: This feature will be permanently removed in Scilab %s\n\n"), _("Warning"), "6.1.0");
+
             if (in.size() != 2)
             {
                 Scierror(77, _("%s: Wrong number of input argument(s): %d expected.\n"), "xset", 2);
@@ -218,6 +225,8 @@ types::Function::ReturnValue sci_xset(types::typed_list &in, int _iRetCount, typ
         break;
         case 21 : // mark size
         {
+            Sciwarning(_("%s: This feature will be permanently removed in Scilab %s\n\n"), _("Warning"), "6.1.0");
+
             if (in.size() != 2)
             {
                 Scierror(77, _("%s: Wrong number of input argument(s): %d expected.\n"), "xset", 2);
@@ -234,6 +243,8 @@ types::Function::ReturnValue sci_xset(types::typed_list &in, int _iRetCount, typ
         break;
         case 20 : // mark
         {
+            Sciwarning(_("%s: This feature will be permanently removed in Scilab %s\n\n"), _("Warning"), "6.1.0");
+
             if (in.size() != 3)
             {
                 Scierror(77, _("%s: Wrong number of input arguments: %d expected.\n"), "xset", 3);
@@ -254,6 +265,8 @@ types::Function::ReturnValue sci_xset(types::typed_list &in, int _iRetCount, typ
         break;
         case 13 : // font size
         {
+            Sciwarning(_("%s: This feature will be permanently removed in Scilab %s\n\n"), _("Warning"), "6.1.0");
+
             if (in.size() != 2)
             {
                 Scierror(77, _("%s: Wrong number of input arguments: %d expected.\n"), "xset", 2);
@@ -265,6 +278,8 @@ types::Function::ReturnValue sci_xset(types::typed_list &in, int _iRetCount, typ
         break;
         case 10 : // default
         {
+            Sciwarning(_("%s: This feature will be permanently removed in Scilab %s\n\n"), _("Warning"), "6.1.0");
+
             if (in.size() != 1)
             {
                 Scierror(77, _("%s: Wrong number of input arguments: %d expected.\n"), "xset", 1);
@@ -367,6 +382,8 @@ types::Function::ReturnValue sci_xset(types::typed_list &in, int _iRetCount, typ
         break;
         case 6 : // clipgrf
         {
+            Sciwarning(_("%s: This feature will be permanently removed in Scilab %s\n\n"), _("Warning"), "6.1.0");
+
             int clipState = 1;
             /* special treatement for xset("cligrf") */
             setGraphicObjectProperty(getOrCreateDefaultSubwin(), __GO_CLIP_STATE__, &clipState, jni_int, 1);
@@ -374,6 +391,8 @@ types::Function::ReturnValue sci_xset(types::typed_list &in, int _iRetCount, typ
         break;
         case 4 : // clipoff
         {
+            Sciwarning(_("%s: This feature will be permanently removed in Scilab %s\n\n"), _("Warning"), "6.1.0");
+
             int clipState = 0;
             /* special treatement for xset("clipoff") */
             setGraphicObjectProperty(getOrCreateDefaultSubwin(), __GO_CLIP_STATE__, &clipState, jni_int, 1);
@@ -381,6 +400,8 @@ types::Function::ReturnValue sci_xset(types::typed_list &in, int _iRetCount, typ
         break;
         case 16 : // hidden3d
         {
+            Sciwarning(_("%s: This feature will be permanently removed in Scilab %s\n\n"), _("Warning"), "6.1.0");
+
             if (in.size() != 2)
             {
                 Scierror(77, _("%s: Wrong number of input arguments: %d expected.\n"), "xset", 2);
@@ -393,6 +414,8 @@ types::Function::ReturnValue sci_xset(types::typed_list &in, int _iRetCount, typ
         break;
         case 12 : // font
         {
+            Sciwarning(_("%s: This feature will be permanently removed in Scilab %s\n\n"), _("Warning"), "6.1.0");
+
             if (in.size() != 3)
             {
                 Scierror(77, _("%s: Wrong number of input arguments: %d expected.\n"), "xset", 3);
@@ -409,6 +432,8 @@ types::Function::ReturnValue sci_xset(types::typed_list &in, int _iRetCount, typ
         case 11 : // window
         case 30 : // figure
         {
+            Sciwarning(_("%s: This feature will be permanently removed in Scilab %s\n\n"), _("Warning"), "6.1.0");
+
             if (in.size() != 2)
             {
                 Scierror(77, _("%s: Wrong number of input arguments: %d expected.\n"), "xset", 2);
@@ -436,6 +461,8 @@ types::Function::ReturnValue sci_xset(types::typed_list &in, int _iRetCount, typ
         case 7 : // color
         case 23 : // pattern
         {
+            Sciwarning(_("%s: This feature will be permanently removed in Scilab %s\n\n"), _("Warning"), "6.1.0");
+
             if (in.size() != 2)
             {
                 Scierror(77, _("%s: Wrong number of input arguments: %d expected.\n"), "xset", 2);
@@ -448,6 +475,8 @@ types::Function::ReturnValue sci_xset(types::typed_list &in, int _iRetCount, typ
         break;
         case 3 : // background
         {
+            Sciwarning(_("%s: This feature will be permanently removed in Scilab %s\n\n"), _("Warning"), "6.1.0");
+
             if (in.size() != 2)
             {
                 Scierror(77, _("%s: Wrong number of input arguments: %d expected.\n"), "xset", 2);
@@ -460,6 +489,8 @@ types::Function::ReturnValue sci_xset(types::typed_list &in, int _iRetCount, typ
         break;
         case 25 : // thickness
         {
+            Sciwarning(_("%s: This feature will be permanently removed in Scilab %s\n\n"), _("Warning"), "6.1.0");
+
             if (in.size() != 2)
             {
                 Scierror(77, _("%s: Wrong number of input arguments: %d expected.\n"), "xset", 2);
@@ -471,6 +502,8 @@ types::Function::ReturnValue sci_xset(types::typed_list &in, int _iRetCount, typ
         break;
         case 19 : // line style
         {
+            Sciwarning(_("%s: This feature will be permanently removed in Scilab %s\n\n"), _("Warning"), "6.1.0");
+
             if (in.size() != 2)
             {
                 Scierror(77, _("%s: Wrong number of input arguments: %d expected.\n"), "xset", 2);
@@ -483,6 +516,8 @@ types::Function::ReturnValue sci_xset(types::typed_list &in, int _iRetCount, typ
         break;
         case 9 : // dashes
         {
+            Sciwarning(_("%s: This feature will be permanently removed in Scilab %s\n\n"), _("Warning"), "6.1.0");
+
             if (in.size() != 2)
             {
                 Scierror(77, _("%s: Wrong number of input arguments: %d expected.\n"), "xset", 2);
@@ -495,6 +530,8 @@ types::Function::ReturnValue sci_xset(types::typed_list &in, int _iRetCount, typ
         break;
         case 33 : // wresize
         {
+            Sciwarning(_("%s: This feature will be permanently removed in Scilab %s\n\n"), _("Warning"), "6.1.0");
+
             if (in.size() != 2)
             {
                 Scierror(77, _("%s: Wrong number of input arguments: %d expected.\n"), "xset", 2);
@@ -507,6 +544,8 @@ types::Function::ReturnValue sci_xset(types::typed_list &in, int _iRetCount, typ
         break;
         case 32 : // wpos
         {
+            Sciwarning(_("%s: This feature will be permanently removed in Scilab %s\n\n"), _("Warning"), "6.1.0");
+
             int figurePosition[2];
             if (in.size() != 2)
             {
@@ -524,6 +563,8 @@ types::Function::ReturnValue sci_xset(types::typed_list &in, int _iRetCount, typ
         case 31 : // wpdim
         case 28 : // wdim
         {
+            Sciwarning(_("%s: This feature will be permanently removed in Scilab %s\n\n"), _("Warning"), "6.1.0");
+
             int figureSize[2] = {0, 0};
             if (in.size() != 2 && in.size() != 3)
             {
@@ -554,6 +595,8 @@ types::Function::ReturnValue sci_xset(types::typed_list &in, int _iRetCount, typ
         break;
         case 27 : // viewport
         {
+            Sciwarning(_("%s: This feature will be permanently removed in Scilab %s\n\n"), _("Warning"), "6.1.0");
+
             if (in.size() != 3)
             {
                 Scierror(77, _("%s: Wrong number of input arguments: %d expected.\n"), "xset", 3);
@@ -570,6 +613,8 @@ types::Function::ReturnValue sci_xset(types::typed_list &in, int _iRetCount, typ
         break;
         case 18 : // line mode
         {
+            Sciwarning(_("%s: This feature will be permanently removed in Scilab %s\n\n"), _("Warning"), "6.1.0");
+
             if (in.size() != 2)
             {
                 Scierror(77, _("%s: Wrong number of input arguments: %d expected.\n"), "xset", 2);
index 2254567..ee1493c 100644 (file)
 
 // test xset and xget
 
-// font
-out = xget("font");
-assert_checkequal(out, [6 1]);
-
-// font size
-out = xget("font size");
-assert_checkequal(out, 1);
-
 // fpf
 out = xget("fpf");
 assert_checkequal(out, "");
@@ -25,78 +17,6 @@ xset("fpf", "%s.%s");
 out = xget("fpf");
 assert_checkequal(out, "%s.%s");
 
-// auto clear
-out = xget("auto clear");
-assert_checkequal(out, "off");
-
-// dashes
-out = xget("dashes");
-assert_checkequal(out, 1);
-xset("dashes", 2);
-out = xget("dashes");
-assert_checkequal(out, 2);
-
-// hidden3d
-out = xget("hidden3d");
-assert_checkequal(out, 4);
-
-// window figure
-f = gcf();
-out = xget("window");
-assert_checkequal(out, f.figure_id);
-out = xget("figure");
-assert_checkequal(out, f.figure_id);
-
-// wdim wpdim
-out = xget("wdim");
-assert_checkequal(out, f.figure_size);
-out = xget("wpdim");
-assert_checkequal(out, f.figure_size);
-
-// wpos
-out = xget("wpos");
-assert_checkequal(out, f.figure_position);
-
-// viewport
-out = xget("viewport");
-assert_checkequal(out, f.viewport);
-
-// background
-out = xget("background");
-assert_checkequal(out, -2);
-
-// color foreground pattern
-out = xget("color");
-assert_checkequal(out, -1);
-out = xget("foreground");
-assert_checkequal(out, -1);
-out = xget("pattern");
-assert_checkequal(out, -1);
-
-// lastpattern
-out = xget("lastpattern");
-assert_checkequal(out, 32);
-
-// line mode
-out = xget("line mode");
-assert_checkequal(out, 1);
-
-// white
-out = xget("white");
-assert_checkequal(out, 34);
-
-// wresize
-out = xget("wresize");
-assert_checkequal(out, 1);
-
-// clipgrf
-out = xget("clipgrf");
-assert_checkequal(out, 0);
-
-// clipoff
-out = xget("clipoff");
-assert_checkequal(out, 1);
-
 // XSET
 ierr = execstr("xset(""fpf"");","errcatch");
 assert_checkequal(ierr, 77);