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
*}
23 variable version
0.94.0
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]
39 if {[info exists
::tlc_UserThemeOverride]} {
40 set tlc
::theme [tlc
::Daftheme ::#auto]
42 set tlc
::theme [tlc
::Theme ::#auto]
46 package provide TLC
$::tlc::version
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
]
58 foreach {opt settingkey
} {
59 *activeBackground background
60 *highlightBackground highlightbackground
61 *highlightColor highlightcolor
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
76 *enabledBackground textbackground
77 *TreeView.background textbackground
78 *TreeView.borderwidth borderwidth
79 *TreeView.highlightThickness borderwidth
80 *Labelframe.
font boldfont
82 *Button.padY button_pady
83 *frameRelief framerelief
84 *frameBorderwidth frameborderwidth
85 *Spinner.frameRelief entryrelief
86 *Spinner.frameBorderwidth entryborderwidth
87 *Form.padding formpadding
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
98 option add
$opt [$tlc::theme setting
$settingkey] 61
101 switch -exact $tcl_platform(platform
) {
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
113 option add
*Radiobutton.borderWidth
0 startupFile
114 option add
*Checkbutton.borderWidth
0 startupFile
115 option add
*Entry.highlightThickness
0 startupFile
120 namespace eval tlc
::Form {
122 set custom_types
(sql_lookup
) "tlc::form::Datavaultlookup"