Tk Source Code

Check-in [e70a3fdf]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Cherry-pick [14a41a1d96]
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | core-8-5-14rc
Files: files | file ages | folders
SHA1: e70a3fdfc3957f7e00e90127233387efea2f6537
User & Date: jan.nijtmans 2013-03-30 06:45:36
Context
2013-03-30
06:47
merge-mark check-in: 4dea541f user: jan.nijtmans tags: core-8-5-14rc
06:45
Cherry-pick [14a41a1d96] check-in: e70a3fdf user: jan.nijtmans tags: core-8-5-14rc
06:39
Backout [9bc120ced2] and part of [ea8d772054] (change-log entry for [9bc120ced2] only) check-in: 1dc02f11 user: jan.nijtmans tags: core-8-5-14rc
2013-03-27
11:35
[Bug 3608074]: Add <<Invoke>> bindings to Button's, Listbox and Menu. Document <<Invoke>>, <<ThemeChanged>>, <<EnteredChild>> (ttk_pandedwindow only) and <<Increment/Decrement>> (ttk_spinbox only) check-in: 14a41a1d user: jan.nijtmans tags: core-8-5-branch
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to ChangeLog.










1
2
3
4
5
6
7









2013-03-22  Don Porter  <[email protected]>

	*** 8.5.14 TAGGED FOR RELEASE ***

	* generic/tk.h:		Bump to 8.5.14 for release.
	* library/tk.tcl:
	* unix/configure.in:
>
>
>
>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2013-03-27  Jan Nijtmans  <[email protected]>

	* library/button.tcl:    [Bug 3608074]: Add <<Invoke>> bindings to
	* library/listbox.tcl:   Button's, Listbox and Menu.
	* library/menu.tcl:
	* doc/event.n:           Document <<Invoke>>, <<ThemeChanged>>,
	* doc/ttk_panedwindow.n: <<EnteredChild>> (ttk_pandedwindow only) and
	* doc/ttk_spinbox.n:     <<Increment/Decrement>> (ttk_spinbox only)

2013-03-22  Don Porter  <[email protected]>

	*** 8.5.14 TAGGED FOR RELEASE ***

	* generic/tk.h:		Bump to 8.5.14 for release.
	* library/tk.tcl:
	* unix/configure.in:

Changes to doc/event.n.

314
315
316
317
318
319
320




321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336



337
338
339
340
341
342
343
\fB<<AltUnderlined>>\fR
This is sent to widget to notify it that the letter it has underlined
(as an accelerator indicator) with the \fB\-underline\fR option has
been pressed in combination with the Alt key. The usual response to
this is to either focus into the widget (or some related widget) or to
invoke the widget.
.TP




\fB<<ListboxSelect>>\fR
This is sent to a listbox when the set of selected item(s) in the
listbox is updated.
.TP
\fB<<MenuSelect>>\fR
This is sent to a menu when the currently selected item in the menu
changes. It is intended for use with context-sensitive help systems.
.TP
\fB<<Modified>>\fR
This is sent to a text widget when the contents of the widget are
changed.
.TP
\fB<<Selection>>\fR
This is sent to a text widget when the selection in the widget is
changed.
.TP



\fB<<TraverseIn>>\fR
This is sent to a widget when the focus enters the widget because of a
user-driven
.QW "tab to widget"
action.
.TP
\fB<<TraverseOut>>\fR







>
>
>
>
















>
>
>







