* datatipInitStruct removed 57/14257/3
Paul Bignier [Mon, 31 Mar 2014 12:53:07 +0000 (14:53 +0200)]
Change-Id: I79da3c430fe9d3be946b5f761798e9b55a5ea335

16 files changed:
scilab/CHANGES_5.5.X
scilab/modules/cacsd/macros/evans.sci
scilab/modules/graphics/demos/datatips/datatip2.sce
scilab/modules/graphics/help/en_US/datatips/datatipGetStruct.xml
scilab/modules/graphics/help/en_US/datatips/datatipInitStruct.xml [deleted file]
scilab/modules/graphics/help/ja_JP/datatips/datatipCreate.xml
scilab/modules/graphics/help/ja_JP/datatips/datatipGetStruct.xml
scilab/modules/graphics/help/ja_JP/datatips/datatipInitStruct.xml [deleted file]
scilab/modules/graphics/help/ja_JP/datatips/datatipSetStyle.xml
scilab/modules/graphics/help/ja_JP/datatips/datatips.xml
scilab/modules/graphics/macros/datatips/datatipEventhandler.sci
scilab/modules/graphics/macros/datatips/datatipInitStruct.sci [deleted file]
scilab/modules/graphics/macros/datatips/datatipSetGUI.sci
scilab/modules/graphics/macros/datatips/datatipSetStyle.sci
scilab/modules/graphics/macros/datatips/datatipsGUI.sci
scilab/modules/helptools/data/configuration/scilab_macros.txt

index 5b66bd8..22d6d4b 100644 (file)
@@ -204,6 +204,8 @@ Obsolete & Removed Functions
 
 * winclose removed. Please use close instead.
 
+* datatipInitStruct removed.
+
 * regress tagged as obsolete. Will be removed in Scilab 5.5.1.
   Please use reglin instead.
 
index c87f0ed..ab667bc 100644 (file)
@@ -204,7 +204,8 @@ function evans(n,d,kmax)
     E=gce();
 
     for k=1:size(E.children,"*")
-        datatipInitStruct(E.children(k),"formatfunction","formatEvansTip","K",kk)
+        E.children(k).display_function = "formatEvansTip";
+        E.children(k).display_function_data = kk;
     end
     c=captions(lhandle,legs($:-1:1),"in_upper_right")
     c.background=a.background;
@@ -216,15 +217,12 @@ function evans(n,d,kmax)
     end
 endfunction
 
-function str=formatEvansTip(curve,pt,index)
+function str=formatEvansTip(curve)
     //this function is called by the datatip mechanism to format the tip
     //string for the evans root loci curves
-    ud=curve.datatips;
-    if index<>[] then
-        K=ud.K(index)
-    else //interpolated
-        [d,ptp,i,c]=orth_proj(curve.data,pt)
-        K=ud.K(i)+(ud.K(i+1)-ud.K(i))*c
-    end
+    ud = curve.parent.display_function_data;
+    pt = curve.data(1:2);
+    [d,ptp,i,c]=orthProj(curve.parent.data, pt);
+    K=ud(i)+(ud(i+1)-ud(i))*c;
     str=msprintf("r: %.4g %+.4g i\nK: %.4g", pt,K);
 endfunction
index c4d9929..b25c48a 100644 (file)
@@ -27,7 +27,7 @@ function datatip2
     ax=gca();ax.rotation_angles=[70 50];ax.axes_visible="off";
     drawnow()
 
-    datatipInitStruct(c,"t",t)
+    c.display_function_data = t;
     datatipSetStyle(c,2,%f) //directional arrow no box
 
     function s=mydisp(curve,pt,index),
index 8b9896c..1052f91 100644 (file)
@@ -95,9 +95,6 @@
             <member>
                 <link linkend="datatipSetDisplay">datatipSetDisplay</link>
             </member>
-            <member>
-                <link linkend="datatipInitStruct">datatipInitStruct</link>
-            </member>
         </simplelist>
     </refsection>
 </refentry>
