diff options
author | hobbs <hobbs> | 2010-08-26 02:06:08 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2010-08-26 02:06:08 (GMT) |
commit | b29adcfbfc2e03e058536524f1aa3378b948e7ed (patch) | |
tree | fa90e1e6d32590addfbb0a1599a40b1f7f99ea3b /library/ttk/entry.tcl | |
parent | 7dec1714e5d5efd6b7d095657c1434fa68af0f87 (diff) | |
download | tk-b29adcfbfc2e03e058536524f1aa3378b948e7ed.zip tk-b29adcfbfc2e03e058536524f1aa3378b948e7ed.tar.gz tk-b29adcfbfc2e03e058536524f1aa3378b948e7ed.tar.bz2 |
Major backport of 8.6 Ttk for 8.5.9. Most changes were only being
committed to head (8.6), although they could apply for 8.5 as well.
This re-sync makes future work easier to maintain and adds some
useful work for 8.5 users. Notable changes:
- Lots of code cleanup
- Some bug fixes never backported
- Addition of ttk::spinbox
- minor color changes
- Improved Vista/7 styling
- Move to tile version 0.8.6 (pseudo-package)
- ABI and API compatible (even $w identify)
- minor new features (extended $w identify)
Diffstat (limited to 'library/ttk/entry.tcl')
-rw-r--r-- | library/ttk/entry.tcl | 35 |
1 files changed, 21 insertions, 14 deletions
diff --git a/library/ttk/entry.tcl b/library/ttk/entry.tcl index 37a2419..ef769cd 100644 --- a/library/ttk/entry.tcl +++ b/library/ttk/entry.tcl @@ -1,5 +1,5 @@ # -# $Id: entry.tcl,v 1.4 2007/12/13 15:27:08 dgp Exp $ +# $Id: entry.tcl,v 1.4.2.1 2010/08/26 02:06:10 hobbs Exp $ # # DERIVED FROM: tk/library/entry.tcl r1.22 # @@ -34,6 +34,10 @@ namespace eval ttk { } } +### Option database settings. +# +option add *TEntry.cursor [ttk::cursor text] + ### Bindings. # # Removed the following standard Tk bindings: @@ -91,19 +95,19 @@ bind TEntry <<PasteSelection>> { ttk::entry::ScanRelease %W %x } ## Keyboard navigation bindings: # -bind TEntry <Key-Left> { ttk::entry::Move %W prevchar } -bind TEntry <Key-Right> { ttk::entry::Move %W nextchar } -bind TEntry <Control-Key-Left> { ttk::entry::Move %W prevword } -bind TEntry <Control-Key-Right> { ttk::entry::Move %W nextword } -bind TEntry <Key-Home> { ttk::entry::Move %W home } -bind TEntry <Key-End> { ttk::entry::Move %W end } +bind TEntry <<PrevChar>> { ttk::entry::Move %W prevchar } +bind TEntry <<NextChar>> { ttk::entry::Move %W nextchar } +bind TEntry <<PrevWord>> { ttk::entry::Move %W prevword } +bind TEntry <<NextWord>> { ttk::entry::Move %W nextword } +bind TEntry <<LineStart>> { ttk::entry::Move %W home } +bind TEntry <<LineEnd>> { ttk::entry::Move %W end } -bind TEntry <Shift-Key-Left> { ttk::entry::Extend %W prevchar } -bind TEntry <Shift-Key-Right> { ttk::entry::Extend %W nextchar } -bind TEntry <Shift-Control-Key-Left> { ttk::entry::Extend %W prevword } -bind TEntry <Shift-Control-Key-Right> { ttk::entry::Extend %W nextword } -bind TEntry <Shift-Key-Home> { ttk::entry::Extend %W home } -bind TEntry <Shift-Key-End> { ttk::entry::Extend %W end } +bind TEntry <<SelectPrevChar>> { ttk::entry::Extend %W prevchar } +bind TEntry <<SelectNextChar>> { ttk::entry::Extend %W nextchar } +bind TEntry <<SelectPrevWord>> { ttk::entry::Extend %W prevword } +bind TEntry <<SelectNextWord>> { ttk::entry::Extend %W nextword } +bind TEntry <<SelectLineStart>> { ttk::entry::Extend %W home } +bind TEntry <<SelectLineEnd>> { ttk::entry::Extend %W end } bind TEntry <Control-Key-slash> { %W selection range 0 end } bind TEntry <Control-Key-backslash> { %W selection clear } @@ -133,6 +137,9 @@ bind TEntry <Key-Tab> {# nothing} if {[tk windowingsystem] eq "aqua"} { bind TEntry <Command-KeyPress> {# nothing} } +# Tk-on-Cocoa generates characters for these two keys. [Bug 2971663] +bind TEntry <Down> {# nothing} +bind TEntry <Up> {# nothing} ## Additional emacs-like bindings: # @@ -224,7 +231,7 @@ proc ttk::entry::See {w {index insert}} { # position following the next end-of-word position. # set ::ttk::entry::State(startNext) \ - [string equal $tcl_platform(platform) "windows"] + [string equal $::tcl_platform(platform) "windows"] proc ttk::entry::NextWord {w start} { variable State |