[PD-cvs] pd/src desire.tk,1.1.2.600.2.207,1.1.2.600.2.208

chunlee chunlee at users.sourceforge.net
Mon Jul 9 16:08:52 CEST 2007


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

Modified Files:
      Tag: desiredata
	desire.tk 
Log Message:
fixed a few small things re gop


Index: desire.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v
retrieving revision 1.1.2.600.2.207
retrieving revision 1.1.2.600.2.208
diff -C2 -d -r1.1.2.600.2.207 -r1.1.2.600.2.208
*** desire.tk	9 Jul 2007 10:27:23 -0000	1.1.2.600.2.207
--- desire.tk	9 Jul 2007 14:08:48 -0000	1.1.2.600.2.208
***************
*** 1354,1358 ****
  		netsend [list .$self vis 0]
  		if {$@gop} {
! 			set @mapped 1; netsend [list .$self map 1]
  		} else {
  			set @mapped 0; netsend [list .$self map 0]
--- 1354,1358 ----
  		netsend [list .$self vis 0]
  		if {$@gop} {
! 			set @mapped 0; netsend [list .$self map 0]
  		} else {
  			set @mapped 0; netsend [list .$self map 0]
***************
*** 1505,1509 ****
  def Canvas editmodeswitch {args} {$self editmode= [expr !$@editmode]}
  def Canvas window {} {
! 	if {$@gop && $@canvas != ""} {return [$@canvas window]}
  	return .$self
  }
--- 1505,1509 ----
  def Canvas editmodeswitch {args} {$self editmode= [expr !$@editmode]}
  def Canvas window {} {
! 	#if {$@gop && $@canvas != ""} {return [$@canvas window]}
  	return .$self
  }
***************
*** 1667,1673 ****
  
  def Canvas gop_rect {} {
- 	# 0 -1 1 1 90 95 10 20
  	set rect [list $@xmargin $@ymargin [expr $@xmargin+$@pixwidth] [expr $@ymargin+$@pixheight]]
! 	if {$@goprect == ""} {set @goprect [GopRect new $self $rect]}
  	$@goprect draw
  
--- 1667,1674 ----
  
  def Canvas gop_rect {} {
  	set rect [list $@xmargin $@ymargin [expr $@xmargin+$@pixwidth] [expr $@ymargin+$@pixheight]]
! 	if {$@goprect == ""} {
! 		set @goprect [GopRect new $self $rect]
! 	} elseif {!$@editmode} {$@goprect delete; set @goprect ""; return}
  	$@goprect draw
  
***************
*** 2172,2177 ****
  	$self adjust_scrollbars
  	if {$@gop} {
! 		if {[llength $@children] != 1 && \
! 			[[lindex $@children 0] class] != "Array"} {$self gop_rect}
  	}
  }
--- 2173,2180 ----
  	$self adjust_scrollbars
  	if {$@gop} {
! 		# this was to test if a canvas is graphical array....
! 		#if {[llength $@children] != 1 && \
! 		#	[[lindex $@children 0] class] != "Array"} {$self gop_rect}
! 		$self gop_rect
  	}
  }
***************
*** 2498,2504 ****
  		set ::subpatcherize(future_sub) ""
  	}
!     set was [winfo exists .$self]
!     if {$flag && $was && [$self gop]} {$self redraw}
!     if {$flag && $was} {$self raise}
  	if {$flag && !$was} {
  		#if {!$subpatcherize(paste) && !$subpatcherize(edit)} {
--- 2501,2507 ----
  		set ::subpatcherize(future_sub) ""
  	}
! 	set was [winfo exists .$self]
! 	if {$flag && $was && [$self gop]} {$self redraw}
! 	if {$flag && $was} {$self raise}
  	if {$flag && !$was} {
  		#if {!$subpatcherize(paste) && !$subpatcherize(edit)} {
***************
*** 2528,2543 ****
  }
  
! # this is wrong, arg is called "children" but only accepts one child at a time.
! def Canvas visible_children+= {children} {
! 	if {[lsearch $@visible_children $children] < 0} {
! 		set @visible_children [lappend @visible_children $children]
  		$self changed visible_children
  	}
  }
  
! # this is wrong, arg is called "children" but only accepts one child at a time.
! def Canvas visible_children-= {children} {
! 	if {[lsearch $@visible_children $children] >= 0} {
! 		set @visible_children [lwithout $@visible_children $children]
  		$self changed visible_children
  	}
--- 2531,2544 ----
  }
  
! def Canvas visible_children+= {child} {
! 	if {[lsearch $@visible_children $child] < 0} {
! 		set @visible_children [lappend @visible_children $child]
  		$self changed visible_children
  	}
  }
  
! def Canvas visible_children-= {child} {
! 	if {[lsearch $@visible_children $child] >= 0} {
! 		set @visible_children [lwithout $@visible_children $child]
  		$self changed visible_children
  	}
***************
*** 2839,2843 ****
  		if {$type_idx >= 0} {break}
  	}
- 
  	mset {iox ioy} [lmap / [rect_centre [$c bbox $io]] $@zoom]
  	set @iohilite [list $object $iox $ioy $type $port]
--- 2840,2843 ----
***************
*** 2951,2955 ****
  		set tags [$c gettags $tag]
  		if {[regexp {^[x][0-9a-f]{6,8}[oi][0-9]{1,3}} $tags io]} {
! 			lappend ios $io
  		}
  	}
--- 2951,2960 ----
  		set tags [$c gettags $tag]
  		if {[regexp {^[x][0-9a-f]{6,8}[oi][0-9]{1,3}} $tags io]} {
! 			foreach item {i o} {
! 				set type_idx [string first $item $io]
! 				set object [string range $io 0 [expr $type_idx-1]]
! 				if {$type_idx >= 0} {break}
! 			}
! 			if {[$object canvas] == $self} {lappend ios $io}
  		}
  	}
***************
*** 3504,3509 ****
  	netsend [list .$self vis 1]
  	netsend [list .$self map 1]
! 	#$self init_window
! 	#$self redraw
  }
  
--- 3509,3514 ----
  	netsend [list .$self vis 1]
  	netsend [list .$self map 1]
! 	$self init_window
! 	$self redraw
  }
  
***************
*** 5320,5323 ****
--- 5325,5329 ----
  	global fields classinfo
  	super $of
+ 	set @canvas $of
  	wm title .$self "[say canvas] [say popup_properties]"
  	set @gop [$of gop]
***************
*** 5353,5356 ****
--- 5359,5363 ----
  def CanvasPropertiesDialog apply {} {
  	#pd .$@of donecanvasdialog $@xscale $@yscale $@graphme
+ 	if {![$@canvas editmode]} {$@canvas editmode= 1}
  	netsend [list .$@of coords $@xfrom $@yfrom $@xto $@yto $@width $@height $@gop $@xmargin $@ymargin]
  	#donecanvasdialogy sends back weird scientific notation values....





More information about the Pd-cvs mailing list