diff --git a/scilab/modules/graphics/help/en_US/datatips/datatipInitStruct.xml b/scilab/modules/graphics/help/en_US/datatips/datatipInitStruct.xml
deleted file mode 100644 (file)
index a323f63..0000000
+++ /dev/null
@@ -1,227 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Copyright (C) INRIA -  Serge Steer Serge.Steer@inria.fr
- * 
- * This file must be used under the terms of the CeCILL.
- * This source file is licensed as described in the file COPYING, which
- * you should have received as part of this distribution.  The terms
- * are also available at    
- * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
--->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="en_US" xml:id="datatipInitStruct">
-    <refnamediv>
-        <refname>datatipInitStruct</refname>
-        <refpurpose>
-            Initialize the datatip structure associated with the given polyline. <emphasis role="bold">Obsolete function. </emphasis>
-        </refpurpose>
-    </refnamediv>
-    <refsynopsisdiv>
-        <title>Calling Sequence</title>
-        <synopsis>ok=datatipInitStruct(curve_handle,varargin)</synopsis>
-    </refsynopsisdiv>
-    <refsection>
-        <title>Arguments</title>
-        <variablelist>
-            <varlistentry>
-                <term>curve_handle</term>
-                <listitem>
-                    <para>
-                        A handle on an entity compatible with datatips
-                    </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>varargin</term>
-                <listitem>
-                    <para>
-                        A sequence of pairs (&lt;field name&gt;,&lt;field value&gt;) used to
-                        add or customize fields of the datatips data structure.
-                    </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>ok</term>
-                <listitem>
-                    <para>
-                        notification flag. set to %f if the datatip structure
-                        cannot be stored in the curve user_data field.
-                    </para>
-                </listitem>
-            </varlistentry>
-        </variablelist>
-    </refsection>
-    <refsection>
-        <title>Description</title>
-        <para>
-            This function is called by <link linkend="datatipCreate">datatipCreate</link>to create a data
-            structure for tips stored in the polyline entity user_data
-            field.
-        </para>
-        <para>
-            This function as to be called only is one want to customize the
-            datatips data structure fields
-        </para>
-    </refsection>
-    <refsection>
-        <title>Datatip data structure</title>
-        <para>
-            The datatips data structure is a <literal>tlist</literal> of
-            type <literal>"datatips"</literal> with at least the following
-            fields.
-        </para>
-        <variablelist>
-            <varlistentry>
-                <term>interpolate</term>
-                <listitem>
-                    <para>
-                        A boolean, indicating if the tips position can be interpolated between mesh points or not.
-                    </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>replace</term>
-                <listitem>
-                    <para>
-                        A boolean, indicating if adding a new tip erases the others or not
-                    </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>style</term>
-                <listitem>
-                    <para>
-                        A two elements vector with integer values.
-                        <literal>style(1)</literal> is a number in <literal>[1
-                            2]
-                        </literal>
-                        that gives the datatips style,
-                        <literal>style(2)</literal> is a number in <literal>[0
-                            1]
-                        </literal>
-                        .If set to 1 the datatip text is boxed (see
-                        <link linkend="datatipSetStyle">datatipSetStyle</link>).
-                    </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>formatfunction</term>
-                <listitem>
-                    <para>
-                        A Scilab function, the function which is called to format
-                        the text that appears in the datatips. It as the
-                        following calling sequence:
-                        <literal>str=datatipDefaultDisplay(curve_handle,pt,index)</literal>
-                        where <literal>curve_handle</literal> is handle on the
-                        polyline or surface, <literal>pt</literal> is the
-                        coordinates of the point and <literal>index</literal> is
-                        the index of the point in the data or is empty in case of
-                        interpolated mode.
-                    </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>selected</term>
-                <listitem>
-                    <para>
-                        A scalar with integer value: the index of the selected datatip if any or 0.
-                    </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>tips</term>
-                <listitem>
-                    <para>
-                        An array of handles. Each of these points to a given tip
-                        on the curve. This field cannot be changed by the
-                        <literal>datatipInitStruct</literal> function.
-                    </para>
-                </listitem>
-            </varlistentry>
-        </variablelist>
-        <para>
-            Others fields can be added by the programmer to the datatips
-            data structure through the <literal>datatipInitStruct</literal>
-            <literal>varargin</literal> optional arguments.
-        </para>
-    </refsection>
-    <refsection role="see also">
-        <title>See Also</title>
-        <simplelist type="inline">
-            <member>
-                <link linkend="datatipCreate">datatipCreate</link>
-            </member>
-            <member>
-                <link linkend="datatips">datatips</link>
-            </member>
-        </simplelist>
-    </refsection>
-    <refsection>
-        <title>Examples</title>
-        <programlisting role="example"><![CDATA[
-    t=linspace(0,10,1000);
-    clf();
-    plot(t.*sin(t),t.*cos(t),1.5*t.*sin(t),1.5*t.*cos(1.5*t));
-    e=gce();
-    p1=e.children(1);//get the handle on the polyline
-    p2=e.children(2);//get the handle on the polyline
-
-
-    function str=mytipfmt(curve,pt,index)
-      ds=datatipGetStruct(curve)
-      if index<>[] then
-        t=ds.param(index);
-      else //interpolated
-        [d,ptp,i,c]=orthProj(curve.data,pt);
-        t=ds.param(i)+(ds.param(i+1)-ds.param(i))*c;
-      end
-      str=msprintf("%s\nt=%-0.3g",ds.name,t);
-    endfunction
-
-    ok=datatipInitStruct(p1,"formatfunction","mytipfmt","param",t,"name","curve");
-    ok=datatipInitStruct(p2,"formatfunction","mytipfmt","param",t,"name","spiral","style",[2 0]);
-
-    datatipCreate(p1,500);
-    datatipCreate(p1,900);
-    datatipCreate(p2,750);
-
-    ]]></programlisting>
-        <!--        <scilab:image><![CDATA[
-    t=linspace(0,10,1000);
-    plot(t.*sin(t),t.*cos(t),1.5*t.*sin(t),1.5*t.*cos(1.5*t));
-    e=gce();
-    p1=e.children(1);//get the handle on the polyline
-    p2=e.children(2);//get the handle on the polyline
-
-
-    function str=mytipfmt(curve,pt,index)
-      ds=datatipGetStruct(curve)
-      if index<>[] then
-        t=ds.param(index);
-      else //interpolated
-        [d,ptp,i,c]=orthProj(curve.data,pt);
-        t=ds.param(i)+(ds.param(i+1)-ds.param(i))*c;
-      end
-      str=msprintf("%s\nt=%-0.3g",ds.name,t);
-    endfunction
-
-    ok=datatipInitStruct(p1,"formatfunction","mytipfmt","param",t,"name","curve");
-    ok=datatipInitStruct(p2,"formatfunction","mytipfmt","param",t,"name","spiral","style",[2 0]);
-
-    datatipCreate(p1,500);
-    datatipCreate(p1,900);
-    datatipCreate(p2,750);
-
-            ]]></scilab:image>-->
-    </refsection>
-    <refsection>
-        <title>History</title>
-        <revhistory>
-            <revision>
-                <revnumber>5.4.1</revnumber>
-                <revdescription>
-                    Function tagged obsolete. Will be removed in 5.5.0.
-                </revdescription>
-            </revision>
-        </revhistory>
-    </refsection>
-</refentry>
index d514733..0a12c06 100644 (file)
@@ -1,11 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  * Copyright (C) INRIA -  Serge Steer Serge.Steer@inria.fr
- * 
+ *
  * This file must be used under the terms of the CeCILL.
  * This source file is licensed as described in the file COPYING, which
  * you should have received as part of this distribution.  The terms
