[PD-cvs] pd/src desire.tk,1.1.2.139,1.1.2.140

chunlee chunlee at users.sourceforge.net
Fri Dec 16 16:30:27 CET 2005


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

Modified Files:
      Tag: devel_0_39
	desire.tk 
Log Message:
temporary fix for bang and toggle moving
add numbox update_size


Index: desire.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v
retrieving revision 1.1.2.139
retrieving revision 1.1.2.140
diff -C2 -d -r1.1.2.139 -r1.1.2.140
*** desire.tk	16 Dec 2005 13:43:40 -0000	1.1.2.139
--- desire.tk	16 Dec 2005 15:30:21 -0000	1.1.2.140
***************
*** 749,753 ****
  def* view erase {} {$self item_delete}
  def* view   click     {args} {}
! def* view   clickedit {args} {}
  def* view unclick     {args} {}
  def* view unclickedit {args} {}
--- 749,753 ----
  def* view erase {} {$self item_delete}
  def* view   click     {args} {}
! #def* view   clickedit {args} {}
  def* view unclick     {args} {}
  def* view unclickedit {args} {}
***************
*** 757,760 ****
--- 757,778 ----
  def view selected?= {x} {set @selected? $x; $self changed}
  
+ #def* view clickedit {x y butt key in_selection selection} {
+     #handles the shift click
+     #if {($f&1) && !$already} {post "add to selection?"; return}
+ #    if {($key&1) && $selection>0} {
+ #    puts "add $self to selection...."
+ #    }
+     #if clicked obj is part of the $@selection, than....
+ #    if {$in_selection && [llength $selection]>1} {
+ #       set _($@canvas:action) move
+ #    } {
+ #       $@canvas deselect_all
+ #       set _($@canvas:selection) $self
+        #set _($@canvas:action) move
+ #       set _($@canvas:action) edit
+ #    }
+ #}
+ 
+ 
  def* view select {state} {
  	set ostate [$self selected?]
***************
*** 1492,1495 ****
--- 1510,1514 ----
  	$c coords lnew $l
      }
+     #puts "action:$@action ........"
      switch $@action {
        move {
***************
*** 1875,1878 ****
--- 1894,1898 ----
  
  def box bbox {} {
+ 	puts ".... xs:$@xs ys:$@ys ...."
  	mset {x y} [$self xy]
  	list $x $y [expr $x+$@xs] [expr $y+$@ys]
***************
*** 1917,1922 ****
         set _($@canvas:action) edit
      }
- 
-     
  }
  
--- 1937,1940 ----
***************
*** 2230,2233 ****
--- 2248,2252 ----
  
  class_new bluebox {labeled box}
+ #class_new bluebox {box labeled}
  
  def* bluebox draw {} {
***************
*** 2247,2251 ****
  }
  
! def bluebox motionedit {args} {
  	#puts "motions in $self in edit mode"
  }
--- 2266,2270 ----
  }
  
! def* bluebox motionedit {args} {
  	#puts "motions in $self in edit mode"
  }
***************
*** 2260,2264 ****
  def thing == {other} {return [expr ![string compare $self $other]]}
  
! def numbox draw {} {
  	global look
  	mset {x1 y1} [$self xy]
--- 2279,2284 ----
  def thing == {other} {return [expr ![string compare $self $other]]}
  
! def* numbox draw {} {
! 	$self update_size
  	global look
  	mset {x1 y1} [$self xy]
***************
*** 2291,2294 ****
--- 2311,2325 ----
  }
  
+ def* numbox update_size {} {
+ 	global font look
+ 	set @textwidth [expr $font(padx)+$font(width)*[string length $@buf]]
+ 	set @topwidth [expr ($@ninlets + ($@ninlets - 1)) * $look(iowidth)]
+ 	set @bottomwidth [expr ($@noutlets + ($@noutlets - 1)) * $look(iowidth)]
+ 	set @xs [max $look(minobjwidth) [max $@bottomwidth [max $@topwidth $@textwidth]]]
+ 	
+ 	set @ys  [expr $font(pady)+$font(height)]
+ }
+ 
+ 
  def numbox ftoa {} {
  	set f $@val
***************
*** 2520,2526 ****
  def slider unfocus {} {$self draw}
  
! class_new labeled {view}
  
! def labeled draw {} {
  	mset {x1 y1} [$self xy]
  	set lx [expr $x1+$@ldx]
--- 2551,2557 ----
  def slider unfocus {} {$self draw}
  
! class_new labeled {}
  
! def* labeled draw {} {
  	mset {x1 y1} [$self xy]
  	set lx [expr $x1+$@ldx]





More information about the Pd-cvs mailing list