summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets/qscrollarea.cpp
Commit message (Expand)AuthorAgeFilesLines
* Update license headers again.Jason McDonald2009-09-091-4/+4
* Merge branch '4.5' into 4.6Thiago Macieira2009-08-311-13/+13
|\
| * Update tech preview license header.Jason McDonald2009-08-311-13/+13
| * Update license headers.Jason McDonald2009-08-111-1/+1
* | Restructure the documentation, both on a file and on a content level.Volker Hilsheimer2009-08-171-1/+1
* | Update contact URL in license headers.Jason McDonald2009-08-121-1/+1
|/
* Update license headers as requested by the marketing department.Jason McDonald2009-06-161-2/+2
* Fix some typos in the documentation.Frederik Schwarzer2009-05-181-1/+1
* Long live Qt 4.5!Lars Knoll2009-03-231-0/+522
n value='bug_6aea69fccb'>bug_6aea69fccb Tk is a free and open-source, cross-platform widget toolkit that provides a library of basic elements of GUI widgets for building a graphical user interface (GUI) in many programming languages.
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat
-rw-r--r--ChangeLog6
-rw-r--r--doc/event.n48
-rw-r--r--library/console.tcl6
-rw-r--r--library/demos/entry3.tcl4
-rw-r--r--library/demos/items.tcl2
-rw-r--r--library/entry.tcl28
-rw-r--r--library/iconlist.tcl8
-rw-r--r--library/listbox.tcl24
-rw-r--r--library/menu.tcl8
-rw-r--r--library/scale.tcl20
-rw-r--r--library/scrlbar.tcl20
-rw-r--r--library/spinbox.tcl28
-rw-r--r--library/text.tcl76
-rw-r--r--library/tk.tcl115
-rw-r--r--library/ttk/entry.tcl10
-rw-r--r--library/ttk/scale.tcl23
16 files changed, 212 insertions, 214 deletions
diff --git a/ChangeLog b/ChangeLog
index 7d331d6..227f0b9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-08-?? Jan Nijtmans <nijtmans@users.sf.net>
+
+ * library/*.tcl: [Bug 3555644]: Better use of virtual events.
+ Pre-define 10 new Virtual events, and correct various
+ bindings according to the Mac OSX documentation.
+
2012-08-09 Stuart Cassoff <stwo@users.sourceforge.net>
* generic/tkEvent.c: Remove useless (void *) casts
diff --git a/doc/event.n b/doc/event.n
index 214e6b7..f45a13f 100644
--- a/doc/event.n
+++ b/doc/event.n
@@ -373,6 +373,16 @@ selected contents.
Move to the next item (i.e., visible character) in the current widget while
deselecting any selected contents.
.TP
+\fB<<NextLine>>\fR
+.
+Move to the next line in the current widget while deselecting any selected
+contents.
+.TP
+\fB<<NextPara>>\fR
+.
+Move to the next paragraph in the current widget while deselecting any
+selected contents.
+.TP
\fB<<NextWord>>\fR
.
Move to the next group of items (i.e., visible word) in the current widget
@@ -391,6 +401,16 @@ event has meaningful \fB%x\fR and \fB%y\fR substitutions).
Move to the previous item (i.e., visible character) in the current widget
while deselecting any selected contents.
.TP
+\fB<<PrevLine>>\fR
+.
+Move to the previous line in the current widget while deselecting any selected
+contents.
+.TP
+\fB<<PrevPara>>\fR
+.
+Move to the previous paragraph in the current widget while deselecting any
+selected contents.
+.TP
\fB<<PrevWindow>>\fR
Traverse to the previous window.
.TP
@@ -402,6 +422,10 @@ while deselecting any selected contents.
\fB<<Redo>>\fR
Redo one undone action.
.TP
+\fB<<SelectAll>>\fR
+.
+Set the range of selected contents to the complete widget.
+.TP
\fB<<SelectLineEnd>>\fR
.
Move to the end of the line in the current widget while extending the range
@@ -417,16 +441,40 @@ of selected contents.
Move to the next item (i.e., visible character) in the current widget while
extending the range of selected contents.
.TP
+\fB<<SelectNextLine>>\fR
+.
+Move to the next line in the current widget while extending the range of
+selected contents.
+.TP
+\fB<<SelectNextPara>>\fR
+.
+Move to the next paragraph in the current widget while extending the range
+of selected contents.
+.TP
\fB<<SelectNextWord>>\fR
.
Move to the next group of items (i.e., visible word) in the current widget
while extending the range of selected contents.
.TP
+\fB<<SelectNone>>\fR
+.
+Reset the range of selected contents to be empty.
+.TP
\fB<<SelectPrevChar>>\fR
.
Move to the previous item (i.e., visible character) in the current widget
while extending the range of selected contents.
.TP
+\fB<<SelectPrevLine>>\fR
+.
+Move to the previous line in the current widget while extending the range of
+selected contents.
+.TP
+\fB<<SelectPrevPara>>\fR
+.
+Move to the previous paragraph in the current widget while extending the
+range of selected contents.
+.TP
\fB<<SelectPrevWord>>\fR
.
Move to the previous group of items (i.e., visible word) in the current widget
diff --git a/library/console.tcl b/library/console.tcl
index e6b7ce9..37832f2 100644
--- a/library/console.tcl
+++ b/library/console.tcl
@@ -499,18 +499,16 @@ proc ::tk::ConsoleBind {w} {
}
bind Console <Control-h> [bind Console <BackSpace>]
- bind Console <Home> {
+ bind Console <<LineStart>> {
if {[%W compare insert < promptEnd]} {
tk::TextSetCursor %W {insert linestart}
} else {
tk::TextSetCursor %W promptEnd
}
}
- bind Console <Control-a> [bind Console <Home>]
- bind Console <End> {
+ bind Console <<LineEnd>> {
tk::TextSetCursor %W {insert lineend}
}
- bind Console <Control-e> [bind Console <End>]
bind Console <Control-d> {
if {[%W compare insert < promptEnd]} {
break
diff --git a/library/demos/entry3.tcl b/library/demos/entry3.tcl
index 3d76c2e..d4435c6 100644
--- a/library/demos/entry3.tcl
+++ b/library/demos/entry3.tcl
@@ -169,8 +169,8 @@ bind $w.l3.e <FocusIn> {
after idle {%W selection clear}
}
}
-bind $w.l3.e <Left> {phoneSkipLeft %W}
-bind $w.l3.e <Right> {phoneSkipRight %W}
+bind $w.l3.e <<PrevChar>> {phoneSkipLeft %W}
+bind $w.l3.e <<NextChar>> {phoneSkipRight %W}
pack $w.l3.e -fill x -expand 1 -padx 1m -pady 1m
labelframe $w.l4 -text "Password Entry"
diff --git a/library/demos/items.tcl b/library/demos/items.tcl
index 31a1570..177e9a4 100644
--- a/library/demos/items.tcl
+++ b/library/demos/items.tcl
@@ -173,7 +173,7 @@ bind $c <2> "$c scan mark %x %y"
bind $c <B2-Motion> "$c scan dragto %x %y"
bind $c <3> "itemMark $c %x %y"
bind $c <B3-Motion> "itemStroke $c %x %y"
-bind $c <Control-f> "itemsUnderArea $c"
+bind $c <<NextChar>> "itemsUnderArea $c"
bind $c <1> "itemStartDrag $c %x %y"
bind $c <B1-Motion> "itemDrag $c %x %y"
diff --git a/library/entry.tcl b/library/entry.tcl
index de6c463..f28547e 100644
--- a/library/entry.tcl
+++ b/library/entry.tcl
@@ -185,10 +185,10 @@ bind Entry <Control-Shift-space> {
bind Entry <Shift-Select> {
%W selection adjust insert
}
-bind Entry <Control-slash> {
+bind Entry <<SelectAll>> {
%W selection range 0 end
}
-bind Entry <Control-backslash> {
+bind Entry <<SelectNone>> {
%W selection clear
}
bind Entry <KeyPress> {
@@ -214,8 +214,8 @@ if {[tk windowingsystem] eq "aqua"} {
bind Entry <Command-KeyPress> {# nothing}
}
# Tk-on-Cocoa generates characters for these two keys. [Bug 2971663]
-bind Entry <Down> {# nothing}
-bind Entry <Up> {# nothing}
+bind Entry <<NextLine>> {# nothing}
+bind Entry <<PrevLine>> {# nothing}
# On Windows, paste is done using Shift-Insert. Shift-Insert already
# generates the <<Paste>> event, so we don't need to do anything here.
@@ -227,31 +227,11 @@ if {[tk windowingsystem] ne "win32"} {
# Additional emacs-like bindings:
-bind Entry <Control-a> {
- if {!$tk_strictMotif} {
- tk::EntrySetCursor %W 0
- }
-}
-bind Entry <Control-b> {
- if {!$tk_strictMotif} {
- tk::EntrySetCursor %W [expr {[%W index insert] - 1}]
- }
-}
bind Entry <Control-d> {
if {!$tk_strictMotif} {
%W delete insert
}
}
-bind Entry <Control-e> {
- if {!$tk_strictMotif} {
- tk::EntrySetCursor %W end
- }
-}
-bind Entry <Control-f> {
- if {!$tk_strictMotif} {
- tk::EntrySetCursor %W [expr {[%W index insert] + 1}]
- }
-}
bind Entry <Control-h> {
if {!$tk_strictMotif} {
tk::EntryBackspace %W
diff --git a/library/iconlist.tcl b/library/iconlist.tcl
index fc8128d..ce1aae2 100644
--- a/library/iconlist.tcl
+++ b/library/iconlist.tcl
@@ -444,10 +444,10 @@ package require Tk 8.6
bind $canvas <Control-B1-Motion> {;}
bind $canvas <Shift-B1-Motion> [namespace code {my ShiftMotion1 %x %y}]
- bind $canvas <Up> [namespace code {my UpDown -1}]
- bind $canvas <Down> [namespace code {my UpDown 1}]
- bind $canvas <Left> [namespace code {my LeftRight -1}]
- bind $canvas <Right> [namespace code {my LeftRight 1}]
+ bind $canvas <<PrevLine>> [namespace code {my UpDown -1}]
+ bind $canvas <<NextLine>> [namespace code {my UpDown 1}]
+ bind $canvas <<PrevChar>> [namespace code {my LeftRight -1}]
+ bind $canvas <<NextChar>> [namespace code {my LeftRight 1}]
bind $canvas <Return> [namespace code {my ReturnKey}]
bind $canvas <KeyPress> [namespace code {my KeyPress %A}]
bind $canvas <Control-KeyPress> ";"
diff --git a/library/listbox.tcl b/library/listbox.tcl
index c7dd32e..01fb03d 100644
--- a/library/listbox.tcl
+++ b/library/listbox.tcl
@@ -69,28 +69,28 @@ bind Listbox <B1-Enter> {
tk::CancelRepeat
}
-bind Listbox <Up> {
+bind Listbox <<PrevLine>> {
tk::ListboxUpDown %W -1
}
-bind Listbox <Shift-Up> {
+bind Listbox <<SelectPrevLine>> {
tk::ListboxExtendUpDown %W -1
}
-bind Listbox <Down> {
+bind Listbox <<NextLine>> {
tk::ListboxUpDown %W 1
}
-bind Listbox <Shift-Down> {
+bind Listbox <<SelectNextLine>> {
tk::ListboxExtendUpDown %W 1
}
-bind Listbox <Left> {
+bind Listbox <<PrevChar>> {
%W xview scroll -1 units
}
-bind Listbox <Control-Left> {
+bind Listbox <<PrevWord>> {
%W xview scroll -1 pages
}
-bind Listbox <Right> {
+bind Listbox <<NextChar>> {
%W xview scroll 1 units
}
-bind Listbox <Control-Right> {
+bind Listbox <<NextWord>> {
%W xview scroll 1 pages
}
bind Listbox <Prior> {
@@ -107,10 +107,10 @@ bind Listbox <Control-Prior> {
bind Listbox <Control-Next> {
%W xview scroll 1 pages
}
-bind Listbox <Home> {
+bind Listbox <<LineStart>> {
%W xview moveto 0
}
-bind Listbox <End> {
+bind Listbox <<LineEnd>> {
%W xview moveto 1
}
bind Listbox <Control-Home> {
@@ -154,10 +154,10 @@ bind Listbox <Shift-Select> {
bind Listbox <Escape> {
tk::ListboxCancel %W
}
-bind Listbox <Control-slash> {
+bind Listbox <<SelectAll>> {
tk::ListboxSelectAll %W
}
-bind Listbox <Control-backslash> {
+bind Listbox <<SelectNone>> {
if {[%W cget -selectmode] ne "browse"} {
%W selection clear 0 end
event generate %W <<ListboxSelect>>
diff --git a/library/menu.tcl b/library/menu.tcl
index cc57532..a51c96f 100644
--- a/library/menu.tcl
+++ b/library/menu.tcl
@@ -149,16 +149,16 @@ bind Menu <Return> {
bind Menu <Escape> {
tk::MenuEscape %W
}
-bind Menu <Left> {
+bind Menu <<PrevChar>> {
tk::MenuLeftArrow %W
}
-bind Menu <Right> {
+bind Menu <<NextChar>> {
tk::MenuRightArrow %W
}
-bind Menu <Up> {
+bind Menu <<PrevLine>> {
tk::MenuUpArrow %W
}
-bind Menu <Down> {
+bind Menu <<NextLine>> {
tk::MenuDownArrow %W
}
bind Menu <KeyPress> {
diff --git a/library/scale.tcl b/library/scale.tcl
index b4da824..d9e7d27 100644
--- a/library/scale.tcl
+++ b/library/scale.tcl
@@ -71,34 +71,34 @@ if {[tk windowingsystem] eq "win32"} {
bind Scale <Control-1> {
tk::ScaleControlPress %W %x %y
}
-bind Scale <Up> {
+bind Scale <<PrevLine>> {
tk::ScaleIncrement %W up little noRepeat
}
-bind Scale <Down> {
+bind Scale <<NextLine>> {
tk::ScaleIncrement %W down little noRepeat
}
-bind Scale <Left> {
+bind Scale <<PrevChar>> {
tk::ScaleIncrement %W up little noRepeat
}
-bind Scale <Right> {
+bind Scale <<NextChar>> {
tk::ScaleIncrement %W down little noRepeat
}
-bind Scale <Control-Up> {
+bind Scale <<PrevPara>> {
tk::ScaleIncrement %W up big noRepeat
}
-bind Scale <Control-Down> {
+bind Scale <<NextPara>> {
tk::ScaleIncrement %W down big noRepeat
}
-bind Scale <Control-Left> {
+bind Scale <<PrevWord>> {
tk::ScaleIncrement %W up big noRepeat
}
-bind Scale <Control-Right> {
+bind Scale <<NextWord>> {
tk::ScaleIncrement %W down big noRepeat
}
-bind Scale <Home> {
+bind Scale <<LineStart>> {
%W set [%W cget -from]
}
-bind Scale <End> {
+bind Scale <<LineEnd>> {
%W set [%W cget -to]
}
diff --git a/library/scrlbar.tcl b/library/scrlbar.tcl
index 9277160..1f8c7d2 100644
--- a/library/scrlbar.tcl
+++ b/library/scrlbar.tcl