[PD-cvs] pd/src dzinc.tcl, NONE, 1.1.2.1 desire.tk, 1.1.2.600.2.359, 1.1.2.600.2.360 pkgIndex.tcl, 1.1.2.3, 1.1.2.3.2.1

chunlee chunlee at users.sourceforge.net
Mon Aug 13 09:02:19 CEST 2007


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

Modified Files:
      Tag: desiredata
	desire.tk pkgIndex.tcl 
Added Files:
      Tag: desiredata
	dzinc.tcl 
Log Message:
fix right click over gop, added dzinc.tcl


Index: desire.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v
retrieving revision 1.1.2.600.2.359
retrieving revision 1.1.2.600.2.360
diff -C2 -d -r1.1.2.600.2.359 -r1.1.2.600.2.360
*** desire.tk	13 Aug 2007 06:19:58 -0000	1.1.2.600.2.359
--- desire.tk	13 Aug 2007 07:02:15 -0000	1.1.2.600.2.360
***************
*** 44,47 ****
--- 44,48 ----
  package require poe
  if {$tk} {package require bgerror}
+ 
  catch {package require Tclx}
  #if {[catch {source /home/matju/src/pd-desiredata/pd/src/profile_dd.tcl}]} {error_dump}
***************
*** 723,727 ****
      -valgrind   run pd server through valgrind
    -novalgrind   ... or don't
!   -savemode     run desiredata with all default settings"
  }
  
--- 724,729 ----
      -valgrind   run pd server through valgrind
    -novalgrind   ... or don't
!   -savemode     run desiredata with all default settings
!   -dzinc        use zinc emulation"
  }
  
***************
*** 738,741 ****
--- 740,744 ----
      ^-novalgrind\$ {set cmdline(valgrind) 0}
      ^-safemode\$ {set cmdline(safemode) 1}
+     ^-dzinc\$ {set cmdline(dzinc) 1}
      ^(-h|-help|--help)\$ {cmdline_help; exit 1}
      ^- {puts "ERROR: command line argument: unknown $o"}
***************
*** 777,780 ****
--- 780,784 ----
  
  if {[info exists ::cmdline(safemode)]} {read_client_prefs_from "defaults.ddrc"}
+ if {[info exists ::cmdline(dzinc)]} {package require dzinc}
  
  #-----------------------------------------------------------------------------------#
***************
*** 1816,1821 ****
  }
  
- def Canvas getscroll {} {}
- 
  # should be called once and only from init
  def Canvas init_window {} {
--- 1820,1823 ----
***************
*** 1838,1842 ****
      # turn statusbar on/off
      if {[$self look statusbar]} {pack [$@statusbar widget] -side bottom -fill x}
!     pack [canvas $c -width [lindex $@canvas_size 0] -height [lindex $@canvas_size 1] -background white] -side left -expand 1 -fill both
      set @yscroll $win.yscroll; set @xscroll $win.xscroll
      $self init_scrollbars
--- 1840,1845 ----
      # turn statusbar on/off
      if {[$self look statusbar]} {pack [$@statusbar widget] -side bottom -fill x}
!     pack [canvas $c -width [lindex $@canvas_size 0] -height [lindex $@canvas_size 1] -background white] \
! 	-side left -expand 1 -fill both
      set @yscroll $win.yscroll; set @xscroll $win.xscroll
      $self init_scrollbars
***************
*** 2305,2308 ****
--- 2308,2316 ----
  
  def Canvas popup_properties {} {CanvasPropertiesDialog new $self}
+ 
+ def Canvas gop_target {id} {
+ 	while {[$id canvas] != $self} {set id [$id canvas]}; return $id
+ }
+ 
  #-----------------------------------------------------------------------------------#
  class_new Macro_Rect {View}
***************
*** 3302,3306 ****
      set x [expr [$c canvasx $x]/$zoom]
      set y [expr [$c canvasy $y]/$zoom]
!     set tags [$c gettags [lindex [$c find overlapping [expr $x-2] [expr $y-2] [expr $x+2] [expr $y+2]] end]]
      set target [$@canvas identify_target $x $y -1]
      mset {type id detail} $target
--- 3310,3314 ----
      set x [expr [$c canvasx $x]/$zoom]
      set y [expr [$c canvasy $y]/$zoom]
!     #set tags [$c gettags [lindex [$c find overlapping [expr $x-2] [expr $y-2] [expr $x+2] [expr $y+2]] end]]
      set target [$@canvas identify_target $x $y -1]
      mset {type id detail} $target
***************
*** 4286,4295 ****
  	set c [$self widget]
  	set @insert_x $x; set @insert_y $y
! 	#if {[$id class] != "Canvas"} {
! 	#	if {![winfo exists [[$id canvas] widget]]} {set id [$id canvas]}
! 	#}
! 	#if {[$id class] == "Canvas"} {set obj [$id get_parent_gop $self]} else {set obj $id}
! 	set obj $id
! 	$self popup $obj [winfo pointerx $c] [winfo pointery $c]
  }
  
