[PD-cvs] pd/src desire.tk,1.1.2.245,1.1.2.246

chunlee chunlee at users.sourceforge.net
Thu Jun 15 09:35:26 CEST 2006


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

Modified Files:
      Tag: devel_0_39
	desire.tk 
Log Message:
fixes for canvas loading


Index: desire.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v
retrieving revision 1.1.2.245
retrieving revision 1.1.2.246
diff -C2 -d -r1.1.2.245 -r1.1.2.246
*** desire.tk	14 Jun 2006 18:20:46 -0000	1.1.2.245
--- desire.tk	15 Jun 2006 07:35:23 -0000	1.1.2.246
***************
*** 1115,1120 ****
  def Canvas undo {} {$@history undo}
  def Canvas redo {} {$@history redo}
! 
! def* Canvas init {{width 400} {height 300} {geometry +0+0} {editable 1}} {
      super
      global pd_opendir pd_tearoff OS cmdline look canvas
--- 1115,1120 ----
  def Canvas undo {} {$@history undo}
  def Canvas redo {} {$@history redo}
! #{width 400} {height 300} {geometry +0+0} {editable 1}
! def* Canvas init {args} {
      super
      global pd_opendir pd_tearoff OS cmdline look canvas
***************
*** 1123,1127 ****
      set c .$self.c
      toplevel $name -menu $name.m
!     wm geometry $name $geometry
      # turn buttonbar on/off
      if {$look(buttonbar)} {pack [[ButtonBar new $self] widget] -side top -fill x -expand no}
--- 1123,1129 ----
      set c .$self.c
      toplevel $name -menu $name.m
!     #wm geometry $name $geometry
!     #puts "geometry -----> +$@x+$@y"
!     #wm geometry $name +$@x+$@y
      # turn buttonbar on/off
      if {$look(buttonbar)} {pack [[ButtonBar new $self] widget] -side top -fill x -expand no}
***************
*** 1131,1145 ****
      pack [scrollbar $name.xscroll -command "$c xview" -orient horizontal] -side bottom -fill x
      pack [scrollbar $name.yscroll -command "$c yview"] -side  right -fill y
!     pack [canvas $c -width $width -height $height -background white \
      	-yscrollcommand "$name.yscroll set" \
      	-xscrollcommand "$name.xscroll set" \
! 	-scrollregion [list 0 0 $width $height]] -side left -expand 1 -fill both
      wm minsize $name 1 1
!     wm geometry $name $geometry
!     $self new_menubar $editable
      wm protocol $name WM_DELETE_WINDOW "$self close"
      $self new_binds
      focus $c
-     $self editmode= $editable
      set @action none
      set @selection {}
--- 1133,1150 ----
      pack [scrollbar $name.xscroll -command "$c xview" -orient horizontal] -side bottom -fill x
      pack [scrollbar $name.yscroll -command "$c yview"] -side  right -fill y
!     pack [canvas $c -width $@w -height $@h -background white \
      	-yscrollcommand "$name.yscroll set" \
      	-xscrollcommand "$name.xscroll set" \
! 	-scrollregion [list 0 0 $@w $@h]] -side left -expand 1 -fill both
      wm minsize $name 1 1
!     #wm geometry $name $geometry
!     wm geometry $name +$@x+$@y
!     #wtf?????
!     set @editmode 1
!     $self editmode= $@editable
!     $self new_menubar $@editable
      wm protocol $name WM_DELETE_WINDOW "$self close"
      $self new_binds
      focus $c
      set @action none
      set @selection {}
***************
*** 1147,1151 ****
      set @focus ""
      set @curpos {30 30}
-     set @editmode $editable
      set @select_by ""
      set @bbox {0 0 100 100}
--- 1152,1155 ----
***************
*** 1371,1376 ****
--- 1375,1383 ----
  	}
  	
+ 	$self adjust_scrollbars
  }
  
+ def* Canvas popup_properties {} {CanvasPropertiesDialog new $self}
+ 
  #-----------------------------------------------------------------------------------#
  # wtf is this supposed to be, again?
***************
*** 1532,1536 ****
  class_new ObjectBox {TextBox}
  
! def ObjectBox init {args} {
  	super
  	set @valid 0
--- 1539,1543 ----
  class_new ObjectBox {TextBox}
  
! def* ObjectBox init {args} {
  	super
  	set @valid 0
***************
*** 2102,2106 ****
  
  def* Canvas deselect_all {} {
- 	puts "-------------- selection_wire:$@selection_wire ------------"
  	foreach o $@selection {$o selected?= 0}
  	foreach w $@selection_wire {$w selected?= 0}
--- 2109,2112 ----
***************
*** 2298,2302 ****
  
  def* Canvas unclickrun {x y b} {
! 	if {[$self focus] != $self} {[$self focus] unclick $x $y $b}
  }
  
--- 2304,2308 ----
  
  def* Canvas unclickrun {x y b} {
! 	#if {[focus] != $self} {[$self focus] unclick $x $y $b}
  }
  
***************
*** 2675,2679 ****
  set fields(hdl)    $fields(hradio)
  set fields(vdl)    $fields(hradio)
! set fields(canvas) {name width height geometry editable}
  
  
--- 2681,2686 ----
  set fields(hdl)    $fields(hradio)
  set fields(vdl)    $fields(hradio)
! #set fields(canvas) {name width height geometry editable}
! set fields(canvas) {foo bar x y w h editable}
  
  
***************
*** 2711,2715 ****
  		obj {set i 4; set class [lindex $d 4]}
  	}
! 	puts "update_object: class=$class"
  	if {![info exists _($x:_class)]} {
  		# new object
--- 2718,2722 ----
  		obj {set i 4; set class [lindex $d 4]}
  	}
! 	
  	if {![info exists _($x:_class)]} {
  		# new object
***************
*** 2737,2740 ****
--- 2744,2755 ----
  			set _($x:_class) ObjectBox
  		}
+ 		
+ 		if {![info exists fields($class)]} {set class obj}
+ 		set i 0
+ 		foreach f $fields($class) {
+ 		set _($x:$f) [lindex $d $i]
+ 		incr i
+ 		}
+ 		
  		$x init
  		if {$_($canvas(current):duplicating)} {
***************
*** 2781,2791 ****
  	  }
  	}
! 	if {![info exists fields($class)]} {set class obj}
! 	set i 0
! 	foreach f $fields($class) {
! 		set _($x:$f) [lindex $d $i]
! 		incr i
! 	}
! 	# hack to get the file loading working, not sure if its a good solution
  	#-------------------------------------------------------------
  	set unborn_child [lsearch $_($canvas(current):unborn) $x]
--- 2796,2809 ----
  	  }
  	}
! 	
! 	#if {![info exists fields($class)]} {set class obj}
! 	#set i 0
! 	#foreach f $fields($class) {
! 	#	set _($x:$f) [lindex $d $i]
! 	#	puts "==== setting $x:$f to [lindex $d $i] ===="
! 	#	incr i
! 	#}
! 
! 	#hack to get the file loading working, not sure if its a good solution
  	#-------------------------------------------------------------
  	set unborn_child [lsearch $_($canvas(current):unborn) $x]
***************
*** 3063,3066 ****
--- 3081,3089 ----
  }
  
+ class_new CanvasPropertiesDialog {PropertiesDialog}
+ 
+ def* IEMPropertiesDialog init {} {
+ }
+ 
  class_new NumBox {Labeled Box}
  def* NumBox init {args} {





More information about the Pd-cvs mailing list