Added custom field type support to Form
[tcl-tlc.git] / tlc.tcl
blob7db5d722bb55d4e47d05cae6fc70c07b13bb83c3
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 {[catch {
12 package require BLT 3.0
13 }]} {
14 package require BLT 2.4
18 namespace eval ::tlc {
19 namespace import ::blt::*
22 if {[info exists tlc::custom_theme_object]} {
23 set tlc::theme $tlc::custom_theme_object ::#auto]
24 } else {
25 if {[info exists ::tlc_UserThemeOverride]} {
26 set tlc::theme [tlc::Daftheme ::#auto]
27 } else {
28 set tlc::theme [tlc::Theme ::#auto]
32 package provide TLC $::tlc::version
34 # Set saner defaults
36 bind Text <Key-Tab> {tk_focusNext %W}
37 bind Text <Shift-Key-Tab> {tk_focusPrev %W}
39 tlc::Baseconfig tlc::default_config -configfile ""
40 array set tlc::config [tlc::default_config dump_config]
42 # Default options <<<
44 foreach {opt settingkey} {
45 *activeBackground background
46 *highlightBackground highlightbackground
47 *highlightColor highlightcolor
48 *font font
49 *labelFont font
50 *textFont font
51 *selectBorderWidth selectborderwidth
52 *selectBackground selectbackground
53 *selectForeground selectforeground
54 *Tabset*selectBackground background
55 *textBackground textbackground
56 *Entry.background textbackground
57 *Listbox.background textbackground
58 *disabledBackground disabledbackground
59 *Entry.disabledForeground disabledforeground
60 *Text.disabledForeground disabledforeground
61 *Text.TextHighlightBackground texthighlightbackground
62 *.hidebg hidebg
63 *enabledBackground textbackground
64 *TreeView.background textbackground
65 *TreeView.borderwidth borderwidth
66 *TreeView.highlightThickness borderwidth
67 *Labelframe.font boldfont
68 *labelFont boldfont
69 *Button.padY button_pady
70 *frameRelief framerelief
71 *frameBorderwidth frameborderwidth
72 *Spinner.frameRelief entryrelief
73 *Spinner.frameBorderwidth entryborderwidth
74 } {
75 option add $opt [$tlc::theme setting $settingkey] startupFile
78 switch -exact $tcl_platform(platform) {
79 "unix" {
80 option add *Scrollbar.width 12 startupFile
81 option add *Scrollbar.borderWidth 1 startupFile
82 option add *sbWidth 12 startupFile
83 option add *scrollMargin 0 startupFile
84 option add *elementBorderWidth 1 startupFile
85 option add *textFont [$tlc::theme setting font] startupFile
86 option add *Menu.font [$tlc::theme setting boldfont] startupFile
87 option add *Menu.borderWidth 1 startupFile
89 "windows" {
90 option add *Radiobutton.borderWidth 0 startupFile
91 option add *Checkbutton.borderWidth 0 startupFile
92 option add *Entry.highlightThickness 0 startupFile
95 #>>>