File: TK_Scilab.tcl

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 (67 lines) | stat: -rw-r--r-- 1,755 bytes parent folder | download | duplicates (4)
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
############################################
# TKSCILAB Gui Interface facility for Scilab
# Bertrand Guiheneuf - 1998 
############################################
#


if {[info exists SciPath]} { set env(SCIPATH) $SciPath };
source "$env(SCIPATH)/tcl/misc.tcl"
source "$env(SCIPATH)/tcl/callbacks.tcl"
source "$env(SCIPATH)/tcl/tkcontrols.tcl"
source "$env(SCIPATH)/tcl/set.tcl"
source "$env(SCIPATH)/tcl/get.tcl"
source "$env(SCIPATH)/tcl/figure.tcl"
source "$env(SCIPATH)/tcl/uicontrol.tcl"
source "$env(SCIPATH)/tcl/uimenu.tcl"





######################################################################################
######################################################################################
######################################################################################

proc bgerror { m } {
puts " Error: $m";
}
# the root object is the first tk object
set root .;


# figure are special objects
# their parent *must* be the root object
# and we must keep a list of all figures,
# delete them from the list when they are destroyed
# and remember their order of creation.
# This will allow to manage the gcf feature
# which allows to know in which figure to draw.
set FigList {};
# FreeFigHandle is also a global list 
# containing all the free figure handles.
set FreeFigHandle {};


set Win(0) $root;
# this is the first object handle
# the handle between 1 and 999 are reverved for figures handles
set WinIdx 1000;


set gcbo 0; # object which callback is currently executing 
set gcf 0; #current figure index
set gco 0; #current object handle 
#. configure -bg #d0d0d0 ;
wm withdraw .;


# default bindings 
bind figure <Destroy> {CloseFigure %W};

#set h [CreateFigure 0];


#puts $h
#set h1 [CreateUIControl 0  button]