- * are also available at    
+ * are also available at
  * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
 -->
 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="ja" xml:id="datatipCreate">
@@ -87,9 +87,6 @@
         <title>参照</title>
         <simplelist type="inline">
             <member>
-                <link linkend="datatipInitStruct">datatipInitStruct</link>
-            </member>
-            <member>
                 <link linkend="datatips">datatips</link>
             </member>
             <member>
index 73bbbdd..42ef882 100644 (file)
@@ -1,11 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  * Copyright (C) INRIA -  Serge Steer Serge.Steer@inria.fr
- * 
+ *
  * This file must be used under the terms of the CeCILL.
  * This source file is licensed as described in the file COPYING, which
  * you should have received as part of this distribution.  The terms
- * are also available at    
+ * are also available at
  * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
 -->
 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="ja" xml:id="datatipGetStruct">
@@ -26,7 +26,7 @@
                 <term>curve_handle</term>
                 <listitem>
                     <para>
-                        曲線または曲面のハンドル. 
+                        曲線または曲面のハンドル.
                     </para>
                 </listitem>
             </varlistentry>
@@ -82,9 +82,6 @@
             <member>
                 <link linkend="datatipSetDisplay">datatipSetDisplay</link>
             </member>
-            <member>
-                <link linkend="datatipInitStruct">datatipInitStruct</link>
-            </member>
         </simplelist>
     </refsection>
 </refentry>
