Added some debug output
[tcl-tlc.git] / init.tcl
blobd0514be628daebedbaa8565f0b87ab6ec61abfac
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 package require blttable
12 namespace eval ::blt {
13 proc table {args} {
14 return [uplevel [list ::blttable::table] $args]
19 namespace eval ::tlc {
20 namespace eval ::blt {}
21 namespace eval ::blttable {namespace export *}
23 variable version 0.94.0
25 variable guilibrary \
26 [file normalize [file join [pwd] [file dirname [info script]]]]
28 namespace import ::blt::*
29 if {[info commands ::blttable::table] != ""} {
30 catch {namespace import ::blttable::*}
34 lappend auto_path [file join $::tlc::guilibrary scripts]
36 if {[info exists tlc::custom_theme_object]} {
37 set tlc::theme $tlc::custom_theme_object ::#auto]
38 } else {
39 if {[info exists ::tlc_UserThemeOverride]} {
40 set tlc::theme [tlc::Daftheme ::#auto]
41 } else {
42 set tlc::theme [tlc::Theme ::#auto]
46 package provide TLC $::tlc::version
48 # Set saner defaults
50 bind Text <Key-Tab> {tk_focusNext %W}
51 bind Text <Shift-Key-Tab> {tk_focusPrev %W}
53 tlc::Baseconfig tlc::default_config -configfile ""
54 array set tlc::config [tlc::default_config dump_config]
56 # Default options <<<
58 foreach {opt settingkey} {
59 *activeBackground background
60 *highlightBackground highlightbackground
61 *highlightColor highlightcolor
62 *font font
63 *labelFont font
64 *textFont font
65 *selectBorderWidth selectborderwidth
66 *selectBackground selectbackground
67 *selectForeground selectforeground
68 *Tabset*selectBackground background
69 *textBackground textbackground
70 *Listbox.background textbackground
71 *disabledBackground disabledbackground
72 *Entry.disabledForeground disabledforeground
73 *Text.disabledForeground disabledforeground
74 *Text.TextHighlightBackground texthighlightbackground
75 *.hidebg hidebg
76 *enabledBackground textbackground
77 *TreeView.background textbackground
78 *TreeView.borderwidth borderwidth
79 *TreeView.highlightThickness borderwidth
80 *Labelframe.font boldfont
81 *labelFont boldfont
82 *Button.padY button_pady
83 *frameRelief framerelief
84 *frameBorderwidth frameborderwidth
85 *Spinner.frameRelief entryrelief
86 *Spinner.frameBorderwidth entryborderwidth
87 *Form.padding formpadding
88 } {
89 option add $opt [$tlc::theme setting $settingkey] startupFile
92 # Hacks. userdefault priority == 60
93 foreach {opt settingkey} {
94 *Entry.background textbackground
95 *Entry.highlightBackground background
96 *TreeCtrl.background textbackground
97 } {
98 option add $opt [$tlc::theme setting $settingkey] 61
101 switch -exact $tcl_platform(platform) {
102 "unix" {
103 option add *Scrollbar.width 12 startupFile
104 option add *Scrollbar.borderWidth 1 startupFile
105 option add *sbWidth 12 startupFile
106 option add *scrollMargin 0 startupFile
107 option add *elementBorderWidth 1 startupFile
108 option add *textFont [$tlc::theme setting font] startupFile
109 option add *Menu.font [$tlc::theme setting boldfont] startupFile
110 option add *Menu.borderWidth 1 startupFile
112 "windows" {
113 option add *Radiobutton.borderWidth 0 startupFile
114 option add *Checkbutton.borderWidth 0 startupFile
115 option add *Entry.highlightThickness 0 startupFile
118 #>>>
120 namespace eval tlc::Form {
121 variable custom_type
122 set custom_types(sql_lookup) "tlc::form::Datavaultlookup"