[PD-cvs] pd/src desire.tk,1.1.2.281,1.1.2.282

chunlee chunlee at users.sourceforge.net
Sat Jul 29 15:35:15 CEST 2006


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

Modified Files:
      Tag: devel_0_39
	desire.tk 
Log Message:
code for tab jump to select object


Index: desire.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v
retrieving revision 1.1.2.281
retrieving revision 1.1.2.282
diff -C2 -d -r1.1.2.281 -r1.1.2.282
*** desire.tk	5 Jul 2006 10:02:01 -0000	1.1.2.281
--- desire.tk	29 Jul 2006 13:35:12 -0000	1.1.2.282
***************
*** 836,848 ****
  		if {[regexp {^#} $line comment]} {} else {
  		
! 		  if {[regexp {^-[a-zA-Z]{2,10}} $line option]} {
  		
  		  foreach {word1 word2 word3} $line {
! 		  set word1 [string replace $word1 0 0]
! 		  
  		  switch $word1 {
! 		  look {
  		  set look($word2) $word3
! 		  #puts "look($word2) $word3"
  		  } 
  		  font {
--- 836,847 ----
  		if {[regexp {^#} $line comment]} {} else {
  		
! 		  #if {[regexp {^-[a-zA-Z]{2,10}} $line option]} {
  		
  		  foreach {word1 word2 word3} $line {
! 		  #set word1 [string replace $word1 0 0]
  		  switch $word1 {
! 		  color {
  		  set look($word2) $word3
! 		  puts "look($word2) $word3"
  		  } 
  		  font {
***************
*** 855,859 ****
  		  
  		  }
! 		}
  		}
  	}
--- 854,858 ----
  		  
  		  }
! 		#}
  		}
  	}
***************
*** 1158,1161 ****
--- 1157,1161 ----
      pd $name editmode $@editmode
      set @coords 0
+     set @jump 0
  }
  
***************
*** 1545,1549 ****
  	$c itemconfigure ${self}BASE -outline $frcol -dash \
  		[if {$@valid} {list 8 8 8 8} {list}]
! 	super
  	if {$@isnew} {$self edit}
  	catch {$c raise ${self}TEXT $self}
--- 1545,1551 ----
  	$c itemconfigure ${self}BASE -outline $frcol -dash \
  		[if {$@valid} {list 8 8 8 8} {list}]
! 	$c itemconfigure ${self}BASE2 -fill $frcol
! 	$c itemconfigure ${self}BASE3 -fill $frcol 
! 	#super
  	if {$@isnew} {$self edit}
  	catch {$c raise ${self}TEXT $self}
***************
*** 2317,2320 ****
--- 2319,2332 ----
  }
  
+ def* Canvas obj_jump {} {
+ 		$self deselect_all
+ 		set obj_sel [lindex $@children $@jump]
+ 		$obj_sel selected?= 1
+ 		set @selection $obj_sel 
+ 		puts "jump -> $@jump"
+ 		incr @jump
+ 		if {$@jump >= [llength $@children]} {set @jump 0}
+ }
+ 
  #-----------------------------------------------------------------------------------#
  set lastcanvasconfigured ""
***************
*** 2385,2388 ****
--- 2397,2407 ----
  	Left  {$self selection_move -$motion 0}
  	Right {$self selection_move +$motion 0}
+ 	Tab   {$self obj_jump}
+ 	Return {if {[llength $@selection] == 1} {
+ 		if {$_($@selection:_class) == "ObjectBox"} {
+ 			$@selection edit
+ 		}
+ 		}
+ 		}
  	default {}
      }
***************
*** 4345,4349 ****
  	listbox $f -width $@width -height $@height -relief flat \
  		-bg [look canvasbgedit] -selectbackground [complement [look objectfg]] \
! 		-activestyle dotbox -selectforeground [look objectfg]
  	$self fill_box [$@textbox get 1.0 1.end]
  	$f configure -width $@width
--- 4364,4368 ----
  	listbox $f -width $@width -height $@height -relief flat \
  		-bg [look canvasbgedit] -selectbackground [complement [look objectfg]] \
! 		-activestyle dotbox -selectforeground [look objectfg] -fg [look objectfg]
  	$self fill_box [$@textbox get 1.0 1.end]
  	$f configure -width $@width





More information about the Pd-cvs mailing list