Debian Codegraph @

demos/scripts/demo.tcl

raw
1 # ----------------------------------------------------------------------------
2 #
3 # The following code is solely a convenience so that you can test the
4 # BLT distribution without first installing it.
5 #
6 # ----------------------------------------------------------------------------
7
8 # If we're in the ./demos directory, we can simply specify
9 # "../library" as the library directory without having to install the
10 # files.
11
12 if {[info commands ::blttable] != {}} {
13 interp alias {} table {} blttable
14 }
15
16 if { [file exists ../library/bltGraph.pro] } {
17 global blt_library
18 set blt_library ../library
19 set auto_path [linsert $auto_path 0 $blt_library]
20 auto_reset
21 }
22
23 # Add a binding for convenience to let you exit with pressing the
24 # "quit" button.
25
26 wm protocol . WM_DELETE_WINDOW { DoExit 0 }
27 bind all <Control-KeyPress-c> { DoExit 0 }
28
29 proc DoExit { code } {
30 destroy .
31 #exit $code
32 }