0
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1 function g_KeepResultCallback(hObject,varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
2 % Whenever the user clicks on the checkbox to maintain local results.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
3
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
4 global selBlocks
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
5
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
6 switch get(hObject,'Value')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
7 case 0
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
8 % Cycle to restore proper color
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
9 [meth,clas] = strtok(get_param(gcbh,'Tag'),' ');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
10 infoObj = eval([clas,'.getInfo(''',getappdata(0,'ltpda_currFunctionName'),''')']);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
11 switch infoObj.mcategory
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
12 case 'Constructor'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
13 for kk=1:length(selBlocks)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
14 try %#ok<ALIGN>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
15 set_param(selBlocks(kk),'Backgroundcolor','green')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
16 set_param(selBlocks(kk),'MaskHelp','')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
17 catch, end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
18 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
19 case 'Output'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
20 for kk=1:length(selBlocks)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
21 try %#ok<ALIGN>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
22 set_param(selBlocks(kk),'Backgroundcolor','lightBlue')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
23 set_param(selBlocks(kk),'MaskHelp','')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
24 catch, end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
25 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
26 otherwise
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
27 for kk=1:length(selBlocks)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
28 try %#ok<ALIGN>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
29 set_param(selBlocks(kk),'Backgroundcolor','red')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
30 set_param(selBlocks(kk),'MaskHelp','')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
31 catch, end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
32 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
33 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
34 case 1
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
35 for kk=1:length(selBlocks)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
36 try %#ok<ALIGN>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
37 set_param(selBlocks(kk),'Backgroundcolor','magenta');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
38 set_param(selBlocks(kk),'MaskHelp','probe');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
39 catch, end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
40 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
41 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
42 end
|