1# ---------------------------------------------------------------------------- 2# init.tcl 3# This file is part of Unifix BWidget Toolkit 4# $Id: init.tcl,v 1.92 2009/10/25 20:55:36 oberdorfer Exp $ 5# ---------------------------------------------------------------------------- 6# 7namespace eval Widget {} 8proc Widget::_opt_defaults {{prio widgetDefault}} { 9 if {$::tcl_version >= 8.4} { 10 set plat [tk windowingsystem] 11 } else { 12 set plat $::tcl_platform(platform) 13 } 14 switch -exact $plat { 15 "aqua" { 16 } 17 "win32" - 18 "windows" { 19 option add *ListBox.background SystemWindow $prio 20 #option add *Button.padY 0 $prio 21 option add *ButtonBox.padY 0 $prio 22 option add *Dialog.padY 0 $prio 23 option add *Dialog.anchor e $prio 24 } 25 "x11" - 26 default { 27 option add *Scrollbar.width 12 $prio 28 option add *Scrollbar.borderWidth 1 $prio 29 option add *Dialog.separator 1 $prio 30 option add *MainFrame.relief raised $prio 31 option add *MainFrame.separator none $prio 32 } 33 } 34} 35Widget::_opt_defaults 36 37option read [file join $::BWIDGET::LIBRARY "lang" "en.rc"] 38 39# Add a TraverseIn binding to standard Tk widgets to handle some of 40# the BWidget-specific things we do. 41bind Entry <<TraverseIn>> { %W selection range 0 end; %W icursor end } 42bind Spinbox <<TraverseIn>> { %W selection range 0 end; %W icursor end } 43 44bind all <Key-Tab> { Widget::traverseTo [Widget::focusNext %W] } 45bind all <<PrevWindow>> { Widget::traverseTo [Widget::focusPrev %W] } 46 47 48::BWidget::createSystemFonts 49::BWidget::set_themedefaults "default" 50