File: do_exit.sci

package info (click to toggle)
scilab 2.4-1
  • links: PTS
  • area: non-free
  • in suites: potato, slink
  • size: 55,196 kB
  • ctags: 38,019
  • sloc: ansic: 231,970; fortran: 148,976; tcl: 7,099; makefile: 4,585; sh: 2,978; csh: 154; cpp: 101; asm: 39; sed: 5
file content (48 lines) | stat: -rw-r--r-- 838 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
function do_exit()
// Copyright INRIA
r=0
if edited then
  if ~super_block then
    r=message(['Diagram has not been saved';
	'Save it before leaving?'],['Save';'Exit'])
  end
end

if r==1 then
  ok=do_save()
  if ~ok then do_SaveAs(),end
end

if ~super_block&~pal_mode  then
  if alreadyran then do_terminate(),end
end

ok=%t
if or(winsid()==curwin) then
  xset('window',curwin)
  //  erasemenubar(datam)
  //  if pixmap then xset('wshow'),end
  xbasc()
  xset('alufunction',3)
  setmenu(curwin,'3D Rot.')
  setmenu(curwin,'File',1) //clear
  setmenu(curwin,'File',2) //select
  setmenu(curwin,'File',6) //load
  setmenu(curwin,'File',7) //close


  if ~super_block then
    delmenu(curwin,'stop'),
    xset('window',curwin),xsetech([0 0 1 1])
  end
end
for win=windows(size(windows,1):-1:noldwin+1,2)',xbasc(win),xdel(win);end