314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
\fB<<AltUnderlined>>\fR
This is sent to widget to notify it that the letter it has underlined
(as an accelerator indicator) with the \fB\-underline\fR option has
been pressed in combination with the Alt key. The usual response to
this is to either focus into the widget (or some related widget) or to
invoke the widget.
.TP
\fB<<Invoke>>\fR
This can be sent to some widgets (e.g. button, listbox, menu) as an
alternative to <space>.
.TP
\fB<<ListboxSelect>>\fR
This is sent to a listbox when the set of selected item(s) in the
listbox is updated.
.TP
\fB<<MenuSelect>>\fR
This is sent to a menu when the currently selected item in the menu
changes. It is intended for use with context-sensitive help systems.
.TP
\fB<<Modified>>\fR
This is sent to a text widget when the contents of the widget are
changed.
.TP
\fB<<Selection>>\fR
This is sent to a text widget when the selection in the widget is
changed.
.TP
\fB<<ThemeChanged>>\fR
This is sent to a text widget when the ttk (Tile) theme changed.
.TP
\fB<<TraverseIn>>\fR
This is sent to a widget when the focus enters the widget because of a
user-driven
.QW "tab to widget"
action.
.TP
\fB<<TraverseOut>>\fR

Changes to doc/ttk_panedwindow.n.

101
102
103
104
105
106
107






108
109
110
111
112
Sash positions are further constrained to be between 0
and the total size of the widget.
.\" Full story: "total size" is either the -height (resp -width),
.\" or the actual window height (resp actual window width),
.\" depending on which changed most recently.
Returns the new position of sash number \fIindex\fR.
.\" Full story: new position may be different than the requested position.






.SH "SEE ALSO"
ttk::widget(n), ttk::notebook(n), panedwindow(n)
'\" Local Variables:
'\" mode: nroff
'\" End:







>
>
>
>
>
>





101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
Sash positions are further constrained to be between 0
and the total size of the widget.
.\" Full story: "total size" is either the -height (resp -width),
.\" or the actual window height (resp actual window width),
.\" depending on which changed most recently.
Returns the new position of sash number \fIindex\fR.
.\" Full story: new position may be different than the requested position.
.SH "VIRTUAL EVENTS"
.PP
The panedwindow widget generates an \fB<<EnteredChild>>\fR virtual event on
LeaveNotify/NotifyInferior events, because Tk does not execute binding scripts
for <Leave> events when the pointer crosses from a parent to a child. The
panedwindow widget needs to know when that happens.
.SH "SEE ALSO"
ttk::widget(n), ttk::notebook(n), panedwindow(n)
'\" Local Variables:
'\" mode: nroff
'\" End:

Changes to doc/ttk_spinbox.n.

73
74
75
76
77
78
79





80
81
82
83
84
85
86
Returns the spinbox's current value.
.TP
\fIpathName \fBset \fIvalue\fR
Set the spinbox string to \fIvalue\fR. If a \fI\-format\fR option has
been configured then this format will be applied. If formatting fails
or is not set or the \fI\-values\fR option has been used then the value
is set directly.





.SH "SEE ALSO"
ttk::widget(n), ttk::entry(n), spinbox(n)
.SH KEYWORDS
entry, spinbox, widget, text field
'\" Local Variables:
'\" mode: nroff
'\" End:







>
>
>
>
>







73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
Returns the spinbox's current value.
.TP
\fIpathName \fBset \fIvalue\fR
Set the spinbox string to \fIvalue\fR. If a \fI\-format\fR option has
been configured then this format will be applied. If formatting fails
or is not set or the \fI\-values\fR option has been used then the value
is set directly.
.SH "VIRTUAL EVENTS"
.PP
The spinbox widget generates a \fB<<Increment>>\fR virtual event when
the user presses <Up>, and a \fB<<Decrement>>\fR virtual event when the
user presses <Down>.
.SH "SEE ALSO"
ttk::widget(n), ttk::entry(n), spinbox(n)
.SH KEYWORDS
entry, spinbox, widget, text field
'\" Local Variables:
'\" mode: nroff
'\" End:

Changes to library/button.tcl.

105
106
107
108
109
110
111









112
113
114
115
116
117
118
}
bind Checkbutton <space> {
    tk::CheckRadioInvoke %W
}
bind Radiobutton <space> {
    tk::CheckRadioInvoke %W
}










