Import Tk 8.6.10

This commit is contained in:
Steve Dower
2020-09-24 22:55:34 +01:00
parent 5ba5cbc9af
commit 42c69189d9
365 changed files with 24323 additions and 12832 deletions

View File

@@ -128,42 +128,44 @@ bind Scrollbar <<LineEnd>> {
tk::ScrollToPos %W 1
}
}
switch [tk windowingsystem] {
"aqua" {
bind Scrollbar <MouseWheel> {
tk::ScrollByUnits %W v [expr {- (%D)}]
}
bind Scrollbar <Option-MouseWheel> {
tk::ScrollByUnits %W v [expr {-10 * (%D)}]
}
bind Scrollbar <Shift-MouseWheel> {
tk::ScrollByUnits %W h [expr {- (%D)}]
}
bind Scrollbar <Shift-Option-MouseWheel> {
tk::ScrollByUnits %W h [expr {-10 * (%D)}]
if {[tk windowingsystem] eq "aqua"} {
bind Scrollbar <MouseWheel> {
tk::ScrollByUnits %W v [expr {-(%D)}]
}
bind Scrollbar <Option-MouseWheel> {
tk::ScrollByUnits %W v [expr {-10 * (%D)}]
}
bind Scrollbar <Shift-MouseWheel> {
tk::ScrollByUnits %W h [expr {-(%D)}]
}
bind Scrollbar <Shift-Option-MouseWheel> {
tk::ScrollByUnits %W h [expr {-10 * (%D)}]
}
} else {
bind Scrollbar <MouseWheel> {
if {%D >= 0} {
tk::ScrollByUnits %W v [expr {-%D/30}]
} else {
tk::ScrollByUnits %W v [expr {(29-%D)/30}]
}
}
"win32" {
bind Scrollbar <MouseWheel> {
tk::ScrollByUnits %W v [expr {- (%D / 120) * 4}]
bind Scrollbar <Shift-MouseWheel> {
if {%D >= 0} {
tk::ScrollByUnits %W h [expr {-%D/30}]
} else {
tk::ScrollByUnits %W h [expr {(29-%D)/30}]
}
bind Scrollbar <Shift-MouseWheel> {
tk::ScrollByUnits %W h [expr {- (%D / 120) * 4}]
}
}
"x11" {
bind Scrollbar <MouseWheel> {
tk::ScrollByUnits %W v [expr {- (%D /120 ) * 4}]
}
bind Scrollbar <Shift-MouseWheel> {
tk::ScrollByUnits %W h [expr {- (%D /120 ) * 4}]
}
bind Scrollbar <4> {tk::ScrollByUnits %W v -5}
bind Scrollbar <5> {tk::ScrollByUnits %W v 5}
bind Scrollbar <Shift-4> {tk::ScrollByUnits %W h -5}
bind Scrollbar <Shift-5> {tk::ScrollByUnits %W h 5}
}
}
if {[tk windowingsystem] eq "x11"} {
bind Scrollbar <4> {tk::ScrollByUnits %W v -5}
bind Scrollbar <5> {tk::ScrollByUnits %W v 5}
bind Scrollbar <Shift-4> {tk::ScrollByUnits %W h -5}
bind Scrollbar <Shift-5> {tk::ScrollByUnits %W h 5}
}
# tk::ScrollButtonDown --
# This procedure is invoked when a button is pressed in a scrollbar.
# It changes the way the scrollbar is displayed and takes actions