2
xinfo('Click to open block or make a link')
6
[btn,%xc,%yc,%win_1,Cmenu]=cosclick()
11
Cmenu=%tableau(min(100,btn-31));%pt=[%xc;%yc];%win=%win_1
12
if Cmenu==emptystr() then
18
%xc=%pt(1);%yc=%pt(2);%win_1=%win;%pt=[]
22
if windows(find(%win_1==windows(:,2)),1)==100000 then
24
[%Path,%kk,ok]=whereintree(%Tree,%xc,%yc)
25
if ok&%kk<>[] then %Path($)=null();%Path($)=null();end
26
if ~ok then %kk=[],end
28
%kk=getobj(scs_m,[%xc;%yc])
32
super_path=[super_path,%kk]
33
[o,modified,newparametersb,needcompileb,editedb]=clickin(scs_m(%Path))
39
// in case previous window has been destroyed
40
if ~or(curwin==winsid()) then
41
xset('window',curwin);
44
if pixmap then xset('pixmap',1); end
47
if ~set_cmap(options('Cmap')) then // add colors if required
48
options('3D')(1)=%f //disable 3D block shape
50
if pixmap then xset('wwpc');end
52
%dr=driver();driver('Rec');
60
if pixmap then xset('wshow'),end
66
delmenu(curwin,'stop')
67
addmenu(curwin,'stop',list(1,'haltscicos'))
68
unsetmenu(curwin,'stop')
70
unsetmenu(curwin,'Simulate')
74
//end of redrawing deleted parent
76
if needcompileb==4 then
77
%kw=find(windows(:,1)==100000)
84
super_path($-size(%kk,2)+1:$)=[]
86
scs_m_save=scs_m;nc_save=needcompile
88
needcompile=max(needcompile,needcompileb)
90
scs_m=update_redraw_obj(scs_m,%Path,o)
94
//note if block parameters have been modified
95
if modified&~pal_mode then
97
newparameters=mark_newpars(%kk,newparametersb,newparameters)