diff --git a/scilab/modules/graphics/help/ja_JP/datatips/datatipInitStruct.xml b/scilab/modules/graphics/help/ja_JP/datatips/datatipInitStruct.xml
deleted file mode 100644 (file)
index baf3795..0000000
+++ /dev/null
@@ -1,148 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Copyright (C) INRIA -  Serge Steer Serge.Steer@inria.fr
- * 
- * This file must be used under the terms of the CeCILL.
- * This source file is licensed as described in the file COPYING, which
- * you should have received as part of this distribution.  The terms
- * are also available at    
- * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
--->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="ja" xml:id="datatipInitStruct">
-    <refnamediv>
-        <refname>datatipInitStruct</refname>
-        <refpurpose>指定したポリラインに関するdatatip構造体を初期化する. </refpurpose>
-    </refnamediv>
-    <refsynopsisdiv>
-        <title>呼び出し手順</title>
-        <synopsis>ok=datatipInitStruct(curve_handle,varargin)</synopsis>
-    </refsynopsisdiv>
-    <refsection>
-        <title>パラメータ</title>
-        <variablelist>
-            <varlistentry>
-                <term>curve_handle</term>
-                <listitem>
-                    <para>
-                        datatipsと互換性があるエンティティのハンドル
-                    </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>varargin</term>
-                <listitem>
-                    <para>
-                        datatipsデータ構造体のフィールドを追加またはカスタマイズする際に使用される
-                        一連の対(&lt;field name&gt;,&lt;field value&gt;)
-                    </para>
-                </listitem>
-            </varlistentry>
-        </variablelist>
-    </refsection>
-    <refsection>
-        <title>説明</title>
-        <para>
-            この関数は,polylineエンティティのuser_sataフィールドに保存されるtips用の
-            データ構造体を作成する際に
-            <link linkend="datatipCreate">datatipCreate</link>によりコールされます.
-        </para>
-        <para>
-            この関数をコールするのは,datatipsデータ構造体フィールドをカスタマイズしたいユーザ
-            のみです.
-        </para>
-    </refsection>
-    <refsection>
-        <title>datatip データ構造体</title>
-        <para>
-            datatipsデータ構造体は少なくとも以下のフィールドを有する<literal>"datatips"</literal>
-            型の<literal>tlist</literal> です.
-        </para>
-        <variablelist>
-            <varlistentry>
-                <term>interpolate</term>
-                <listitem>
-                    <para>
-                        論理値で, tipsの位置をメッシュ点の間で補間するかどうかを指定します.
-                    </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>replace</term>
-                <listitem>
-                    <para>
-                        論理値で,新しいtipを追加する際に他のtipを消去するかどうかを指定します.
-                    </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>formatfunction</term>
-                <listitem>
-                    <para>
-                        Scilab関数で, datatipsに表示されるテキストを整形する際に
-                        コールされます.この関数は以下のようにコールされます:
-                        <literal>str=datatipDefaultDisplay(curve_handle,pt,index)</literal>
-                        ただし, <literal>curve_handle</literal> はポリラインまたは曲面のハンドル, 
-                        <literal>pt</literal> は点の座標, <literal>index</literal> は
-                        データの中の点のインデックス(補間モードの場合は空)です.
-                    </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>tips</term>
-                <listitem>
-                    <para>
-                        ハンドルの配列. これらの各々は曲線の指定されたtipを指します.
-                    </para>
-                </listitem>
-            </varlistentry>
-        </variablelist>
-        <para>
-            プログラマは,オプション引数<literal>datatipInitStruct</literal>
-            <literal>varargin</literal>により
-            他のフィールドをdatatipsデータ構造体に追加することが
-            できます.
-        </para>
-    </refsection>
-    <refsection role="see also">
-        <title>参照</title>
-        <simplelist type="inline">
-            <member>
-                <link linkend="datatipCreate">datatipCreate</link>
-            </member>
-            <member>
-                <link linkend="datatips">datatips</link>
-            </member>
-        </simplelist>
-    </refsection>
-    <refsection>
-        <title>例</title>
-        <programlisting role="example"><![CDATA[
-    t=linspace(0,10,1000);
-    clf();
-    plot(t.*sin(t),t.*cos(t),1.5*t.*sin(t),1.5*t.*cos(1.5*t));
-    e=gce();
-    p1=e.children(1);//ポリラインのハンドルを取得
-    p2=e.children(2);//ポリラインのハンドルを取得
-
-
-    function str=mytipfmt(curve,pt,index)
-      ds=datatipGetStruct(curve)
-      if index<>[] then
-        t=ds.param(index);
-      else //interpolated
-        [d,ptp,i,c]=orthProj(curve.data,pt);
-        t=ds.param(i)+(ds.param(i+1)-ds.param(i))*c;
-      end
-      str=msprintf("%s\nt=%-0.3g",ds.name,t);
-    endfunction
-
-    ok=datatipInitStruct(p1,"formatfunction","mytipfmt","param",t,"name","spiral");
-    ok=datatipInitStruct(p2,"formatfunction","mytipfmt","param",t,"name","curve");
-
-    datatipCreate(p1,500);
-    datatipCreate(p1,900);
-    datatipCreate(p2,750);
-
-    ]]></programlisting>
-    </refsection>
-</refentry>
index 23010ab..c3aca70 100644 (file)
             <member>
                 <link linkend="datatipCreate">datatipCreate</link>
             </member>
