[PD-cvs] pd/src desire.tk,1.1.2.600.2.71,1.1.2.600.2.72

Mathieu Bouchard matju at users.sourceforge.net
Wed Dec 13 08:23:17 CET 2006


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

Modified Files:
      Tag: desiredata
	desire.tk 
Log Message:
first attempt at inlet tooltips


Index: desire.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v
retrieving revision 1.1.2.600.2.71
retrieving revision 1.1.2.600.2.72
diff -C2 -d -r1.1.2.600.2.71 -r1.1.2.600.2.72
*** desire.tk	13 Dec 2006 06:33:31 -0000	1.1.2.600.2.71
--- desire.tk	13 Dec 2006 07:23:13 -0000	1.1.2.600.2.72
***************
*** 1116,1119 ****
--- 1116,1120 ----
  	set @noutlets 0 ;# should be in Box init
  	set @canvas ""
+ #	set @inside_box 42 ;# temporary fix
  	set @ioselect {}
  }
***************
*** 4116,4119 ****
--- 4117,4136 ----
  }
  
+ def Box tips= {tips} {set @tips $tips}
+ 
+ def Box tip {type port} {
+ 	if {[info exists @tips]} {
+ 		set tips $@tips
+ 	} else {
+ 		netsend [list .$@canvas object_get_tips $self]
+ 		#after 500 $self tip $type $port
+ 		set tips ""
+ 	}
+ 	switch $type {
+ 		i {return "inlet $port: [lindex $tips $port]"}
+ 		o {return "outlet $port"}
+ 	}
+ }
+ 
  # type is i or o
  def Box hilite_io {type x y} {
***************
*** 4143,4148 ****
  	$self item ${p}b rectangle [l+ [$self io_bbox $type $port $ns] $hilitebox] -outline $outline -width 1
  	#$self item ${p}b rectangle [l+ [lmap / [$c coords $p2] [$@canvas zoom]] $hilitebox] -outline $outline -width 1
! 	switch $type {i {set tip "inlet $port"} o {set tip "outlet $port"}}
! 	if {[$self look tooltip]} {$@canvas show_tooltip $x $y $tip $type}
  	return $port
  }
--- 4160,4164 ----
  	$self item ${p}b rectangle [l+ [$self io_bbox $type $port $ns] $hilitebox] -outline $outline -width 1
  	#$self item ${p}b rectangle [l+ [lmap / [$c coords $p2] [$@canvas zoom]] $hilitebox] -outline $outline -width 1
! 	if {[$self look tooltip]} {$@canvas show_tooltip $x $y [$self tip $type $port] $type}
  	return $port
  }
***************
*** 4390,4394 ****
  	#the server ought to take care of this:
  	#if {[lindex $e 1] == "array"} {set ninlets 0; set noutlets 0}
! 	$self   canvas= $canvas
  	$self  ninlets= $ninlets
  	$self noutlets= $noutlets
--- 4406,4410 ----
  	#the server ought to take care of this:
  	#if {[lindex $e 1] == "array"} {set ninlets 0; set noutlets 0}
! 	if {$canvas != "x0"} {$self   canvas= $canvas}
  	$self  ninlets= $ninlets
  	$self noutlets= $noutlets





More information about the Pd-cvs mailing list