diff options
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | doc/event.n | 7 | ||||
-rw-r--r-- | doc/ttk_panedwindow.n | 6 | ||||
-rw-r--r-- | doc/ttk_spinbox.n | 5 | ||||
-rw-r--r-- | library/button.tcl | 9 | ||||
-rw-r--r-- | library/listbox.tcl | 3 | ||||
-rw-r--r-- | library/menu.tcl | 7 |
7 files changed, 46 insertions, 0 deletions
@@ -1,3 +1,12 @@ +2013-03-27 Jan Nijtmans <nijtmans@users.sf.net> + + * 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 <dgp@users.sourceforge.net> * generic/tkWindow.c: Updates so that Tk 8.5.14+ will be able to diff --git a/doc/event.n b/doc/event.n index 69f336a..77d6f18 100644 --- a/doc/event.n +++ b/doc/event.n @@ -318,6 +318,10 @@ 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. @@ -334,6 +338,9 @@ changed. 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 diff --git a/doc/ttk_panedwindow.n b/doc/ttk_panedwindow.n index c5851c3..474f56d 100644 --- a/doc/ttk_panedwindow.n +++ b/doc/ttk_panedwindow.n @@ -105,6 +105,12 @@ and the total size of the widget. .\" 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: diff --git a/doc/ttk_spinbox.n b/doc/ttk_spinbox.n index fefd287..7b291a9 100644 --- a/doc/ttk_spinbox.n +++ b/doc/ttk_spinbox.n @@ -77,6 +77,11 @@ 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 diff --git a/library/button.tcl b/library/button.tcl index d095b8a..75378cc 100644 --- a/library/button.tcl +++ b/library/button.tcl @@ -109,6 +109,15 @@ bind Checkbutton <space> { 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> { diff --git a/library/listbox.tcl b/library/listbox.tcl index f3434a5..2d9af20 100644 --- a/library/listbox.tcl +++ b/library/listbox.tcl @@ -142,6 +142,9 @@ bind Listbox <<Copy>> { 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] } diff --git a/library/menu.tcl b/library/menu.tcl index cc57532..f133c87 100644 --- a/library/menu.tcl +++ b/library/menu.tcl @@ -106,6 +106,10 @@ 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. @@ -143,6 +147,9 @@ bind Menu <ButtonRelease> { bind Menu <space> { tk::MenuInvoke %W 0 } +bind Menu <<Invoke>> { + tk::MenuInvoke %W 0 +} bind Menu <Return> { tk::MenuInvoke %W 0 } |