-            <member>
-                <link linkend="datatipInitStruct">datatipInitStruct</link>
-            </member>
         </simplelist>
     </refsection>
     <refsection>
index 8cc2e98..7402c0f 100644 (file)
@@ -1,11 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  * Copyright (C) INRIA -  Serge Steer Serge.Steer@inria.fr
- * 
+ *
  * This file must be used under the terms of the CeCILL.
  * This source file is licensed as described in the file COPYING, which
  * you should have received as part of this distribution.  The terms
- * are also available at    
+ * are also available at
  * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
 -->
 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="ja" xml:id="datatips">
     t=datatipCreate(p2,[0.1,0]);
     t=datatipCreate(p2,[0.8 0.4]);
     datatipSetOrientation(t,"upper left")
-  
+
     function str=myfmt(curve,pt,index)
       str = msprintf('sinc\n%s', sci2exp(round(pt*10)/10))
     endfunction
     datatipSetDisplay(p1,myfmt) //エディタで関数を修正し,ok
-    
+
      ]]></programlisting>
         <programlisting role="example"><![CDATA[
     // 3D 曲線の場合
@@ -89,7 +89,7 @@
     t=datatipCreate(p,50);
     datatipSetOrientation(t,"lower right")
     datatipCreate(p,[0,-1.1,1.1]);
-    
+
      ]]></programlisting>
     </refsection>
     <refsection role="see also">
@@ -99,9 +99,6 @@
                 <link linkend="datatipToggle">datatipToggle</link>
             </member>
             <member>
-                <link linkend="datatipInitStruct">datatipInitStruct</link>
-            </member>
-            <member>
                 <link linkend="datatipCreate">datatipCreate</link>
             </member>
             <member>
index 5c53c8b..535a805 100644 (file)
@@ -97,7 +97,6 @@ function datatipEventhandler(win,x,y,ibut)
             //an existing tip at this point
             ud=datatipGetStruct(curve);// the curve datatips data structure
             if typeof(ud)<>"datatips" then;
-                datatipInitStruct(curve);
                 ud=datatipGetStruct(curve);
             end
             if ud.replace&ud.tips.children<>[] then
@@ -276,7 +275,6 @@ function datatipSetReplaceMode(curve_handle,m)
 
     ud=datatipGetStruct(curve_handle);
     if typeof(ud)<>"datatips" then;
-        datatipInitStruct(curve_handle);
         ud=datatipGetStruct(curve_handle);
     end
     ud.replace=m;