bind Button <FocusIn> {}
bind Button <Enter> {
    tk::ButtonEnter %W
}
bind Button <Leave> {
    tk::ButtonLeave %W







>
>
>
>
>
>
>
>
>







105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
}
bind Checkbutton <space> {
    tk::CheckRadioInvoke %W
}
bind Radiobutton <space> {
    tk::CheckRadioInvoke %W
}
bind Button <<Invoke>> {
    tk::ButtonInvoke %W
}
bind Checkbutton <<Invoke>> {
    tk::CheckRadioInvoke %W
}
bind Radiobutton <<Invoke>> {
    tk::CheckRadioInvoke %W
}

bind Button <FocusIn> {}
bind Button <Enter> {
    tk::ButtonEnter %W
}
bind Button <Leave> {
    tk::ButtonLeave %W

Changes to library/listbox.tcl.

138
139
140
141
142
143
144



145
146
147
148
149
150
151
	clipboard clear -displayof %W
	clipboard append -displayof %W [selection get -displayof %W]
    }
}
bind Listbox <space> {
    tk::ListboxBeginSelect %W [%W index active]
}



bind Listbox <Select> {
    tk::ListboxBeginSelect %W [%W index active]
}
bind Listbox <Control-Shift-space> {
    tk::ListboxBeginExtend %W [%W index active]
}
bind Listbox <Shift-Select> {







>
>
>







138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
	clipboard clear -displayof %W
	clipboard append -displayof %W [selection get -displayof %W]
    }
}
bind Listbox <space> {
    tk::ListboxBeginSelect %W [%W index active]
}
bind Listbox <<Invoke>> {
    tk::ListboxBeginSelect %W [%W index active]
}
bind Listbox <Select> {
    tk::ListboxBeginSelect %W [%W index active]
}
bind Listbox <Control-Shift-space> {
    tk::ListboxBeginExtend %W [%W index active]
}
bind Listbox <Shift-Select> {

Changes to library/menu.tcl.

102
103
104
105
106
107
108




109
110
111
112
113
114
115
bind Menubutton <ButtonRelease-1> {
    tk::MbButtonUp %W
}
bind Menubutton <space> {
    tk::MbPost %W
    tk::MenuFirstEntry [%W cget -menu]
}





# Must set focus when mouse enters a menu, in order to allow
# mixed-mode processing using both the mouse and the keyboard.
# Don't set the focus if the event comes from a grab release,
# though:  such an event can happen after as part of unposting
# a cascaded chain of menus, after the focus has already been
# restored to wherever it was before menu selection started.







>
>
>
>







102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
bind Menubutton <ButtonRelease-1> {
    tk::MbButtonUp %W
}
bind Menubutton <space> {
    tk::MbPost %W
    tk::MenuFirstEntry [%W cget -menu]
}
bind Menubutton <<Invoke>> {
    tk::MbPost %W
    tk::MenuFirstEntry [%W cget -menu]
}

# Must set focus when mouse enters a menu, in order to allow
# mixed-mode processing using both the mouse and the keyboard.
# Don't set the focus if the event comes from a grab release,
# though:  such an event can happen after as part of unposting
# a cascaded chain of menus, after the focus has already been
# restored to wherever it was before menu selection started.
139
140
141
142
143
144
145



146
147
148
149
150
151
152
}
bind Menu <ButtonRelease> {
   tk::MenuInvoke %W 1
}
bind Menu <space> {
    tk::MenuInvoke %W 0
}



bind Menu <Return> {
    tk::MenuInvoke %W 0
}
bind Menu <Escape> {
    tk::MenuEscape %W
}
bind Menu <Left> {







>
>
>







143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
}
bind Menu <ButtonRelease> {
   tk::MenuInvoke %W 1
}
bind Menu <space> {
    tk::MenuInvoke %W 0
}
bind Menu <<Invoke>> {
    tk::MenuInvoke %W 0
}
bind Menu <Return> {
    tk::MenuInvoke %W 0
}
bind Menu <Escape> {
    tk::MenuEscape %W
}
bind Menu <Left> {