|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
proc tk_menuBar args {} |
|
proc tk_bindForTraversal args {} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace eval ::tk::classic { |
|
|
|
|
|
variable prio "widgetDefault" |
|
} |
|
|
|
proc ::tk::classic::restore {args} { |
|
|
|
variable prio |
|
|
|
if {[llength $args]} { |
|
foreach what $args { |
|
::tk::classic::restore_$what |
|
} |
|
} else { |
|
foreach cmd [info procs restore_*] { |
|
$cmd |
|
} |
|
} |
|
} |
|
|
|
proc ::tk::classic::restore_font {args} { |
|
|
|
|
|
|
|
|
|
if {[tk windowingsystem] eq "x11"} { |
|
font configure TkDefaultFont -weight bold |
|
font configure TkFixedFont -size -12 |
|
} |
|
|
|
if {[tk windowingsystem] eq "aqua"} { |
|
option add *Dialog.msg.font system 21 |
|
option add *Dialog.dtl.font system 21 |
|
option add *ErrorDialog*Label.font system 21 |
|
} else { |
|
option add *Dialog.msg.font {Times 12} 21 |
|
option add *Dialog.dtl.font {Times 10} 21 |
|
option add *ErrorDialog*Label.font {Times -18} 21 |
|
} |
|
} |
|
|
|
proc ::tk::classic::restore_button {args} { |
|
variable prio |
|
if {[tk windowingsystem] eq "x11"} { |
|
foreach cls {Button Radiobutton Checkbutton} { |
|
option add *$cls.borderWidth 2 $prio |
|
} |
|
} |
|
} |
|
|
|
proc ::tk::classic::restore_entry {args} { |
|
variable prio |
|
|
|
foreach cls {Entry Spinbox} { |
|
if {[tk windowingsystem] ne "aqua"} { |
|
option add *$cls.borderWidth 2 $prio |
|
} |
|
if {[tk windowingsystem] eq "x11"} { |
|
option add *$cls.background "#d9d9d9" $prio |
|
option add *$cls.selectBorderWidth 1 $prio |
|
} |
|
} |
|
} |
|
|
|
proc ::tk::classic::restore_listbox {args} { |
|
variable prio |
|
if {[tk windowingsystem] ne "win32"} { |
|
option add *Listbox.background "#d9d9d9" $prio |
|
option add *Listbox.activeStyle "underline" $prio |
|
} |
|
if {[tk windowingsystem] ne "aqua"} { |
|
option add *Listbox.borderWidth 2 $prio |
|
} |
|
if {[tk windowingsystem] eq "x11"} { |
|
option add *Listbox.selectBorderWidth 1 $prio |
|
} |
|
|
|
bind Listbox <1> { |
|
if {[winfo exists %W]} { |
|
tk::ListboxBeginSelect %W [%W index @%x,%y] |
|
} |
|
} |
|
} |
|
|
|
proc ::tk::classic::restore_menu {args} { |
|
variable prio |
|
if {[tk windowingsystem] eq "x11"} { |
|
option add *Menu.activeBorderWidth 2 $prio |
|
option add *Menu.borderWidth 2 $prio |
|
option add *Menu.clickToFocus true $prio |
|
option add *Menu.useMotifHelp true $prio |
|
} |
|
if {[tk windowingsystem] ne "aqua"} { |
|
option add *Menu.font "TkDefaultFont" $prio |
|
} |
|
} |
|
|
|
proc ::tk::classic::restore_menubutton {args} { |
|
variable prio |
|
option add *Menubutton.borderWidth 2 $prio |
|
} |
|
|
|
proc ::tk::classic::restore_message {args} { |
|
variable prio |
|
option add *Message.borderWidth 2 $prio |
|
} |
|
|
|
proc ::tk::classic::restore_panedwindow {args} { |
|
variable prio |
|
option add *Panedwindow.borderWidth 2 $prio |
|
option add *Panedwindow.sashWidth 2 $prio |
|
option add *Panedwindow.sashPad 2 $prio |
|
option add *Panedwindow.sashRelief raised $prio |
|
option add *Panedwindow.opaqueResize 0 $prio |
|
if {[tk windowingsystem] ne "win32"} { |
|
option add *Panedwindow.showHandle 1 $prio |
|
} |
|
} |
|
|
|
proc ::tk::classic::restore_scale {args} { |
|
variable prio |
|
option add *Scale.borderWidth 2 $prio |
|
if {[tk windowingsystem] eq "x11"} { |
|
option add *Scale.troughColor "#c3c3c3" $prio |
|
} |
|
} |
|
|
|
proc ::tk::classic::restore_scrollbar {args} { |
|
variable prio |
|
if {[tk windowingsystem] eq "x11"} { |
|
option add *Scrollbar.borderWidth 2 $prio |
|
option add *Scrollbar.highlightThickness 1 $prio |
|
option add *Scrollbar.width 15 $prio |
|
option add *Scrollbar.troughColor "#c3c3c3" $prio |
|
} |
|
} |
|
|
|
proc ::tk::classic::restore_text {args} { |
|
variable prio |
|
if {[tk windowingsystem] ne "aqua"} { |
|
option add *Text.borderWidth 2 $prio |
|
} |
|
if {[tk windowingsystem] eq "win32"} { |
|
option add *Text.font "TkDefaultFont" $prio |
|
} |
|
if {[tk windowingsystem] eq "x11"} { |
|
option add *Text.background "#d9d9d9" $prio |
|
option add *Text.selectBorderWidth 1 $prio |
|
} |
|
} |
|
|