3 # Initialization script normally executed in the interpreter for each
4 # curses wish-based application. Arranges class bindings for widgets.
6 # Copyright (c) 1992-1994 The Regents of the University of California.
7 # Copyright (c) 1994-1995 Sun Microsystems, Inc.
8 # Copyright (c) 1995-2000 Christian Werner
10 # See the file "license.terms" for information on usage and redistribution
11 # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
13 # Insist on running with compatible versions of Tcl and Ck.
15 scan [info tclversion] "%d.%d" a b
16 scan $ck_version "%d.%d" c d
19 error "wrong version of Ck loaded ($c.$d): need 4.X"
22 error "wrong version of Ck loaded ($c.$d): need 4.[expr $b-4]"
26 error "wrong version of Ck loaded ($c.$d): need 8.X"
29 error "wrong version of Ck loaded ($c.$d): need 8.$b"
35 if {[string compare $tcl_platform(platform) windows] == 0 } {
36 curses encoding IBM437
38 } elseif {[string compare $tcl_platform(platform) dos]==0} {
39 curses encoding IBM437
42 # Inhibit exec of unknown commands
46 # Add this directory to the begin of the auto-load search path:
48 if {[info exists auto_path]} {
49 set auto_path [concat $ck_library $auto_path]
52 # ----------------------------------------------------------------------
53 # Read in files that define all of the class bindings.
54 # ----------------------------------------------------------------------
56 source $ck_library/button.tcl
57 source $ck_library/entry.tcl
58 source $ck_library/listbox.tcl
59 source $ck_library/scrollbar.tcl
60 source $ck_library/text.tcl
61 source $ck_library/menu.tcl
63 # ----------------------------------------------------------------------
64 # Default bindings for keyboard traversal.
65 # ----------------------------------------------------------------------
67 bind all <Tab> {focus [ck_focusNext %W]}
68 bind all <BackTab> {focus [ck_focusPrev %W]}
69 if {$tcl_interactive} {
70 bind all <Control-c> ckCommand