~ubuntu-branches/ubuntu/hoary/scilab/hoary

« back to all changes in this revision

Viewing changes to macros/scicos/hilite_path.sci

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2005-01-09 22:58:21 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050109225821-473xr8vhgugxxx5j
Tags: 3.0-12
changed configure.in to build scilab's own malloc.o, closes: #255869

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
function hilite_path(path,mess,with_intermediates)
 
2
//hilite a block included in a superblock hierarchy and displays a
 
3
//message.   If required all the intermediate superblocs are displayed
 
4
//first entry of the path must be a bloc of currently opened diagram  
 
5
  if argn(2)<3 then with_intermediates=%f,end
 
6
  if argn(2)<2 then mess=' ',end
 
7
  scs_m;
 
8
  mxwin=maxi(winsid()),opened_windows=[]
 
9
  hilite_obj(scs_m.objs(path(1)))
 
10
  
 
11
  if with_intermediates then
 
12
    for k=2:size(path,'*')
 
13
      scs_m=scs_m.objs(path(k)).model.rpar;
 
14
      scs_show(scs_m,mxwin+k);opened_windows=[mxwin+k opened_windows]
 
15
      hilite_obj(scs_m.objs(path(k)))
 
16
    end
 
17
  else
 
18
    if size(path,'*')==1 then
 
19
      hilite_obj(scs_m.objs(path))
 
20
    else
 
21
      for k=1:size(path,'*')-1;scs_m=scs_m.objs(path(k)).model.rpar;end
 
22
      scs_show(scs_m,mxwin+1);opened_windows=[mxwin+1 opened_windows]
 
23
      hilite_obj(scs_m.objs(path($)))
 
24
    end
 
25
  end
 
26
  message(mess)
 
27
  xdel(opened_windows)
 
28
  scs_m=null()
 
29
  unhilite_obj(scs_m.objs(path(1)))
 
30
endfunction