1 // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2 // Copyright (C) 2010 - INRIA - Serge Steer <serge.steer@inria.fr>
4 // This file must be used under the terms of the CeCILL.
5 // This source file is licensed as described in the file COPYING, which
6 // you should have received as part of this distribution. The terms
7 // are also available at;
8 // http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
9 function datatipContextMenu(ax)
10 //datatip utility function
13 curve_handles=datatipGetEntities(ax);
14 [curve,dmin,ptmin,l]=datatipGetNearestEntity(pt,curve_handles)
15 if curve<>[]&dmin<10 then
16 ud=datatipGetStruct(curve);
17 items=[_("Delete all datatips")
18 _("Delete all datatips for the selected curve")
19 _("Delete nearest datatip")
20 _("Delete last datatip")
21 _("Delete selected datatip")
22 _("Open curve tip style editor")
23 _("Redraw all datatips")];
25 items=[_("Delete all datatips");
26 _("Delete selected datatip")];
28 sel=x_choose(items,"");
31 case _("Delete all datatips") then
32 datatipRemoveAll(curve_handles);
33 case _("Delete all datatips for the selected curve") then;
34 datatipRemoveAll(curve);
35 case _("Delete nearest datatip") then
36 datatipRemoveNearest(curve,pt);
37 case _("Delete last datatip") then
38 //l=size(ud.tips,'*');
39 l=size(ud.tips.children,"*");
41 datatipRemove(curve,1)
43 case _("Delete selected datatip") then
44 datatipDeleteSelected(curve_handles)
45 case _("Edit the curve tip display function") then
46 datatipSetDisplay(curve);
47 case _("select the curve tip display function") then
48 datatipSelectFunction(curve);
49 case _("Enable interpolation") then
50 datatipSetInterp(curve,%T);
51 case _("Disable interpolation") then
52 datatipSetInterp(curve,%F);
53 case _("Multiple datatips mode") then
54 datatipSetReplaceMode(curve,%F);
55 case _("Unique datatip mode") then
56 datatipSetReplaceMode(curve,%t);
57 case _("Open curve tip style editor") then
60 //datatipSetStyle(curve);