[PD-cvs] pd/src desire.tk,1.1.2.195,1.1.2.196

chunlee chunlee at users.sourceforge.net
Wed May 3 13:48:53 CEST 2006


Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4355

Modified Files:
      Tag: devel_0_39
	desire.tk 
Log Message:
added up/down key browse support, see focus_switch


Index: desire.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v
retrieving revision 1.1.2.195
retrieving revision 1.1.2.196
diff -C2 -d -r1.1.2.195 -r1.1.2.196
*** desire.tk	29 Apr 2006 15:14:00 -0000	1.1.2.195
--- desire.tk	3 May 2006 11:48:47 -0000	1.1.2.196
***************
*** 3218,3221 ****
--- 3218,3222 ----
  def ClassBrowser init {name} {
  	set @name $name
+ 	set @focus ""
  	pd pd update-path
          pd pd update-class-list $self list_callback
***************
*** 3289,3296 ****
  	pack $b -side bottom -fill x -expand no
  	$self fill_box ""
! 	bind $f.1 <Button-1> "after 1 \"$self info\""
! 	#bind $b.2 <KeyPress> {after 1 "  $self fill_box [.browser.butt.2 get]"}
! 	bind $b.2 <KeyPress> {after 1 "browser fill_box \[.browser.butt.2 get\]"}
! 	after 1 "focus $b.2"
  }
  
--- 3290,3316 ----
  	pack $b -side bottom -fill x -expand no
  	$self fill_box ""
! 	#bind $f.1 <Button-1> "after 1 \"$self info\""
! 	bind $f.1 <Button-1> "after 1 \"$self focus_switch Up\""
! 	bind $f.1 <KeyPress> "after 1 \"$self focus_switch %K\""
! 	#bind $b.2 <KeyPress> {after 1 "browser fill_box \[.browser.butt.2 get\]"}
! 	bind $b.2 <KeyPress> "after 1 \"$self focus_switch %K\""
! 	#after 1 "focus $b.2"
! }
! 
! def ClassBrowser focus_switch {key} {
! 	if {$key != "Down" & $key != "Up"} {
! 		if {$@focus == "listbox"} {
! 		if {[regexp {^[a-zA-Z]{1}$} $key]} {.$self.butt.2 insert end $key}
! 		}
! 		focus .$self.butt.2
! 		set @focus "entry"
! 		$self fill_box [.$self.butt.2 get]
! 	} else {
! 		focus .$self.cl.1
! 		set @focus "listbox"
! 		$self info
! 	}
! 
! 
  }
  





More information about the Pd-cvs mailing list