obsolete files removed
Serge Steer [Fri, 13 Jun 2008 12:45:32 +0000 (12:45 +0000)]
scilab/modules/metanet/macros/editor/ge_add_node.sci [deleted file]
scilab/modules/metanet/macros/editor/ge_add_node_copy.sci [deleted file]
scilab/modules/metanet/macros/editor/ge_do_copy.sci [deleted file]
scilab/modules/metanet/macros/editor/ge_do_copy_region.sci [deleted file]
scilab/modules/metanet/macros/editor/ge_do_region2node.sci [deleted file]
scilab/modules/metanet/macros/editor/ge_drawnodes.sci [deleted file]
scilab/modules/metanet/macros/editor/ge_drawobjs.sci [deleted file]

diff --git a/scilab/modules/metanet/macros/editor/ge_add_node.sci b/scilab/modules/metanet/macros/editor/ge_add_node.sci
deleted file mode 100644 (file)
index 878079c..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-
-// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-// Copyright (C) 2002-2008 - 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-en.txt
-
-function GraphList=ge_add_node(GraphList,node_x,node_y)
-  n=size(GraphList.node_x,'*')+1
-  GraphList.node_name(1,n)=""
-  GraphList.node_type(1,n)=0;
-  GraphList.node_x(1,n)=node_x
-  GraphList.node_y(1,n)=node_y
-  GraphList.node_color(1,n)=1;
-  GraphList.node_diam(1,n)=0
-  GraphList.node_border(1,n)=0
-  GraphList.node_font_size(1,n)=0
-  GraphList.node_demand(1,n)=0;
-  GraphList.node_label(1,n)='';
-  ge_drawnodes(n) 
-  ge_add_history(list('add_node',n))
-endfunction
diff --git a/scilab/modules/metanet/macros/editor/ge_add_node_copy.sci b/scilab/modules/metanet/macros/editor/ge_add_node_copy.sci
deleted file mode 100644 (file)
index c4629a3..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-
-// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-// Copyright (C) 2002-2008 - 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-en.txt
-
-function GraphList=ge_add_node_copy(GraphList,K)
-  for k=matrix(K,1,-1)
-    for f=ge_node_fields()
-      GraphList(f)($+1)=GraphList(f)(k)
-    end
-  end
-endfunction
diff --git a/scilab/modules/metanet/macros/editor/ge_do_copy.sci b/scilab/modules/metanet/macros/editor/ge_do_copy.sci
deleted file mode 100644 (file)
index da8886f..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-
-// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-// Copyright (C) 2002-2008 - 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-en.txt
-
-function GraphList=ge_do_copy(GraphList,xc,yc)
-  k=ge_getnode(GraphList,[xc;yc])
-  if k==[] then return,end
-  
-  rep(3)=-1
-  dr=driver()
-  x_save=GraphList.node_x(k)
-  y_save=GraphList.node_y(k)
-  if dr=='Rec' then driver('X11'),end
-  ge_drawnodes(k) //erase
-  if xget('pixmap') then xset('wshow'),end
-  while rep(3)==-1 then //move loop
-                       // get new position
-                       rep=xgetmouse(0)
-                       ge_drawnodes(k) //redraw
-                       if xget('pixmap') then xset('wshow'),end
-
-                       GraphList.node_x(k)=rep(1);
-                       GraphList.node_y(k)=rep(2);
-                       ge_drawnodes(k) //redraw
-                       if xget('pixmap') then xset('wshow'),end
-  end
-
-  if rep(3)==2 then //cancel
-    ge_drawnodes(k) //erase
-    GraphList.node_x(k)=x_save
-    GraphList.node_y(k)=y_save
-    ge_drawnodes(k) 
-    if xget('pixmap') then xset('wshow'),end
-    driver(dr)
-    return
-  end
-  //add
-  ge_drawnodes(k) //erase
-  GraphList=ge_add_node_copy(GraphList,k)
-  driver(dr);ge_drawnodes(size(GraphList.node_x,'*')) //redraw and record
-  edited=return(%t)
-
-endfunction
-
diff --git a/scilab/modules/metanet/macros/editor/ge_do_copy_region.sci b/scilab/modules/metanet/macros/editor/ge_do_copy_region.sci
deleted file mode 100644 (file)
index cbaa522..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-
-// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-// Copyright (C) 2002-2008 - 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-en.txt
-
-function GraphList=ge_do_copy_region(GraphList,xc,yc)
-       
-       ge_disablemenus();
-       
-       f      = gcf();
-       curwin = f.figure_id;
-       
-       [reg,rect]=ge_get_region(xc,yc,curwin);
-       
-       if rect==[] then ge_enablemenus();return,end
-       
-       modified=length(reg)>1
-       
-       xinfo('Drag to destination position and click (left to fix, right to cancel)')
-       rep(3)=-1
-       yc=yc-rect(4)
-       dr=driver()
-       if dr=='Rec' then driver('X11'),end
-       pat=xget('pattern')
-       xset('pattern',0)
-       //move loop
-       while rep(3)==-1 then 
-               // draw region shape
-               xrect(xc,yc+rect(4),rect(3),rect(4))
-               if xget('pixmap') then xset('wshow'),end
-               // get new position
-               rep=xgetmouse()
-               // erase block shape
-               xrect(xc,yc+rect(4),rect(3),rect(4))
-               if xget('pixmap') then xset('wshow'),end
-               xc=rep(1);yc=rep(2)
-               xy=[xc,yc];
-       end
-       
-       driver(dr);xset('pattern',pat)
-       if rep(3)==2 then ge_enablemenus();driver(dr),return,end
-       
-       nold=size(GraphList.node_x,'*')
-       reg.node_x=reg.node_x-rect(1)+xc
-       reg.node_y=reg.node_y-rect(2)+yc
-       ge_drawobjs(reg)
-       for k=1:size(reg.node_x,'*')
-               for f=ge_node_fields(),GraphList(f)($+1)=reg(f)(k),end
-       end
-       reg.head=reg.head+nold
-       reg.tail=reg.tail+nold
-       for k=1:size(reg.head,'*')
-               for f=ge_arc_fields(),GraphList(f)($+1)=reg(f)(k),end
-       end
-       ge_enablemenus()
-       edited=resume(%t)
-
-endfunction
diff --git a/scilab/modules/metanet/macros/editor/ge_do_region2node.sci b/scilab/modules/metanet/macros/editor/ge_do_region2node.sci
deleted file mode 100644 (file)
index 4a1ceba..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-
-// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-// Copyright (C) 2002-2008 - 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-en.txt
-
-function GraphList=ge_do_region2node(GraphList,xc,yc)
-  ge_disablemenus()
-  [rect,btn]=ge_get_rectangle([xc,yc])
-  if btn==2 then  ge_enablemenus();return;end
-  [del,keep]=ge_get_nodes_in_rect(GraphList,rect);
-  
-  modified=del<>[]
-  if ~modified then return,end
-  
-  
-  [in,out]=ge_get_nodes_in_rect(GraphList,rect);
-  if in==[] then return,end
-  GraphList_save=GraphList
-
-  del_arcs=[];//arcs completly in in
-  for k=1:size(GraphList.head,'*')
-    if or(GraphList.tail(k)==in)&or(GraphList.head(k)==in) then
-      del_arcs=[del_arcs,k];
-    end
-  end
-  ox=rect(1);oy=rect(2),w=rect(3);h=rect(4)
-  ge_drawobjs(GraphList,in,del_arcs) //erase
-  GraphList=ge_delete_arc(GraphList,del_arcs)
-  GraphList=ge_delete_node(GraphList,in)
-  GraphList=ge_add_node(GraphList,ox+w/2,oy-h/2)
-  n=size(GraphList.node_x,'*')
-
-  // arcs passing through the rectangle
-  mod_arcs=[]
-  for k=1:size(GraphList.head,'*')
-    if or(GraphList.tail(k)==in) then
-      GraphList.tail(k)=n
-      mod_arcs=[mod_arcs k]
-    elseif or(GraphList.head(k)==in) then
-      GraphList.head(k)=n
-      mod_arcs=[mod_arcs k]
-    end
-  end
-  ge_drawobjs(GraphList,n,mod_arcs) //draw new node and arcs
-
-  edited=resume(%t)
-endfunction
diff --git a/scilab/modules/metanet/macros/editor/ge_drawnodes.sci b/scilab/modules/metanet/macros/editor/ge_drawnodes.sci
deleted file mode 100644 (file)
index cf9aa85..0000000
+++ /dev/null
@@ -1,181 +0,0 @@
-
-// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-// Copyright (C) 2002-2008 - 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-en.txt
-
-function ge_drawnodes(sel)
-
-  thick=xget("thickness")
-  if or(type(sel)==[2 129]) then 
-    sel=horner(sel,size(GraphList.node_x,'*')),
-  elseif size(sel,1)==-1 then 
-    sel=1:size(GraphList.node_x,'*'),
-  end
-  t=GraphList.node_type(sel)
-  tu=unique(t)
-  for tu=unique(t)
-    execstr('ge_drawnodes_'+string(tu)+'(sel(t==tu))')
-  end
-  if xget('pixmap') then xset('wshow'),end
-  xset("thickness",thick)
-endfunction
-
-function ge_drawnodes_0(sel)
-  d=matrix(GraphList.node_diam(sel),1,-1)
-  if d==[] then return,end
-  d(d==0)=GraphList.default_node_diam;
-  x=matrix(GraphList.node_x(sel),1,-1)
-  y=matrix(GraphList.node_y(sel),1,-1)
-  b=matrix(GraphList.node_border(sel),1,-1)
-  b(b==0)=GraphList.default_node_border
-  c=matrix(GraphList.node_color(sel),1,-1)
-  arcs=[x-d/2
-       y+d/2
-       d
-       d
-       0*d
-       360*64*ones(d)];
-  for bu=unique(b)
-    k=find(b==bu)
-    xset("thickness",bu)
-    xarcs(arcs(:,k),c(k));
-  end
-  
-  Ids=ge_get_nodes_id(sel)
-  if Ids<>[] then//ge_draw the node identification
-    f=GraphList.node_font_size(sel)
-    f(f==0)=GraphList.default_font_size
-
-    for k=1:size(d,'*')
-      xset("font size",ge_font(f(k)))
-      r=xstringl(0,0,Ids(k))
-      xstring(x(k)-r(3)/2,y(k)-d(k)/2-r(4)*1.5,Ids(k))
-    end
-  end
-endfunction
-
-function ge_drawnodes_2(sel)
-  //PLOT OF SOURCE NODES
-  d=matrix(GraphList.node_diam(sel),1,-1)
-  if d==[] then return,end
-   d(d==0)=GraphList.default_node_diam;
-  b=matrix(GraphList.node_border(sel),1,-1)
-  b(b==0)=GraphList.default_node_border
-  c=matrix(GraphList.node_color(sel),1,-1)
-  x=matrix(GraphList.node_x(sel),1,-1)
-  y=matrix(GraphList.node_y(sel),1,-1)
-  arcs=[x-d/2
-       y+d/2
-       d
-       d
-       0*d
-       360*64*ones(d)];
-  vx=[-1/2;-1/2;-3/4;-1;0;+1;+3/4;+1/2;+1/2;-1/2]
-  vy=[1/2;3/2;1;1;5/2;1;1;3/2;1/2;1/2];
-  for bu=unique(b)
-    k=find(b==bu)
-    xset("thickness",bu)
-    xarcs(arcs(:,k),c(k));
-    xpolys(ones(10,1)*x+vx*d(k),ones(10,1)*y+vy*d(k),max(c(k),1))
-  end
-  
-  Ids=ge_get_nodes_id(sel)
-  if Ids<>[] then//draw the node identification
-    f=GraphList.node_font_size(sel)
-    f(f==0)=GraphList.default_font_size
-
-    for k=1:size(d,'*')
-      xset("font size",ge_font(f(k)))
-      r=xstringl(0,0,Ids(k))
-      xstring(x(k)-r(3)/2,y(k)-d(k)/2-r(4)*1.5,Ids(k))
-    end
-  end
-
-endfunction
-
-function ge_drawnodes_1(sel)
-  //   PLOT OF SINK NODES
-  d=matrix(GraphList.node_diam(sel),1,-1)
-  if d==[] then return,end
-  d(d==0)=GraphList.default_node_diam;
-  b=matrix(GraphList.node_border(sel),1,-1)
-  b(b==0)=GraphList.default_node_border
-  c=matrix(GraphList.node_color(sel),1,-1)
-  x=matrix(GraphList.node_x(sel),1,-1)
-  y=matrix(GraphList.node_y(sel),1,-1)
-  arcs=[x-d/2
-       y+d/2
-       d
-       d
-       0*d
-       360*64*ones(d)];
-  vx=[-1/2;-1/2;-3/4;-1;0;+1;+3/4;+1/2;+1/2;-1/2]
-  vy=[1/2;3/2;1;1;5/2;1;1;3/2;1/2;1/2]-3;
-  for bu=unique(b)
-    k=find(b==bu)
-    xset("thickness",bu)
-    xarcs(arcs(:,k),c(k));
-    xpolys(ones(10,1)*x+vx*d(k),ones(10,1)*y+vy*d(k),max(c(k),1))
-  end
-  
-  Ids=ge_get_nodes_id(sel)
-  if Ids<>[] then//draw the node identification
-    f=GraphList.node_font_size(sel)
-    f(f==0)=GraphList.default_font_size
-    
-    for k=1:size(d,'*')
-      xset("font size",ge_font(f(k)))
-      r=xstringl(0,0,Ids(k))
-      xstring(x(k)-r(3)/2,y(k)+d(k)/2+r(4)*0.5,Ids(k))
-    end
-  end
-endfunction
-
-function ge_drawnodes_3(sel,id)
-  //   PLOT OF Square NODES
-  d=matrix(GraphList.node_diam(sel),1,-1)/2
-  if d==[] then return,end
-  d(d==0)=GraphList.default_node_diam;  
-  b=matrix(GraphList.node_border(sel),1,-1)
-  b(b==0)=GraphList.default_node_border
-  c=matrix(GraphList.node_color(sel),1,-1)
-  x=matrix(GraphList.node_x(sel),1,-1)
-  y=matrix(GraphList.node_y(sel),1,-1)
-  r=[x-d/2;
-     y+d/2;
-     d;
-     d];
-  for bu=unique(b)
-    k=find(b==bu)
-    xset("thickness",bu)
-    xrects(r(:,k),-c(k));
-  end
-  
-  Ids=ge_get_nodes_id(sel)
-  if Ids<>[] then//draw the node identification
-    f=GraphList.node_font_size(sel)
-    f(f==0)=GraphList.default_font_size
-    for k=1:size(d,'*')
-      xset("font size",ge_font(f(k)))
-      r=xstringl(0,0,Ids(k))
-      xstring(x(k)-r(3)/2,y(k)-d(k)/2-r(4)*1.5,Ids(k))
-    end
-  end
-
-endfunction
-
-function Ids=ge_get_nodes_id(sel)
-  //EGdata and GraphList are passed by context
-  Ids=[]
-  select EGdata.NodeId
-    case 1 then Ids=string(sel)
-    case 2 then Ids=GraphList.node_name(sel)
-    case 3 then Ids=string(GraphList.node_demand(sel))
-    case 4 then Ids=string(GraphList.node_label(sel))
-  end
-endfunction
diff --git a/scilab/modules/metanet/macros/editor/ge_drawobjs.sci b/scilab/modules/metanet/macros/editor/ge_drawobjs.sci
deleted file mode 100644 (file)
index 9fd114a..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-
-// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-// Copyright (C) 2002-2008 - 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-en.txt
-
-
-function ge_drawobjs(GraphList,nodesel,arcsel)
-  
-  if exists('nodesel','local')==0 then nodesel=:,end
-  if exists('arcsel','local')==0 then arcsel=:,end
-  
-  ge_drawtitle(GraphList.name)
-  ge_drawarcs(arcsel)
-  ge_drawnodes(nodesel)
-endfunction
-