diff --git a/scilab/modules/graphics/macros/datatips/datatipInitStruct.sci b/scilab/modules/graphics/macros/datatips/datatipInitStruct.sci
deleted file mode 100644 (file)
index c2a6785..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-// Copyright (C) 2010 - INRIA - Serge Steer <serge.steer@inria.fr>
-//
-// This file must be used under the terms of the CeCILL.
-// This source file is licensed as described in the file COPYING, which
-// you should have received as part of this distribution.  The terms
-// are also available at;
-// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
-
-function ok=datatipInitStruct(curve_handle,varargin)
-    //This function is used to initialize the data structure dedicated to
-    //data tips handling.;
-    //The data structure is a tlist attached to the polyline entity
-    // curve_handle : a handle on a polyline, the parent of the datatips data structure
-    // varargin     : a list containing a sequence of pairs;
-    //               (<property name), <property value>);
-    if argn(2)<1 then
-        error(msprintf(_("%s: Wrong number of input argument(s): At least %d expected.\n"),"datatipInitStruct",1))
-    end
-    if type(curve_handle)<>9|size(curve_handle,"*")<>1|curve_handle.type<>"Polyline" then
-        error(msprintf(_("%s: Wrong type for input argument #%d: A ''%s'' handle expected.\n"),"datatipInitStruct",1,"Polyline"))
-    end
-    ok=%t;
-    ud=curve_handle.datatips;
-    if typeof(ud)<>"datatips" then
-        //Create structure and set  default values
-        ud=tlist(["datatips","style","interpolate","replace", "formatfunction",      "tips","selected"],..
-        [1 1 1],     %t,          %t,      datatipDefaultDisplay,  [],      0);
-    end
-    //loop on argument pairs
-    for k=1:2:size(varargin)
-        key=varargin(k)
-        wh=find(key==["interpolate","replace","formatfunction","style","selected"])
-        if wh==[] then  ud(1)=[ud(1) key];end //add a new property
-
-        select key
-        case "style" then
-            style=varargin(k+1)
-            if type(style)<>1|~isreal(style) then
-                error(msprintf(_("%s: Wrong type for input argument #%d: Real matrix expected.\n"),..
-                "datatipInitStruct",k+1))
-            end
-            if size(style,"*")<>2 then
-                error(msprintf(_("%s: Wrong size for input argument #%d: A %d elements array expected.\n"),..
-                "datatipInitStruct",k+1,2))
-            end
-            if and(style(1)<>[1 2]) then
-                error(msprintf(_("%s: Wrong value for input argument #%d(1): Must be between %d and %d.\n"),..
-                "datatipInitStruct",k+1,1,2))
-            end
-            if and(style(2)<>[0 1]) then
-                error(msprintf(_("%s: Wrong value for input argument #%d(2): Must be between %d and %d.\n"),..
-                "datatipInitStruct",k+1,0,1))
-
-            end
-            ud(key)=style
-        case "interpolate" then
-            interpolate=varargin(k+1)
-            if type(interpolate)<>4|size(interpolate,"*")<>1 then
-                error(msprintf(_("%s: Wrong type for input argument #%d: A boolean expected.\n"),..
-                "datatipInitStruct",k+1))
-            end
-            ud(key)=interpolate
-        case "replace" then
-            replace=varargin(k+1)
-            if type(replace)<>4|size(replace,"*")<>1 then
-                error(msprintf(_("%s: Wrong type for input argument #%d: A boolean expected.\n"),..
-                "datatipInitStruct",k+1))
-            end
-            ud(key)=replace
-        case "formatfunction" then
-            if exists(varargin(k+1))==1 then
-                ffun=eval(varargin(k+1))
-                if or(type(ffun)==[11 13]) then
-                    ud(key)=eval(varargin(k+1))
-                else
-                    ud(key)=datatipDefaultDisplay
-                end
-            else
-                ud(key)=datatipDefaultDisplay
-            end
-        case "selected"
-            selected=varargin(k+1)
-            if type(selected)<>1|~isreal(selected)|size(selected,"*")<>1|selected<0 then
-                error(msprintf(_("%s: Wrong type for input argument #%d: Non-negative int expected.\n"),..
-                "datatipInitStruct",k+1))
-            end
-            ud(key)=selected
-        else
-            //user defined property (no tests)
-            ud(key)=varargin(k+1)
-        end
-    end
-    ok=datatipSetStruct(curve_handle,ud)
-endfunction
index 24dd3d9..4a936f5 100644 (file)
@@ -13,9 +13,6 @@ function datatipSetGUI()
     ud=datatipGetStruct(datatipGUICurve)
     if typeof(ud)<>"datatips" then
         //no datatips structure yet, initialize it
-        if ~datatipInitStruct(curve) then
-            return
-        end
         ud=datatipGetStruct(curve)
     end
     style=ud.style
index 4c646d8..eb9eda2 100644 (file)
@@ -61,7 +61,6 @@ function datatipSetStyle(curve_handle,t,boxed,labeled)
 
     ud=datatipGetStruct(curve_handle)
     if typeof(ud)<>"datatips" then;
-        datatipInitStruct(curve_handle)
         ud=datatipGetStruct(curve_handle)
     end
     if or(ud.style<>style) then
index 0d03a55..ca45db0 100644 (file)
@@ -34,9 +34,6 @@ function datatipsGUI(curve_handle)
     ud=datatipGetStruct(datatipGUICurve)
     if typeof(ud)<>"datatips" then
         //no datatips structure yet, initialize it
-        if ~datatipInitStruct(curve) then
-            return
-        end
         ud=datatipGetStruct(curve)
     end
     style=ud.style
index 0372c5f..4dd1a93 100644 (file)
@@ -1918,7 +1918,6 @@ datatipGetEntities
 datatipGetSelected
 datatipGetStruct
 datatipHilite
-datatipInitStruct
 datatipManagerMode
 datatipMove
 datatipRadioCallback