--- 4294,4299 ----
  	set c [$self widget]
  	set @insert_x $x; set @insert_y $y
! 	if {$id != $self} {set id [$self gop_target $id]}
! 	$self popup $id [winfo pointerx $c] [winfo pointery $c]
  }
  
***************
*** 6690,6694 ****
  def Canvas lowest_item {} {
  	set c [$self widget]
! 	set all [$c find all]
  	set lowest [lindex [$c gettags [lindex $all 0]] 0]
  	return $lowest
--- 6694,6698 ----
  def Canvas lowest_item {} {
  	set c [$self widget]
! 	set all [$c find withtag foo]
  	set lowest [lindex [$c gettags [lindex $all 0]] 0]
  	return $lowest

--- NEW FILE: dzinc.tcl ---
package provide dzinc 0.1
package require Tkzinc

class_new Zinc {Thing}
def Zinc init {} {}
def Zinc unknown {args} {
	upvar 1 selector selector
	old_$self $selector {expand}$args
}

rename canvas old_canvas

proc option_replace {argz} {
	set new_args {}
	foreach {option val} $argz {
		switch -- $option {
			-bg {set option -backcolor}
			-background {set option -backcolor}
			-bd {set option -borderwidth}
		}
		lappend new_args $option $val
	}
	return $new_args
}

proc canvas {name args} {
	set result [eval [concat [list zinc $name] [option_replace $args]]]
        Zinc new_as $name
	return $result
}

def Zinc canvasx {val} {
	return $val
}

def Zinc canvasy {val} {
	return $val
}

def Zinc create {args} {
	puts "create $args"
}

def Zinc configure {args} {
	eval [concat [list old_$self configure] [option_replace $args]]
}

def Zinc delete {args} {
	eval [concat [list old_$self remove] $args]
}

def Zinc gettags {args} {
	puts "+++++++++++"
	if {$args == ""} {return}
	puts "-----------"
	eval [concat [list old_$self gettags] $args]
}
Index: pkgIndex.tcl
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/pkgIndex.tcl,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.3.2.1
diff -C2 -d -r1.1.2.3 -r1.1.2.3.2.1
*** pkgIndex.tcl	16 Nov 2006 23:30:25 -0000	1.1.2.3
--- pkgIndex.tcl	13 Aug 2007 07:02:17 -0000	1.1.2.3.2.1
***************
*** 9,13 ****
  # full path name of this file's directory.
  
! package ifneeded poe     0.1 [list source [file join $dir poe.tcl]]
! package ifneeded pre8.5  8.4 [list source [file join $dir pre8.5.tcl]]
  package ifneeded bgerror 8.4 [list source [file join $dir bgerror.tcl]]
--- 9,15 ----
  # full path name of this file's directory.
  
! package ifneeded kb-mode 0.1 [list source [file join $dir kb-mode.tcl]]
! package ifneeded poe 0.1 [list source [file join $dir poe.tcl]]
! package ifneeded pre8.5 8.4 [list source [file join $dir pre8.5.tcl]]
  package ifneeded bgerror 8.4 [list source [file join $dir bgerror.tcl]]
+ package ifneeded dzinc 0.1 [list source [file join $dir dzinc.tcl]]





More information about the Pd-cvs mailing list