diff options
Diffstat (limited to 'library')
-rw-r--r-- | library/ttk/entry.tcl | 4 | ||||
-rw-r--r-- | library/ttk/notebook.tcl | 20 | ||||
-rw-r--r-- | library/ttk/panedwindow.tcl | 6 | ||||
-rw-r--r-- | library/ttk/utils.tcl | 38 |
4 files changed, 25 insertions, 43 deletions
diff --git a/library/ttk/entry.tcl b/library/ttk/entry.tcl index 65fdf90..7d84be7 100644 --- a/library/ttk/entry.tcl +++ b/library/ttk/entry.tcl @@ -1,5 +1,5 @@ # -# $Id: entry.tcl,v 1.1 2006/10/31 01:42:27 hobbs Exp $ +# $Id: entry.tcl,v 1.2 2006/11/07 03:45:28 jenglish Exp $ # # DERIVED FROM: tk/library/entry.tcl r1.22 # @@ -409,7 +409,7 @@ proc ttk::entry::DragTo {w x} { # according to the current selection mode. # # TODO: AutoScroll should repeat faster (50ms) than normal autorepeat. -# TODO: Need a way for ttk::Repeat scripts to cancel themselves. +# TODO: Need a way for Repeat scripts to cancel themselves. # proc ttk::entry::AutoScroll {w} { variable State diff --git a/library/ttk/notebook.tcl b/library/ttk/notebook.tcl index d2edddc..9ad6d01 100644 --- a/library/ttk/notebook.tcl +++ b/library/ttk/notebook.tcl @@ -1,5 +1,5 @@ # -# $Id: notebook.tcl,v 1.1 2006/10/31 01:42:27 hobbs Exp $ +# $Id: notebook.tcl,v 1.2 2006/11/07 03:45:28 jenglish Exp $ # # Bindings for TNotebook widget # @@ -39,24 +39,6 @@ proc ttk::notebook::ActivateTab {w tab} { } } -# ttk::focusFirst $w -- -# Return the first descendant of $w, in preorder traversal order, -# that can take keyboard focus, "" if none do. -# -# See also: tk_focusNext -# -proc ttk::focusFirst {w} { - if {[ttk::takesFocus $w]} { - return $w - } - foreach child [winfo children $w] { - if {[set c [ttk::focusFirst $child]] ne ""} { - return $c - } - } - return "" -} - # Press $nb $x $y -- # ButtonPress-1 binding for notebook widgets. # Activate the tab under the mouse cursor, if any. diff --git a/library/ttk/panedwindow.tcl b/library/ttk/panedwindow.tcl index 451e5c4..e575e8a 100644 --- a/library/ttk/panedwindow.tcl +++ b/library/ttk/panedwindow.tcl @@ -1,7 +1,7 @@ # -# $Id: panedwindow.tcl,v 1.1 2006/10/31 01:42:27 hobbs Exp $ +# $Id: panedwindow.tcl,v 1.2 2006/11/07 03:45:28 jenglish Exp $ # -# Ttk widget set: bindings for TPanedwindow widget. +# Bindings for ttk::panedwindow widget. # namespace eval ttk::panedwindow { @@ -24,7 +24,7 @@ bind TPanedwindow <ButtonRelease-1> { ttk::panedwindow::Release %W %x %y } bind TPanedwindow <Motion> { ttk::panedwindow::SetCursor %W %x %y } bind TPanedwindow <Enter> { ttk::panedwindow::SetCursor %W %x %y } bind TPanedwindow <Leave> { ttk::panedwindow::ResetCursor %W } -# See PanedEventProc in ttkPanedwindow.c: +# See <<NOTE-PW-LEAVE-NOTIFYINFERIOR>> bind TPanedwindow <<EnteredChild>> { ttk::panedwindow::ResetCursor %W } diff --git a/library/ttk/utils.tcl b/library/ttk/utils.tcl index b8059ae..11f85b9 100644 --- a/library/ttk/utils.tcl +++ b/library/ttk/utils.tcl @@ -1,5 +1,5 @@ # -# $Id: utils.tcl,v 1.1 2006/10/31 01:42:27 hobbs Exp $ +# $Id: utils.tcl,v 1.2 2006/11/07 03:45:28 jenglish Exp $ # # Ttk widget set: utilities for widget implementations. # @@ -58,6 +58,24 @@ proc ttk::takesFocus {w} { return 0 } +# ttk::focusFirst $w -- +# Return the first descendant of $w, in preorder traversal order, +# that can take keyboard focus, "" if none do. +# +# See also: tk_focusNext +# +proc ttk::focusFirst {w} { + if {[ttk::takesFocus $w]} { + return $w + } + foreach child [winfo children $w] { + if {[set c [ttk::focusFirst $child]] ne ""} { + return $c + } + } + return "" +} + ### Grabs. # # Rules: @@ -213,22 +231,4 @@ proc ttk::CopyBindings {from to} { } } -## ttk::LoadImages $imgdir ?$patternList? -- -# Utility routine for pixmap themes -# -# Loads all image files in $imgdir matching $patternList. -# Returns: a paired list of filename/imagename pairs. -# -proc ttk::LoadImages {imgdir {patterns {*.gif}}} { - foreach pattern $patterns { - foreach file [glob -directory $imgdir $pattern] { - set img [file tail [file rootname $file]] - if {![info exists images($img)]} { - set images($img) [image create photo -file $file] - } - } - } - return [array get images] -} - #*EOF* |