Improved handling of case where child is killed by a signal
[tcl-tlc.git] / tlc.tcl
blob6257ee742c96496979005bd5e629223519dd8090
1 # vim: foldmarker=<<<,>>>
3 package require TLC-base
5 namespace eval :: {
6 package require Itk 3.1
8 namespace import -force ::itcl::*
9 namespace import -force ::itk::*
11 if {![package vsatisfies $::tcl_version 8.5] ||
12 [catch {
13 package require blttable
14 namespace eval ::blt {
15 proc table {args} {
16 return [uplevel [list ::blttable::table] $args]
19 }]} {
20 if {[catch {
21 package require BLT 3.0
22 }]} {
23 package require BLT 2.4
28 namespace eval ::tlc {
29 namespace eval ::blt {}
30 namespace eval ::blttable {namespace export *}
32 namespace import ::blt::*
33 if {[info commands ::blttable::table] != ""} {
34 namespace import ::blttable::*
38 if {[info exists tlc::custom_theme_object]} {
39 set tlc::theme $tlc::custom_theme_object ::#auto]
40 } else {
41 if {[info exists ::tlc_UserThemeOverride]} {
42 set tlc::theme [tlc::Daftheme ::#auto]
43 } else {
44 set tlc::theme [tlc::Theme ::#auto]
48 package provide TLC $::tlc::version
50 # Set saner defaults
52 bind Text <Key-Tab> {tk_focusNext %W}
53 bind Text <Shift-Key-Tab> {tk_focusPrev %W}
55 tlc::Baseconfig tlc::default_config -configfile ""
56 array set tlc::config [tlc::default_config dump_config]
58 # Default options <<<
60 foreach {opt settingkey} {
61 *activeBackground background
62 *highlightBackground highlightbackground
63 *highlightColor highlightcolor
64 *font font
65 *labelFont font
66 *textFont font
67 *selectBorderWidth selectborderwidth
68 *selectBackground selectbackground
69 *selectForeground selectforeground
70 *Tabset*selectBackground background
71 *textBackground textbackground
72 *Listbox.background textbackground
73 *disabledBackground disabledbackground
74 *Entry.disabledForeground disabledforeground
75 *Text.disabledForeground disabledforeground
76 *Text.TextHighlightBackground texthighlightbackground
77 *.hidebg hidebg
78 *enabledBackground textbackground
79 *TreeView.background textbackground
80 *TreeView.borderwidth borderwidth
81 *TreeView.highlightThickness borderwidth
82 *Labelframe.font boldfont
83 *labelFont boldfont
84 *Button.padY button_pady
85 *frameRelief framerelief
86 *frameBorderwidth frameborderwidth
87 *Spinner.frameRelief entryrelief
88 *Spinner.frameBorderwidth entryborderwidth
89 *Form.padding formpadding
90 } {
91 option add $opt [$tlc::theme setting $settingkey] startupFile
94 # Hacks. userdefault priority == 60
95 foreach {opt settingkey} {
96 *Entry.background textbackground
97 *Entry.highlightBackground background
98 *TreeCtrl.background textbackground
99 } {
100 option add $opt [$tlc::theme setting $settingkey] 61
103 switch -exact $tcl_platform(platform) {
104 "unix" {
105 option add *Scrollbar.width 12 startupFile
106 option add *Scrollbar.borderWidth 1 startupFile
107 option add *sbWidth 12 startupFile
108 option add *scrollMargin 0 startupFile
109 option add *elementBorderWidth 1 startupFile
110 option add *textFont [$tlc::theme setting font] startupFile
111 option add *Menu.font [$tlc::theme setting boldfont] startupFile
112 option add *Menu.borderWidth 1 startupFile
114 "windows" {
115 option add *Radiobutton.borderWidth 0 startupFile
116 option add *Checkbutton.borderWidth 0 startupFile
117 option add *Entry.highlightThickness 0 startupFile
120 #>>>