1 # vim: foldmarker=<<<,>>>
3 package require TLC-base
6 package require Itk
3.1
8 namespace import
-force ::itcl::*
9 namespace import
-force ::itk::*
11 package require blttable
12 namespace eval ::blt {
14 return [uplevel [list ::blttable::table] $args]
19 namespace eval ::tlc {
20 namespace eval ::blt {}
21 namespace eval ::blttable {namespace export
*}
24 [file normalize
[file join [pwd] [file dirname
[info script
]]]]
26 namespace import
::blt::*
27 if {[info commands
::blttable::table] != ""} {
28 catch {namespace import
::blttable::*}
32 lappend auto_path
[file join $::tlc::guilibrary scripts
]
34 if {[info exists tlc
::custom_theme_object]} {
35 set tlc
::theme $tlc::custom_theme_object ::#auto]
37 if {[info exists
::tlc_UserThemeOverride]} {
38 set tlc
::theme [tlc
::Daftheme ::#auto]
40 set tlc
::theme [tlc
::Theme ::#auto]
44 package provide TLC
$::tlc::version
48 bind Text
<Key-Tab
> {tk_focusNext %W
}
49 bind Text
<Shift-Key-Tab
> {tk_focusPrev %W
}
51 tlc
::Baseconfig tlc
::default_config -configfile ""
52 array set tlc
::config [tlc
::default_config dump_config
]
56 foreach {opt settingkey
} {
57 *activeBackground background
58 *highlightBackground highlightbackground
59 *highlightColor highlightcolor
63 *selectBorderWidth selectborderwidth
64 *selectBackground selectbackground
65 *selectForeground selectforeground
66 *Tabset
*selectBackground background
67 *textBackground textbackground
68 *Listbox.background textbackground
69 *disabledBackground disabledbackground
70 *Entry.disabledForeground disabledforeground
71 *Text.disabledForeground disabledforeground
72 *Text.TextHighlightBackground texthighlightbackground
74 *enabledBackground textbackground
75 *TreeView.background textbackground
76 *TreeView.borderwidth borderwidth
77 *TreeView.highlightThickness borderwidth
78 *Labelframe.
font boldfont
80 *Button.padY button_pady
81 *frameRelief framerelief
82 *frameBorderwidth frameborderwidth
83 *Spinner.frameRelief entryrelief
84 *Spinner.frameBorderwidth entryborderwidth
85 *Form.padding formpadding
87 option add
$opt [$tlc::theme setting
$settingkey] startupFile
90 # Hacks. userdefault priority == 60
91 foreach {opt settingkey
} {
92 *Entry.background textbackground
93 *Entry.highlightBackground background
94 *TreeCtrl.background textbackground
96 option add
$opt [$tlc::theme setting
$settingkey] 61
99 switch -exact $tcl_platform(platform
) {
101 option add
*Scrollbar.width
12 startupFile
102 option add
*Scrollbar.borderWidth
1 startupFile
103 option add
*sbWidth
12 startupFile
104 option add
*scrollMargin
0 startupFile
105 option add
*elementBorderWidth
1 startupFile
106 option add
*textFont
[$tlc::theme setting
font] startupFile
107 option add
*Menu.
font [$tlc::theme setting boldfont
] startupFile
108 option add
*Menu.borderWidth
1 startupFile
111 option add
*Radiobutton.borderWidth
0 startupFile
112 option add
*Checkbutton.borderWidth
0 startupFile
113 option add
*Entry.highlightThickness
0 startupFile